Power saving tweaks

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

Power saving tweaks

#1 Post by Iguleder »

Here are some power-saving tweaks you can use to increase battery life, they're very useful on netbooks. You can add these lines of code to any script that runs when Puppy boots, init scripts or /root/.xinitrc.

It makes sense to add these to .xinitrc, Puppy boots faster when power saving is disabled and once it's up, power saving is enabled :wink:

They can cause some problems, so be careful and check all default values before you apply these, just in case :)

Note: there's another trick that enables automatic suspend for USB devices that report no activity, I don't recommend it because it makes USB mice freeze :cry:

Enable power saving on wlan0:

Code: Select all

iwpriv wlan0 set_power 5
Enable power saving on multicore machines (may harm performance!):

Code: Select all

echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
Enable power saving on multi-threaded CPUs (Atom, Pentium 4 ...):

Code: Select all

echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
Enable SCSI power saving:

Code: Select all

echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
Increase dirty_writebacks from 5 seconds to 15 seconds and turn on laptop mode:

Code: Select all

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 5 > /proc/sys/vm/laptop_mode
Turn off the Bluetooth interface hci0 on boot (if you have a proper Bluetooth management applet you can turn Bluetooth on when you need it):

Code: Select all

hciconfig hci0 down
Set the brightness to 0 on boot (you can increase it manually anyway):

Code: Select all

echo 0 > /sys/class/backlight/acpi_video0/brightness
Other nice ideas:
- Set the brightness to 0 on init scripts, then set it to the default with .xinitrc.
- The same with all other tweaks.
- Make the init scripts check the battery status through /proc and /sys and enable/disable these tweaks according to it, i.e if it's at 20% or less, the script applies power saving. :idea:
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

Post Reply