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 :

#!/bin/bash        
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 :

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

Links :
http://crunchbang.org/forums/viewtopic.php?id=18919
http://www.mythtv.org/wiki/VDPAU#GPU_Power_Management
http://wiki.etechnik-rieke.de/index.php/NVidia_PowerMizer
http://www.boliston.com/2013/12/06/how-to-save-nvidia-powermizer-settings-after-reboot/
http://forum.manjaro.or/index.php?PHPSESSID=rhukrvv37dchf43thbrbq7p594&topic=7105.msg61812#msg61812
https://bbs.archlinux.org/viewtopic.php?pid=1269761
http://www.gossamer-threads.com/lists/mythtv/users/560586


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

2 comments:

  1. Besides Powermizer I also use the force-composite.

    nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

    ReplyDelete