Aurko Roy [2012.08.15 1140 +0530]: > On Wed, Aug 15, 2012 at 7:00 AM, Michael Nawrocki <zaedrake@xxxxxxxxx>wrote: > > > Hey everyone, > > > > I'm trying to get my laptop backlight keys (fn+f6/f7) to adjust the > > brightness of my toshiba laptop backlight. Previously, I had entered the > > following in my /etc/acpi/handler.sh to handle the acpi events generated > > when those keys were pressed: > > > > video/brightnessdown) > > echo $(($(cat /sys/class/backlight/acpi_video0/brightness) -1)) > > > /sys/class/backlight/acpi_video0/brightness > > ;; > > > > video/brightnessup) > > echo $(($(cat /sys/class/backlight/acpi_video0/brightness) +1)) > > > /sys/class/backlight/acpi_video0/brightness > > ;; > > > > However, as I am working on migrating to systemd, acpid no longer runs > > and hence does not handle these events. How can I write a similar > > handler into systemd? > > > > Thanks, > > > > Mike > > > > > I used to reduce my brightness using a similar command in /etc/rc.local > (/bin/echo -n 0 > /sys/class/backlight/acpi_video0/brightness) but for the > reasons that you mention this won't work anymore. I then switched to using > X's brightness handler (xbacklight -set 0) which reduces display brightness > as X starts. This is an easy solution but only works if you use X or if the > delayed reduction in brightness is acceptable to you. You can achieve the same by adding the instructions to write to /sys/class/backlight/acpi_video0/brightness to an appropriate file in tmpfiles.d. Read the section on temporary files in the systemd page on the archwiki. Cheers, Norbert