After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756539 - gdm greeter tries to change brightness during session
gdm greeter tries to change brightness during session
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 758956 759414 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-10-13 23:25 UTC by Giovanni Campagna
Modified: 2018-01-10 17:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Watch IIO light sensor only while we're the active session (1.40 KB, patch)
2016-01-05 17:29 UTC, Rui Matos
committed Details | Review
power: Sync IIO light sensor values right after claiming the interface (3.24 KB, patch)
2016-01-05 17:30 UTC, Rui Matos
committed Details | Review

Description Giovanni Campagna 2015-10-13 23:25:53 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.
Comment 1 Giovanni Campagna 2015-10-15 04:41:50 UTC
On a second thought, this is probably the ambient light sensor in gnome-settings-daemon kicking off at the wrong time. Reassigning.
Comment 2 Rui Matos 2016-01-05 17:28:55 UTC
*** Bug 759414 has been marked as a duplicate of this bug. ***
Comment 3 Rui Matos 2016-01-05 17:29:04 UTC
*** Bug 758956 has been marked as a duplicate of this bug. ***
Comment 4 Rui Matos 2016-01-05 17:29:50 UTC
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.
Comment 5 Rui Matos 2016-01-05 17:30:01 UTC
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.
Comment 6 Giovanni Campagna 2016-01-05 18:04:25 UTC
Review of attachment 318267 [details] [review]:

Makes sense.
Comment 7 Giovanni Campagna 2016-01-05 18:05:03 UTC
Review of attachment 318268 [details] [review]:

Looks good.
Comment 8 Rui Matos 2016-01-06 13:57:40 UTC
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
Comment 9 mike bayer 2016-03-31 18:39:52 UTC
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)
Comment 10 Emmanuele Bassi (:ebassi) 2016-03-31 18:50:43 UTC
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]
...
Comment 11 Emmanuele Bassi (:ebassi) 2016-03-31 18:53:48 UTC
This is not an issue of the IIO sensor. This is gnome-settings-daemon trying to change inactive sessions, when it really should not.
Comment 12 Bastien Nocera 2016-04-11 15:52:07 UTC
Follow-up patches are in bug 764896. Re-marking as fixed for the patches that were here.
Comment 13 mike bayer 2016-07-11 21:29:16 UTC
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.
Comment 14 mike bayer 2016-07-11 21:40:15 UTC
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.
Comment 15 mike bayer 2016-07-21 14:35:26 UTC
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.
Comment 16 mike bayer 2016-07-21 14:50:58 UTC
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...
Comment 17 Kipp 2016-10-29 00:37:22 UTC
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)
Comment 18 Bastien Nocera 2016-10-31 13:28:18 UTC
Follow-ups were in bug 764896 and bug 773685. Bug 773685 is where the bug is being worked on right now.
Comment 19 Cédric Bellegarde 2017-05-30 16:41:52 UTC
Always happening here with Fedora 26 and GNOME 3.24.
Comment 20 Boyd Kelly 2017-09-23 21:52:27 UTC
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
Comment 21 gnomebugs 2018-01-02 02:17:21 UTC
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?
Comment 22 Bastien Nocera 2018-01-10 17:29:49 UTC
(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