[ltp] Aggressive Powersaving
Karsten König
linux-thinkpad@linux-thinkpad.org
Thu, 25 Feb 2010 22:38:15 +0100
Thanks alot,
it looks similar to the actions suggested by powertop, neat!
I guess the mouse section is specific to your setup, why do you switch it off
that way and not just pull out the cable?
Karsten
Am Dienstag, 9. Februar 2010 14:28:33 schrieb Pedro Ribeiro:
> 2010/2/9 Karsten König <remur@gmx.net>:
> > Heya,
> >
> > the new kernels really brought down the power consumption and I am
> > interested in getting it a little bit further, on the road I don't use =
my
> > DVD drive nor ExpressCard nor USB nor Firewire nor Touchpad, is there a
> > way to cleany cut the power to these devices/buses?
> >
> > I don't know about VGA and modem, but I think they aren't that easy
> > accessible because they are part of the graphics driver and alsa (it do=
es
> > drive the winmodem right?)
> >
> > Or is there nothing to gain? I noticed pulling out the dvd drive was
> > ~0.5W less, so I take it getting the other stuff offline might be nice
> > too.
> >
> > I don't mind echos to some sysfs file, the simpler the better, I just
> > want to make a small script which I can run as root to just get power
> > down aggressivly.
> >
> >
> > Thanks for your ideas,
> > Karsten
> > --
> > The linux-thinkpad mailing list home page is at:
> > http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
>
> Hi Carsten,
>
> I use the script below and I'm able to get -1.5w . Some parts are in
> portuguese, but they are understandable.
>
> You can grab the ultrabay DVD eject script off thinkwiki. When you
> want to power it on again, you can just press the eject button.
>
> --------------------------------------------------------
>
> FindMouseAndSuspend()
> {
> local mouse_location
>
> if [ `cat /sys/bus/usb/devices/6-2/manufacturer | grep Logitech` ]
> then
> mouse_location="6-2"
> else if [ `cat /sys/bus/usb/devices/6-1/manufacturer | grep Logitech` ]
> then
> mouse_location="6-1"
> else if [ `cat /sys/bus/usb/devices/2-1/manufacturer | grep Logitech`=
]
> then
> mouse_location="2-1"
> fi
> fi
> fi
>
> if [ $mouse_location ]
> then
> echo 60 > /sys/bus/usb/devices/$mouse_location/power/autosuspend
> echo auto > /sys/bus/usb/devices/$mouse_location/power/level
> fi
> }
>
> FindMouseAndDisableSuspend()
> {
> if [ `cat /sys/bus/usb/devices/6-2/manufacturer | grep Logitech` ]
> then
> mouse_location="6-2"
> else if [ `cat /sys/bus/usb/devices/6-1/manufacturer | grep Logitech` ]
> then
> mouse_location="6-1"
> else if [ `cat /sys/bus/usb/devices/2-1/manufacturer | grep Logitech`=
]
> then
> mouse_location="2-1"
> fi
> fi
> fi
> if [ $mouse_location ]
> then
> echo on > /sys/bus/usb/devices/$mouse_location/power/level
> fi
> }
>
> sleep 5.0s
>
> # Auto suspends usb camera
> echo auto > /sys/bus/usb/devices/1-6/power/level
>
> # disable ao bluetooth
> echo disable > /proc/acpi/ibm/bluetooth
>
> if acpi -a | grep 'off-line'
> then
>
> # disable ao wake on lan
> ethtool -s eth0 wol d
>
> # ejecta a ultrabay
> /usr/local/sbin/ultrabay_eject
>
> # suspende o rato
> FindMouseAndSuspend
>
> # manda foder o firewire
> #modprobe -r firewire_ohci
> modprobe -r ohci1394
>
> # desliga o som após 10 segundos de inactividade
> echo 10 > /sys/module/snd_hda_intel/parameters/power_save
>
> # liga o acoustic power management
> hdparm -M 128 /dev/sda
>
> # activa o laptop mode
> echo 5 > /proc/sys/vm/laptop_mode
>
> # ... e os parametros da VM
> echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
>
> # poe o SATA ALPM a min power
> echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
> exit 0
> else
>
> # disable ao mouse suspend
> FindMouseAndDisableSuspend
>
> # desliga o powersaving do som
> echo 0 > /sys/module/snd_hda_intel/parameters/power_save
>
> # desliga o acoustic power management
> hdparm -M 254 /dev/sda
>
> # desactiva o laptop mode
> echo 0 > /proc/sys/vm/laptop_mode
>
> # ... e restaura os parametros por default da VM
> echo 500 > /proc/sys/vm/dirty_writeback_centisecs
>
> # poe o SATA ALPM de volta a performance
> echo max_performance >
> /sys/class/scsi_host/host0/link_power_management_policy exit 0
> fi
>