View Single Post
Old 04-09-08, 03:03 PM   #5
Registered User
Join Date: Nov 2006
Posts: 79
Default Re: Alternative to PerfLevelSrc (specifically for 8400M GS)

I actually updated the script slightly. There was a bug when rebooting the computer because it wasn't creating the lock until an someone was logged in. The updated script is as follows:

# A companion script to that removes/adds the lock that
# tells the script whether or not it should force the card into it's highest
# frequency every 25 seconds.  Think of it as sort of a poor mans powermizer
# manager.
# Also, see the two comments marked OPTION if you wish to save more power
# using OnDemandVBlankInterrupts and compiz.
# On Ubuntu install this script with the following commands:
# sudo install /etc/acpi/start.d
# sudo install /etc/acpi/resume.d
# sudo install /etc/acpi/ac.d
# sudo install /etc/acpi/battery.d

if on_ac_power; then
  touch /tmp/nv-power-on
  rm -f /tmp/nv-power-on

for x in /tmp/.X11-unix/*; do
	displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
	if [ x"$XAUTHORITY" != x"" ]; then
	    export DISPLAY=":$displaynum"

        if on_ac_power; then
          # OPTION: Uncomment next line  to turn on compiz vsync when the 
          # laptop is plugged in
          # su $user -c "gconftool-2 --type boolean --set /apps/compiz/general/screen0/options/sync_to_vblank 1"
          su $user -c "nvidia-settings -q all > /dev/null"
          # OPTION: Uncomment next line if you use compiz and have 
          # OnDemandVBlankInterrupts set to true in xorg.conf.  This will 
          # remove the ~60 wakeups a second that compiz causes the nvidia 
          # driver to do.
          # su $user -c "gconftool-2 --type boolean --set /apps/compiz/general/screen0/options/sync_to_vblank 0"
Unfortunately, I don't know if that is going to help you. I've only tested this on Ubuntu and don't know how the acpi subsystem works on other distros. If the script doesn't work, you should be able to create /etc/modprobe.d/options and use the PerfLevelSrc hack or, adapt the script to work properly for your distro.
shaundennie is offline   Reply With Quote