January 23, 2014

Firefox And NVidia PowerMizer

Since using elementary OS I have seen horizontal ripples when scrolling up or down with firefox. Not on all pages, but often enough to be annoying. With no other browser I had the same problem. Using different kernels and different NVidia drivers did not help, neither did starting firefox with all extensions disabled ( Menu > Help > Restart with Add-ons Disabled...). I've used all smooth scroll extensions I could find ( see this post ), but no luck.....

After some Googling I started to look at the PowerMizer option in nvidia-settings :

Setting the Preferred Mode from Adaptive to Prefer Maximum Performance ( and thereby switching from Performance Level 0 to 1 ) made all the difference !
Scrolling is fluent now...

There is only one shortcoming : after a reboot or re-login the Preferred Mode is always set back to Adaptive Mode....
In order to have the Preferred Mode set permanently to the maximum level I did the following :

Create a empty file in your Home directory, name it powermizer.sh and write the following line :

nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 > /dev/null

Right click the file and then Properties > More > Owner > select Execute as well.

Add powermizer.sh to the Startup Applications :
Applications > System Settings > Startup Applications > Add :

There is another setting in nvidia-settings which is normally disabled :
Enable GPU Fan Settings and setting the Fan 0 Speed :

For this feature we need to edit the file /etc/X11/xorg.conf and add a line :

Option    "Coolbits" "4"  under the Screen section, see http://pastebin.com/tUexFXqu

Restart X server by logging out and in again....( or reboot to be safe ).
Take notice :
Warning : the software utility you are about to enable ("utility") may cause system damage and void warranties.......

In order to have Enable GPU Fan Settings checked at login we need to add
nvidia-settings -a [gpu:0]/GPUFanControlState=1 to the file powermizer.sh, so it will look like the following lines :

nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 -a [gpu:0]/GPUFanControlState=1
> /dev/null

Links :

Update : it seems that a few tweaks in about:config of firefox could improve the scrolling behavior ( get rid of the ripple effect ) without the NVidia tweaks as described above :
layout.frame_rate.precise   false > true
layout.frame_rate                  -1 > 60

Link : https://archive.rebeccablacktech.com/g/thread/34996399

January 20, 2014

Visualize Hard Disk With GdMap

GdMap is a tool which allows to visualize disk space. Install it by typing in a terminal :

sudo apt-get install gdmap

To display directory structures cushion treemaps are used which visualize a complete folder or even the whole hard drive with one picture.

Start application by  Applications > Graphical Disk Map > File > Open ( I selected File System ) :

The larger a file is the larger is the rectangle which represents it. All files in one directory are painted within the rectangle of that directory.
The green/blue rectangle represents the directory /usr in the picture.

Links :

Mpv, A Free And Open-source General-purpose Video Player.

Mpv is a fork of mplayer2 (see former post ) and effectively its successor. Mpv stands for mpv plays videos. Notable changes from mplayer2 include removal of lots of unneeded code, better OSD ( On screen display ) rendering (using libass), support for playing URLs of popular streaming sites directly ( link ).
It supports a wide variety of video file formats, audio and video codecs, and subtitle types.

There are instructions to build mpv, but being lazy I googled for a deb-package....
Go to http://ppa.launchpad.net/cellstorm/test/ubuntu/pool/main/m/mpv/ and download the package for your architecture.

I use gdebi to install it. Search for gdebi in Software Center.
Then right click the mpv package and choose Open With Gdebi Package Installer.

You can start mpv from a terminal :

Or in Files navigate to a video, right click and choose Open With > mpv Media Player.

For a full list of options type man mpv in a terminal.

The On Screen Controller (short: OSC) is a minimal GUI integrated with mpv to offer basic mouse-controllability.

User-local settings are stored in ~/.mpv/config. The complete list of options is located here. An example.
My settings :

You can speed up the player using the GPU VDPAU API. See here and here.

My card supports VDPAU ( Nvidia GT 330 ) partially : Feature Set A.

mplayer -vc help | grep vdpau in a terminal gives :  

ffmpeg12vdpau ffmpeg    working   FFmpeg MPEG-1/2 (VDPAU)  [mpegvideo_vdpau]
ffwmv3vdpau ffmpeg    problems  FFmpeg WMV3/WMV9 (VDPAU)  [wmv3_vdpau]
ffvc1vdpau  ffmpeg    problems  FFmpeg WVC1 (VDPAU)  [vc1_vdpau]
ffh264vdpau ffmpeg    working   FFmpeg H.264 (VDPAU)  [h264_vdpau]
ffodivxvdpau ffmpeg    working   FFmpeg MPEG-4,DIVX-4/5 (VDPAU)  [mpeg4_vdpau]

Playing a mp3 :

January 12, 2014

Zram Compressed Swap

Zram (previously called compcache) can create RAM based block devices which act as swap disks. It is an experimental (staging) module of the Linux kernel since 3.2.

Pages swapped to these disks are compressed and stored in memory itself.

Compressing pages and keeping them in RAM virtually increases its capacity. It can therefore hold more pages of memory in the compressed swap than the amount of actual memory used. Typically it compresses to a 3:1 ratio. This allows more applications to fit in given amount of memory. It is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness.

Installation is simple : open Terminal and copy/paste
sudo apt-get install zram-config

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
Unpacking zram-config (from .../zram-config_0.1_all.deb) ...
Processing triggers for ureadahead ...
Setting up zram-config (0.1) ...
zram-config start/running

No need for any configuration or reboot....

To see if swap has been added :
free -m
swapon -s

The recommended amount of devices for swap is 1 per cpu core ( dev/zram[0-3] ).
Total amount is 1/2 of RAM size ( see also file /etc/init/zram-config.conf ).

I previously used a swapfile ( see here ), but replaced it with zram.

Links :

January 10, 2014

Webcore Fonts

Download webcore-fonts-3.0.tar.gz from :


Open Files and navigate to Downloads. 
Right click webcore-fonts-3.0.tar.gz and choose Open With Archive Manager.

Create in your Home directory the hidden folder .fonts and move the folder webcore-fonts into it.

Fonts can be adjusted in Applications > System Settings > Tweaks > General > Fonts




January 6, 2014

Place Chromium Cache Into RAM

Most modern browsers are heavily using cache to speedup navigation. To limit Chromium Web Browser from writing its cache to a physical disk, one can move the cache into RAM.
As a result, your navigation speed will be increased and the cache should be considered temporary and will not be saved after a reboot.

Open a Terminal and edit the file /etc/fstab :

sudo nano /etc/fstab

Add the following line :
cache-chromium /home/<user>/.cache/chromium tmpfs defaults,noatime,mode=1777 0 0

Replace <user> with your username.

Hit Ctrl+O , Enter and then Ctrl+X

Assuming Chromium is not running :

rm -r ~/.cache/chromium  ( remove chromium's cache )
mkdir ~/.cache/chromium ( create an empty cache )

To mount all file systems in /etc/fstab after adding the new line, run:

sudo mount -a

Links :

January 5, 2014

Blatte's Backgrounds, Fractal Images Free For Use As Wallpaper

Backgrounds range in size from 800x600 pixels through 2560x1600, covering most standard and widescreen resolutions. All images are high quality JPGs.
Most images are available in 11 or more different sizes. If you want to download all files of a certain size, please visit the Download Page and get the zip files via BitTorrent.

You have to agree with the Terms of Use in order to access the images.

January 2, 2014

Replacing Pantheon-Terminal With Gnome-Terminal

I prefer gnome-terminal so I installed it and removed pantheon-terminal :

sudo apt-get install gnome-terminal 
sudo apt-get purge pantheon-terminal

You can also use Software Center for these actions.

After installation gnome-terminal did not appear in slingshot-launcher....

Open a New Window As Administrator :

Navigate to /usr/share/applications and rightclick Terminal and open with Scratch :

Remove the two lines starting with OnlyShowIn ( or comment them with a # sign, the symbol # signifies a comment to be ignored when it is the first character on a line ).

To add the option Gnome-Terminal Here in the right click menu in Files :

Open a New Window As Administrator as done above and navigate to /usr/share/contractor and Create New File ( name it gnome-terminal.contract ), containing the following lines :

[Contractor Entry]
Name=Gnome-Terminal Here
Description=Open in a terminal
Exec=gnome-terminal --working-directory=%u

To make the menu in gnome-terminal invisible we need to install gconf-editor :
sudo apt-get install gconf-editor

Applications > Configuration Editor > apps > gnome-terminal >profiles > Default > uncheck default_show_menubar

To make the menu visible temporarily just press F10.