Saturday, October 5, 2013

[Linux] HOW TO: Everything about beep!

Hi guys!

Today we will talk about beep in Linux. First, I show you which modules take care of the beep operation.


Removing the beep.

To remove just add these modules to the blacklist, and PC will never beeps again.

1) Edit /etc/modprobe.d/blacklist-beep.conf:

sudo nano /etc/modprobe.d/blacklist-beep.conf

2) type in:

blacklist pcspkr
blacklist snd_pcsp

Change beep volume.

To change beep volume use alsamixer program. Inside find beep and change it to chosen value.

Playing with beep.

The easiest way to use the pc-speaker is:

echo -e "\ a"

But if you want to change the key and the length of the tone you need to install the "beep".

sudo apt-get install beep

Now you can change the height, length and the gap between tones. Here is a small sample:

beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392

-f frequency
-l length
-D delay
-n new tone
Note frequency:

C  = 261.6
C1 = 277.2
D  = 293.7
D1 = 311.1
E  = 329.6
F  = 349.2
F1 = 370.0
G  = 392.0
G1 = 415.3
A  = 440.0
A1 = 466.2
B  = 493.9

C2  = 523.2
C22 = 554.3
D2  = 587.3
D12 = 622.2
E2  = 659.3
F2  = 698.5
F22 = 734.0
G2  = 784.0
G22 = 830.6
A2  = 880.0
A22 = 932.3
B2  = 987.8

Thank you for your attention.
Have fun with that :)

Thursday, October 3, 2013

[Linux] HOW TO: Auto-mount drive at start-up.

Hello. Today I'll show you how to connect disk on start-up.

In my example, I will mount Windows NTFS partition.

(Tested on Linux MINT 15 - MATE 64bit edition)

1) Create mount point. It's a folder where you find connected disk. Usually it's in /media/ or /mnt/ folder. For example:

sudo mkdir /media/C/

2) Check for disk UUID. IMO the best way to do it:

My output:

sda                931,5G
├─sda1 Reserved    100M    ntfs     BE92D9F292D9AF61
├─sda2             146,4G  ntfs     6860FE1960FDEE26
├─sda3             1K
├─sda4 LENOVO_PART 1,1G    ntfs     C2A42A41A42A37F5
├─sda5             15,3G   swap     f5f23a4f-6990-4bb3-917a-b14809afaaa3
├─sda6             122,1G  ext4     e4a93288-4840-4353-a522-339ed63f1b59
└─sda7             646,6G  ntfs     38C250A1C25064E2
sr0                1024M
For me, its 150 GB ntfs partition. UUID=6860FE1960FDEE26

3) Now edit /etc/fstab.

sudo nano /etc/fstab
Add following line to the end of the file:

UUID=<your uuid> <your mount point> <file system> defaults 0 0
For me, its:

UUID=6860FE1960FDEE26 /media/C ntfs defaults 0 0

4) Manually mount from /etc/fstab by using:

sudo mount -a
or just restart your system.

You are done :)

[Gaming] L4D 2, Linux vs Windows, performance comparison.

Hello guys! Today I have prepared a comparison of performance in L4D 2 on Windows and Linux for you. Results are for the classic Windows, and Windows using GameBooster from Razer. On Linux, using Bumblebee, and native NVIDIA drivers.

Tested on highest details. Resolution: 1366x768

My system:

Linux Mint 15 - MATE 64 bit.
Windows professional 64 bit.

My HW:

Lenovo G580 AH
Intel Core i5 3210M
NVIDIA GeForce GT 630M

Tested on 30th September 2013:

Average FPS on Windows using GameBooster: 60
Average FPS on Windows: 58
Average FPS on Linux with native drivers: 45

Tested on 6th May 2013 (old test):

Average FPS on Linux with Bumblebee: 55
Average FPS on Windows using GameBooster: 43
Average FPS on Windows: 24

I was surprised that the performance on windows had improved a lot compared to the previous tests. 
I was also suprised that the performance on linux dropped so much. Dont know if it is due to native drivers, or something gone bad. Feel free to share your opinion!

Screens Linux with Bumblebee (old):

Screens Linux with native drivers:

Screens Windows:

Screens Windows with GameBooster:

Tuesday, October 1, 2013

[Linux] HOW TO: Keyboard layouts in linux.

Hello guys!

Today, I show you how to easily switch between keyboards layouts. It's pretty easy :)

(Tested on Linux MINT 15 - MATE 64bit edition)

1) You can switch between laguage with Alt + Shift, as it is in Windows. You can set it by the following command. For me, it's cz(Czech) and us(United States).

setxkbmap -option grp:alt_shift_toggle cz,us

2) If it doesn't fits you, you can easily switch between languages just by using:

setxkbmap us

Hope this was helpful ;)

Please comment, if you have problem.

Sunday, September 29, 2013

[Linux] HOW TO: Compiz in Linux MINT 15.

Hello again!

Today, I show you how to install compiz on your Linux, step by step. It's pretty easy, so let's do this!

(Tested on Linux MINT 15 - MATE 64bit edition)

1) Install compiz!

sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra libdecoration0-dev

2) Replace current windowmannager "marco" with "compiz". You have to download dconf-editor:

sudo apt-get install dconf-toolssudo dconf-editor

Now go to org -> mate -> desktop -> session -> required-components. Select "windowmanager" and change it from "marco" to "compiz"

3) Run compiz after startup.

echo "[Desktop Entry]
Exec=compiz --replace
Comment[cs_CZ]=compiz --replace
Comment=compiz --replace" > ~/.config/autostart/compiz.desktop

OR you can manually add command "compiz --replace" into Start-up Applications.

4) Open Compizconfig settings manager(ccsm) and tick everything you want to use. But make sure you tick “window decoration” and “move window” at least! Now go to "gnome compatibility", into commands tab, and replace all gnome-* with mate-*.

5) Reboot. There you go :)

Saturday, September 28, 2013

[Linux] HOW TO: Atheros AR8162, linux drivers. (ALX - Ethernet)

Hi guys! Maybe some of you had problem that your ethernet connection didn't show up in network connection. This should fix it :)

(Tested on Linux MINT 15 - MATE 64bit edition)

Update 6.2.2014: As I noticed that from kernel version 3.10+ drivers not work anymore, I had to update them. In my opinion, those are the ONLY working drivers on kernel > 3.10 at this time! Not found any other fix, or working drivers...

1) Download those drivers.

wget -O- | tar -xz
cd compat-drivers-3.9-rc4-2-su

2) Blacklist old drivers.

sudo sh -c "echo \"blacklist atl1c\" > /etc/modprobe.d/blacklist-ethernet.conf"

3) Select alx driver.

./scripts/driver-select alx

4) Compile and load!

sudo make install
sudo make unload
sudo modprobe alx

5) If not sure, reboot ;)

[Linux] HOW TO: Official NVIDIA drivers installation guide for Optimus graphic cards.

Hello guys, I had a lot of problems, before I managed to install it all properly. So I decided to write this guide for you :)

(Tested on Linux MINT 15 - MATE 64bit edition)

- Xorg   >= 1.13.4
- xrandr >= 1.3.5
- kernel  >= 3.9

UPDATE 9.2.2014: I noticed that this guide is quite deprecated and a lot of people have problems with it. So here is updated guide:

1) Perform a clean install linux.

2) Add repository for X-server updates and install all updates!

sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get upgrade

3) Update kernel to version 3.9.9

a) for 32bit OS
wget -O
chmod +x
sudo ./
b) for 64bit OS
wget -O
chmod +x
sudo ./

4) Download NVIDIA driver version 319.32 and make it executable. Next add nouveau driver to blacklist!

wget -O
chmod +x
echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo update-initramfs -u

5) Download xorg.conf to /etc/X11/ folder.
NOTE: There are already filled PCI numbers! At 90% you have the same, but check it with "lspci | grep vga" and change it, if needed!

sudo wget -O /etc/X11/xorg.conf-new

6) REBOOT system. After boot enter tty1 (Ctrl + Alt + F1). Stop mdm and install NVIDIA drivers.
NOTE: mdm is in Linux MINT. In Ubuntu use gdm instead. In other distributions it can be even lightgdm or kdm.

sudo service mdm stop
sudo ./

7) Move xorg.conf
NOTE: If something goes wrong, and you will have problem running, or this guide will just won't work for you, just remove this xorg.conf file, and reboot. Everything should be OK then.

sudo mv /etc/X11/xorg.conf-new /etc/X11/xorg.conf

8) Get your xrandr IDs. Startx on tty1(you get blackscreen), then switch to tty2 and write down your IDs.

a) tty1:
b) tty2:
xrandr -d :0 --listproviders

You should get output like this:

Provider 0: id: 700 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 70 cap: 0x2, Sink Output crtcs: 3 outputs: 4 associated providers: 1 name:modesetting

as you can see, my IDs are 700 for NVIDIA and 70 for intel.

9) Create file .xseesionrc, make it executable and open it for edditing.

touch .xsessionrc
chmod +x .xsessionrc
nano .xsessionrc

10) Write those line into .xsessionrc, but replace my IDs with yours!

xrandr --setprovideroutputsource 70 700
xrandr --auto

11) Now, when you restart, you should get black screen, don't worry there is login screen, so just wait for a sec, write your login, wait another sec, write you pass and hit enter. Now you should see desktop.

Thats it!

To check if NVIDIA is running:

inxi -GSx

you should see something like this:

X.Org: 1.13.4 driver: nvidia Resolution: 1366x768@60.0hz
             GLX Renderer: GeForce GT 630M/PCIe/SSE2 GLX Version: 4.3.0 NVIDIA 325.15 Direct Rendering: Yes
Please let me know, if something goes wrong :)