[arch-general] Systemd screen brightness

Aurko Roy roy.aurko at gmail.com
Wed Aug 15 02:10:57 EDT 2012


On Wed, Aug 15, 2012 at 7:00 AM, Michael Nawrocki <zaedrake at gmail.com>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.

HTH
-- 
Aurko Roy
GPG key: 0x20C5BC31
Fingerprint:76B4 9677 15BE 731D 1949  85BA 2A31 B442 20C5 BC31


More information about the arch-general mailing list