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.