udev, systemd, laptop, power management and backlight brightness
Sat 13 December 2014
[caption id="" align="alignright" width="218" class="zemanta-img"] Laptop problem (Photo credit: Wikipedia)[/caption]
My two problems with my laptop are the following:
- I want to control the backlight brihtness of my screen even if I don't start the graphical desktop (i.e. work with tty)
- I want to be able to suspend to ram and hibernate when needed (e.g. in a train station during the connection) but I don't want my laptop to suspend to ram when the battery is almost depleted (mainly because the sensor telling it's almost depleted is not really accurate).
I use archlinux with systemd and udev.
Screen brightness
$ ls /sys/class/backlight/intel_backlight/ actual_brightness bl_power brightness device@ max_brightness power/ subsystem@ type uevent
Suspend to ram and hybernante
The power management is well documented in the archlinux wiki. If you want to add costum rules for your power management, just follow the appropriate wiki page.
Nevertheless it is hard to deactivate rules that are not explicitly described in the config files. The config files include the one for udevd, systemd, acpid, and upower. The solution I found is to disable the upower deamon: systemctl disable upower.service. Note that it may not be enough as upower can be reactivated by other deamon and thus must be explicitly stop again.
(non-)Related articles
Category: how to Tagged: ArchLinux Laptop Linux Systemd Udev tools