GNOME Bugzilla – Bug 756539
gdm greeter tries to change brightness during session
Last modified: 2018-01-10 17:29:49 UTC
I found this in the logs: Oct 13 16:20:29 giovanni-macbook pkexec[30122]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 99] Oct 13 16:20:29 giovanni-macbook gnome-session[1954]: Error executing command as another user: Not authorized Oct 13 16:20:29 giovanni-macbook gnome-session[1954]: This incident has been reported. which happened during normal session usage. I think the gdm greeter is listening to logind signals about lock/unlock and trying to change the brightness or dpms even though its session is not active (and polkit correctly complains). It's not a problem per se, but probably hints to some more subtle bug.
On a second thought, this is probably the ambient light sensor in gnome-settings-daemon kicking off at the wrong time. Reassigning.
*** Bug 759414 has been marked as a duplicate of this bug. ***
*** Bug 758956 has been marked as a duplicate of this bug. ***
Created attachment 318267 [details] [review] power: Watch IIO light sensor only while we're the active session We can't change the brightness in that case but we can and should avoid any polling the IIO sensor daemon might have to do while inactive.
Created attachment 318268 [details] [review] power: Sync IIO light sensor values right after claiming the interface In case the IIO sensor daemon doesn't change the values immediately after we claim the interface, we should get them to be in sync from the start.
Review of attachment 318267 [details] [review]: Makes sense.
Review of attachment 318268 [details] [review]: Looks good.
Let me know if this doesn't fix it as I don't have the hardware to properly test. Attachment 318267 [details] pushed as 6b38a7d - power: Watch IIO light sensor only while we're the active session Attachment 318268 [details] pushed as 69c8524 - power: Sync IIO light sensor values right after claiming the interface
Hi there - Running gnome-settings-daemon-3.18.3 on Fedora 23 and am still having this issue. Hardware is an Asus Zenbook. With "Automatic Brightness" disabled, journalctl -f shows repeatedly: Mar 31 14:38:27 photon2 gnome-settings-daemon.desktop[2524]: Error executing command as another user: Not authorized Mar 31 14:38:27 photon2 gnome-settings-daemon.desktop[2524]: This incident has been reported. Mar 31 14:38:28 photon2 pkexec[8038]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 215] Mar 31 14:38:28 photon2 gnome-settings-daemon.desktop[2524]: Error executing command as another user: Not authorized Mar 31 14:38:28 photon2 gnome-settings-daemon.desktop[2524]: This incident has been reported. Mar 31 14:38:29 photon2 pkexec[8046]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 215] Mar 31 14:38:29 photon2 gnome-settings-daemon.desktop[2524]: Error executing command as another user: Not authorized Mar 31 14:38:29 photon2 gnome-settings-daemon.desktop[2524]: This incident has been reported. When it is enabled, journalctl shows: Mar 31 14:38:44 photon2 pkexec[8166]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 224] Mar 31 14:38:44 photon2 gnome-settings-daemon.desktop[2524]: Error executing command as another user: Not authorized Mar 31 14:38:44 photon2 gnome-settings-daemon.desktop[2524]: This incident has been reported. Mar 31 14:38:45 photon2 pkexec[8179]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 224] Mar 31 14:38:45 photon2 gnome-settings-daemon.desktop[2524]: Error executing command as another user: Not authorized Mar 31 14:38:45 photon2 gnome-settings-daemon.desktop[2524]: This incident has been reported. Mar 31 14:38:45 photon2 pkexec[8180]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session Mar 31 14:38:45 photon2 pkexec[8180]: pam_unix(polkit-1:session): session opened for user root by (uid=1000) Mar 31 14:38:45 photon2 audit[8180]: USER_START pid=8180 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/pkexec" hostname=? addr=? terminal=? res=success' Mar 31 14:38:45 photon2 pkexec[8180]: classic: Executing command [USER=root] [TTY=unknown] [CWD=/home/classic] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 178] Mar 31 14:38:47 photon2 pkexec[8193]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 234] Mar 31 14:38:47 photon2 gnome-settings-daemon.desktop[2524]: Error executing command as another user: Not authorized Mar 31 14:38:47 photon2 gnome-settings-daemon.desktop[2524]: This incident has been reported. Mar 31 14:38:47 photon2 pkexec[8194]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session Mar 31 14:38:47 photon2 pkexec[8194]: pam_unix(polkit-1:session): session opened for user root by (uid=1000) Mar 31 14:38:47 photon2 audit[8194]: USER_START pid=8194 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/pkexec" hostname=? addr=? terminal=? res=success' Mar 31 14:38:47 photon2 pkexec[8194]: classic: Executing command [USER=root] [TTY=unknown] [CWD=/home/classic] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 187] the brightness of the screen changes every second w/ the feature enabled also (Asus has a lot of brightness issues w/ linux)
Yep, can confirm that gnome-settings-daemon is still spamming the log trying to change the display brightness for the GDM use: Mar 31 19:48:54 marie gnome-settings-daemon.desktop[1183]: This incident has been reported. Mar 31 19:48:54 marie gnome-settings-daemon.desktop[1183]: Error executing command as another user: Not authorized Mar 31 19:48:54 marie pkexec[23816]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 102] ...
This is not an issue of the IIO sensor. This is gnome-settings-daemon trying to change inactive sessions, when it really should not.
Follow-up patches are in bug 764896. Re-marking as fixed for the patches that were here.
I'm still having this problem. Im on fedora 24 with gnome-settings-daemon-3.20.1.3 now, the patch mentioned at bug #764896 is present in the codebase.
current status is that I can stop iio-sensor-proxy, and the settings-daemon at least detects it needs to stop trying to do what it wants to do and the messages stop. Since nothing brightness related works on the Asus anyway I'll likely keep it set that way but assuming it's supposed to work, this bug should be reopened.
I've just updated some other gnome packages including gnome-shell-3.20.3, gnome-session-3.20.2, and now the problem seems to have resolved, I can leave iio-sensor-proxy running normally and I'm not seeing messages anymore. "Automatic brightness" feature still doesn't really work at all if I actually try to turn it on (no more log messages even with it on though), but that's a different issue.
correction, the problem persists. Once the desktop turns off the screen due to inactivity, and you come back to it, messages are now flooding in again normally. back to shutting off iio-sensor-proxy for me...
yes, the problem persists. I don't know if I should be worried, but the continual chewing away at my ssd's write cycles due to the fsync()ed log messages is troubling. another way to trigger the flood of log messages on my system (Panasonic CF-LX5) is to unplug the ac adapter and re-connect it. I have not tried killing iio-sensor-proxy. for me, the messages can silenced by kill -9'ing gnome-settings-daemon processes: there are two processes that need to be killed, when the second one gets killed the daemon is respawned and the messages go away until the ac cord is unplugged and reattached. for example, at first "ps -uxa | grep settings" reported Debian-+ 1449 0.0 0.2 1145484 37636 tty1 Sl+ Oct28 0:13 /usr/lib/gnome-settings-daemon/gnome-settings-daemon kipp 1791 0.0 0.2 1502248 43140 tty2 Sl+ Oct28 0:21 /usr/lib/gnome-settings-daemon/gnome-settings-daemon kipp 1861 0.0 0.0 491540 12160 tty2 Sl+ Oct28 0:00 /usr/lib/gnome-settings-daemon/gsd-printer after killing the first I see kipp 1791 0.0 0.2 1502248 43148 tty2 Sl+ Oct28 0:21 /usr/lib/gnome-settings-daemon/gnome-settings-daemon kipp 1861 0.0 0.0 491540 12160 tty2 Sl+ Oct28 0:00 /usr/lib/gnome-settings-daemon/gsd-printer Debian-+ 32159 2.7 0.1 879036 30312 tty1 Sl+ 09:24 0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon notice that the first one kill has been respawned with a new PID, but the log messages continue. then after killing the second I see Debian-+ 32159 1.0 0.1 879036 30312 tty1 Sl+ 09:24 0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon kipp 32265 4.3 0.2 1007916 38852 tty2 Sl+ 09:24 0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon kipp 32279 0.1 0.0 491540 12100 tty2 Sl+ 09:24 0:00 /usr/lib/gnome-settings-daemon/gsd-printer now second and third have respawned with new PIDs, and the log messages stop. I have the current packages from Debian testing: gnome-shell 3.22.1, gnome-settings-daemon 3.22.1, and so on (most gnome components are at 3.22.1)
Follow-ups were in bug 764896 and bug 773685. Bug 773685 is where the bug is being worked on right now.
Always happening here with Fedora 26 and GNOME 3.24.
Still a problem in F27 and GNOME 3.26.0 Sep 23 21:28:13 y2 pkexec[27036]: bkelly: Executing command [USER=root] [TTY=unk Sep 23 21:28:13 y2 pkexec[27037]: gdm: Error executing command as another user: Sep 23 21:28:13 y2 org.gnome.SettingsDaemon.Power.desktop[2871]: Error executing Sep 23 21:28:13 y2 org.gnome.SettingsDaemon.Power.desktop[2871]: This incident h Sep 23 21:28:15 y2 pkexec[27049]: pam_systemd(polkit-1:session): Cannot create s Sep 23 21:28:15 y2 pkexec[27049]: pam_unix(polkit-1:session): session opened for Sep 23 21:28:15 y2 audit[27049]: USER_START pid=27049 uid=1000 auid=1000 ses=13 Sep 23 21:28:15 y2 pkexec[27049]: bkelly: Executing command [USER=root] [TTY=unk Sep 23 21:28:15 y2 pkexec[27050]: gdm: Error executing command as another user: Sep 23 21:28:15 y2 org.gnome.SettingsDaemon.Power.desktop[2871]: Error executing Sep 23 21:28:15 y2 org.gnome.SettingsDaemon.Power.desktop[2871]: This incident h
Still a problem on Ubuntu 17.10 and GNOME 3.26.2. $ sudo journalctl -f -- Logs begin at Mon 2018-01-01 18:11:36 PST. -- Jan 01 18:15:43 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: Error executing command as another user: Not authorized Jan 01 18:15:43 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: This incident has been reported. Jan 01 18:15:44 caesar pkexec[6494]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 7425] Jan 01 18:15:44 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: Error executing command as another user: Not authorized Jan 01 18:15:44 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: This incident has been reported. Jan 01 18:15:44 caesar pkexec[6498]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 7425] Jan 01 18:15:44 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: Error executing command as another user: Not authorized Jan 01 18:15:44 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: This incident has been reported. Jan 01 18:15:44 caesar sudo[6501]: dave : TTY=pts/1 ; PWD=/home/dave ; USER=root ; COMMAND=/bin/journalctl -f Jan 01 18:15:44 caesar sudo[6501]: pam_unix(sudo:session): session opened for user root by (uid=0) Jan 01 18:15:45 caesar pkexec[6504]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 7425] Jan 01 18:15:45 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: Error executing command as another user: Not authorized Jan 01 18:15:45 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: This incident has been reported. Jan 01 18:15:46 caesar pkexec[6508]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 7425] Jan 01 18:15:46 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: Error executing command as another user: Not authorized Jan 01 18:15:46 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: This incident has been reported. Jan 01 18:15:47 caesar pkexec[6512]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 7425] Jan 01 18:15:47 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: Error executing command as another user: Not authorized Jan 01 18:15:47 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: This incident has been reported. Jan 01 18:15:48 caesar pkexec[6516]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 7425] Jan 01 18:15:48 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: Error executing command as another user: Not authorized Jan 01 18:15:48 caesar org.gnome.SettingsDaemon.Power.desktop[2372]: This incident has been reported. I can manually kill the greeter gnome-session and settings-daemon, stopping these messages and seemingly causing no other ill effects. If I logout the greeter session is respawned. Why must the greeter session be left running unnecessarily?
(In reply to gnomebugs from comment #21) <snip> > Why must the greeter session be left running unnecessarily? That's a gdm question: https://bugzilla.gnome.org/show_bug.cgi?id=747339 Another follow-up patch, on top of the one mentioned in this bug, as well as the one mentioned in comment 18, is at: https://bugzilla.gnome.org/show_bug.cgi?id=792409