These files enable power saving on Linux. Note that these settings are applied regardless of whether the system is on battery or AC. Power saving is applied to:
- Audio card (
- Backlight brightness (
- Bluetooth (disabled completely:
- NMI watchdog (
- Writeback times (
- Laptop mode (
- Network interfaces, both wired and wireless (
- Buses (ASPM, PCI, USB, SATA ALPM,
Power saving is not applied to:
- HDD, since it is replaced with an SSD. SSD power usage is simply ignored, since I have yet to look into this (and I believe it isn't that high). Tips are welcome!
- CPU frequencies, since the default is fine (using the
- Swappiness, since I don't use a swap partition.
You might also want to edit
/etc/fstab to add
commits=<seconds> to the
options column of your
partitions. See the mount man page.
It is fit for my own laptop (Lenovo Thinkpad Edge E130), which means that this script will not work on every setup. Please check this before running it on your computer! Things might break otherwise and I am not responsible for any damage that has been done.
xsetrequires X to run. Obviously this isn't happening upon boot (and ~/.Xauthority is not present, either)
git grep TODO
- Test the suspend-on-low-battery udev rule (
- SSD powersaving?
- Apply noop schedular in powersave instead of boot config?
The script will need the following dependencies to run:
make install as root to install the whole set. Be aware that by default, this will try to
USER from the current environment. If you want to set these yourself, run
make install DPY="<display>" USR="<user>". These two variables are necessary to get the brightness
udev rule to work, see commit "Fix brightness udev rule".
To enable the ASPM setting to work, append
pcie_aspm=force to your kernel parameter list. However,
before doing so, verify that all PCIe hardware on your system support ASPM!