Resolvido!
$ find /sys -name "max_brightness"
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/leds/phy0-led/max_brightness
/sys/devices/platform/dell-laptop/backlight/dell_backlight/max_brightness
$ cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
4648
$ sudo bash -c 'echo 2000 >> /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness'
# note that now it is brightness - not max_brightness
Isso muda o brilho imediatamente! Como antes.
No entanto, ainda não sei o que estava errado.
Editar
A solução pode ser facilmente roteirizada. O único inconveniente - requer root, e não tenho idéia de como configurar o PolicyKit para fazer isso sem ele.
Editar 2 :
Estou usando o seguinte script. Ele possui dois valores codificados: Max
e BrightnessFile
encontrados nas linhas 17 e 18:
#!/bin/bash
# to get description use the -h flag
# exit after a single error:
set -e
# ================
## default values:
Inc=
Dec=
Set=
Get=false
Max=4648 # max_brightness
BrightnessFile=/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness
Current='cat $BrightnessFile'
# ===========
## preambula:
PROGNAME=${0##*/}
PROGVERSION=0.01
noColors=false
usage()
{
cat << EO
usage: $PROGNAME [OPTIONS...]
Changes brightness of the laptop.
The value of the max brightness depends on the hardware, and is hardcoded. On my machine it is 4648:
$ find /sys -name "max_brightness"
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/leds/phy0-led/max_brightness
/sys/devices/platform/dell-laptop/backlight/dell_backlight/max_brightness
$ cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
4648
Requires superuser privilages.
Examples:
Increase brightness by 10 percents:
$PROGNAME --inc 10
Decrease brightness by 10 percents:
$PROGNAME --dec 10
Set brightness to 10 percents:
$PROGNAME --set 10
optional arguments:
EO
cat << EO | column -s\& -t
-i, --inc & increase brightness (in percents)
-d, --dec & decrease brightness (in percents)
-s, --set & set brightness (in percents)
-g, --get & print current value (in percents)
-G, --GUI & ask password with kdialog
-h, --help & show this output
-v, --version & show version information
EO
}
SHORTOPTS="hvi:d:s:g"
LONGOPTS="help,version,inc:,dec:,set:get"
ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@")
eval set -- "$ARGS"
while true; do
case in
-i|--inc)
Inc=; shift;;
-d|--dec)
Dec=; shift;;
-s|--set)
Set=; shift;;
-g|--get)
Get=true;;
-h|--help)
usage; exit 0;;
-v|--version)
echo "$PROGVERSION"; exit 0;;
--)
shift; break;;
*)
shift; break;;
esac
shift
done
# =========
## program:
if $Get; then
CurrentRelVal='bc <<< "$Current*100/$Max"'
echo "Current brightness: $CurrentRelVal%"
exit 0
elif [ -n "$Inc" -a $Inc -eq $Inc 2>/dev/null ]; then
IncAbsVal='bc <<< "$Current+$Inc*$Max/100"'
sudo bash -c "echo $IncAbsVal >> $BrightnessFile"
exit
elif [ -n "$Dec" -a $Dec -eq $Dec 2>/dev/null ]; then
DecAbsVal='bc <<< "$Current-$Dec*$Max/100"'
sudo bash -c "echo $DecAbsVal >> $BrightnessFile"
exit 0
elif [ -n "$Set" -a $Set -eq $Set 2>/dev/null ]; then
SetAbsVal='bc <<< "$Set*$Max/100"'
sudo bash -c "echo $SetAbsVal >> $BrightnessFile"
exit 0
else
usage
fi