my Dell laptop is subject to this bug with kernel 3.14. As a workaround I wrote a simple script
#!/bin/bash echo 0 > /sys/class/backlight/intel_backlight/brightnes
(and made executable:
chmod +x /usr/bin/brightness-fix)
and a systemd service calling it that is executed at startup:
[Unit] Description=Fixes intel backlight control with Kernel 3.14 [Service] Type=forking ExecStart=/usr/bin/brightness-fix TimeoutSec=0 StandardOutput=syslog #RemainAfterExit=yes #SysVStartPriority=99 [Install] WantedBy=multi-user.target
systemctl enable /etc/systemd/system/brightness-fix.service
That works like a charm and I can control my display brightness as wanted.
The problem comes when the laptop resumes after going to sleep mode (e.g. when closing the laptop lip): brightness control doesn't work anymore unless I manually execute my fisrt script above:
How can I create another systemd service like mine above to be executed at resume time?
According to comments below I have modified my
brightness-fix.service like this:
[Unit] Description=Fixes intel backlight control with Kernel 3.14 [Service] Type=oneshot ExecStart=/usr/local/bin/brightness-fix TimeoutSec=0 StandardOutput=syslog [Install] WantedBy=multi-user.target sleep.target
also I have added
echo "$1 $2" > /home/luca/br.log to my script to check whether it is actually executed.
The script it is actually executed also at resume (
post suspend) but it has no effect (backlit is 100% and cannot be changed). I also tried logging
$USER and, at resume time, they are empty. So my guess is that the script is executed too early when waking up from sleep. Any hint?