Battery Laptop Optimisations on Garuda Linux
There are quite a few different ways to reduce power consumption on a laptop, most linux distros will be geared towards desktop, but I am always installing on a laptop, generally I was looking to use tlp but the options are quite bewildering and can be daunting so I was looking for something more lightweight and in fact garuda has a good starting point for this:
Table Of Contents —
—
https://forum.garudalinux.org/t/guide-old-opinion-configuring-garuda-linux-for-laptop/7685
auto-cpufreq
I chose to use auto-cpufreq and it encourages you to manually install, so:
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq && sudo ./auto-cpufreq-installer
and then I just ran the GUI version and installed the systemd unit which will be activated now on every startup.
intel_pstate=passive
There maybe other things I can do in the future, for example regarding:
intel_pstate=passive
OR
acpi_backlight=native
It looks like you put this on the end of the kernel run up at GRUB time as in my Samsung brightness fix to GRUB_CMDLINE_LINUX_DEFAULT
Garuda Welcome -> Garuda Boot Options
However on an initial test using emacs at rest the cpu was averaging around 10% and even the window navigation felt laggy. I suspect it may be conflicting with auto-cpufreq which is often the way these power-saving tools are concerned.
brightness fix
Here's what I recommend doing (both require root):
- Add acpi_backlight=native to GRUB — this prevents the ACPI video subsystem from conflicting with the native Intel backlight driver:
Run: ! sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"GRUB_CMDLINE_LINUX_DEFAULT="\1 acpi_backlight=native"' /etc/default/grub && sudo grub-mkconfig -o /boot/grub/grub.cfg
Add a udev rule so your video group can control brightness without root. Run:
echo 'ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"' | sudo tee /etc/udev/rules.d/90-backlight.rules
comes back with:
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
- After a reboot, brightness control should work. To wire up the Fn keys in Sway, add to your Sway config:
bindsym XF86MonBrightnessUp exec brightnessctl set +5% bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
The acpi_backlight=native param is the critical one — without it, the ACPI firmware keeps claiming the backlight interface and the kernel can't read or set actual values. Want me to apply the GRUB edit directly if you can run those as root in the terminal?
turning of bluetooth
Bluetooth is of course very power efficient but that I am assuming this is just the transfer protocol? what about the actual device on board?, I don't ever need to use this so it is worth considering just disabling in systemd