My main work laptop is a Thinkpad X1 Carbon running Debian 9, which usually works pretty well but I've also been procrastinating on getting it to run perfectly.
One thing I had forgotten to configure was the screen brightness keys with my
window manager i3. I had forgotten that I tried to configure it before, but got
stuck on some extremely unhelpful error messages from
this short blog post documents a workaround for the issue in case anyone else
has a similar setup.
First, the problem. The backlight on a Thinkpad with an Intel GPU can be adjusted
xbacklight command. On Debian stretch, this doesn't work so well though:
$ xbacklight -inc 10
No outputs have backlight property
Option "Backlight" "intel_backlight"
xbacklight which directory in
/sys/class/backlight should be used.
BTW, in case you want to know how to configure the key binding in i3, you can add
something like this in
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
Alternatively, I've recently started to just run parts of GNOME from i3 in order to get support for backlight (and multimedia, etc) keys working. Something like the following works on Debian stable:
# gnome compat
# see https://github.com/csxr/i3-gnome
# works with gnome 3.22, but likely needs updating with newer
# versions that split the daemon into several smaller daemons
exec --no-startup-id gnome-flashback
exec --no-startup-id gnome-settings-daemon
# policykit for password dialogs
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &