On Wed, 2016-12-07 at 17:40 +0100, Vincent Bernat wrote: > ❦ 7 décembre 2016 16:07 GMT, Ben Hutchings <ben@decadent.org.uk> : > > > > It would be interesting to know how (and it explains why the problem > > > was not raised earlier). > > > > It's using the DBus interface org.gnome.SettingsDaemon.Power.Screen: > > > > https://sources.debian.net/src/gnome-shell/3.22.2-1/js/ui/status/brightness.js/?hl=14 > > > > This is implemented by gnome-settings-daemon (for Linux only) by > > spawning /usr/lib/gnome-settings-daemon/gsd-backlight-helper (!) which > > finds a backlight device through sysfs and then reads or writes its > > brightness attribute: > > > > https://sources.debian.net/src/gnome-settings-daemon/3.22.1-1/plugins/power/gsd-backlight-helper.c/ > > https://sources.debian.net/src/gnome-settings-daemon/3.22.1-1/plugins/power/gsd-backlight-linux.c/ > > Thanks for the investigation! > > Does gsd-backlight-helper is running as root? The brightness attribute > (/sys/class/backlight/intel_backlight/brightness) is writable only by > root. Yes, gnome-settings-daemon uses pkexec to run it as root when setting brightness: https://sources.debian.net/src/gnome-settings-daemon/3.22.1-1/plugins/power/gpm-common.c/?hl=407#L407 Ben. -- Ben Hutchings When in doubt, use brute force. - Ken Thompson
Attachment:
signature.asc
Description: This is a digitally signed message part