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 693910 - power: Don't change the brightness on inactive sessions
power: Don't change the brightness on inactive sessions
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other All
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
3.10
Depends on:
Blocks:
 
 
Reported: 2013-02-15 17:28 UTC by Bastien Nocera
Modified: 2017-08-11 16:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Don't change the brightness on inactive sessions (1.54 KB, patch)
2013-02-15 17:28 UTC, Bastien Nocera
committed Details | Review
power: Don't switch off screens on inactive sessions (2.08 KB, patch)
2013-03-21 14:23 UTC, Bastien Nocera
needs-work Details | Review
power: Allow disabling ALS monitoring even if inactive (1.18 KB, patch)
2017-08-11 16:12 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2013-02-15 17:28:46 UTC
.
Comment 1 Bastien Nocera 2013-02-15 17:28:48 UTC
Created attachment 236277 [details] [review]
power: Don't change the brightness on inactive sessions

Spotted by Cosimo Cecchi.
Comment 2 Cosimo Cecchi 2013-02-15 17:40:42 UTC
This seems to help but it still doesn't work consistently across user switches in my testing.
Comment 3 Bastien Nocera 2013-02-19 18:29:20 UTC
Comment on attachment 236277 [details] [review]
power: Don't change the brightness on inactive sessions

Still not complete, but that's a start. I'll have to debug this properly when I get a chance.

Attachment 236277 [details] pushed as 367d9dd - power: Don't change the brightness on inactive sessions
Comment 4 Bastien Nocera 2013-03-21 12:00:48 UTC
I believe the problem is in screensaver_signal_cb() where we don't check whether the session is active.

I'm not certain about the ordering of the SessionIsActive property changing in gnome-session and the screensaver's ActiveChanged signal.

The easiest fix would be adding:
if (!is_session_active (manager))
  return;

in screensaver_signal_cb().

Cosimo, any chance you could test this?
Comment 5 Bastien Nocera 2013-03-21 14:23:42 UTC
Created attachment 239472 [details] [review]
power: Don't switch off screens on inactive sessions

When fast-user switching, make sure that the inactive session
doesn't change the brightness levels.

This is achieved by reconfiguring the idle timeouts when the
screensaver becomes active with the session inactive, and also when
the session becomes inactive.
Comment 6 Cosimo Cecchi 2013-03-21 14:47:03 UTC
I'll test this later today.
Comment 7 Bastien Nocera 2013-03-21 14:57:02 UTC
Test packages here:
http://people.fedoraproject.org/~hadess/g-s-d-3.7-black-screen/
Comment 8 Cosimo Cecchi 2013-03-21 15:44:04 UTC
With this patch, I see a slightly different behavior (brightness is restored sometimes when logging into the new session), but it still doesn't work in all cases.
Comment 9 Bastien Nocera 2013-03-21 18:01:25 UTC
Comment on attachment 239472 [details] [review]
power: Don't switch off screens on inactive sessions

As per comment
Comment 10 Bastien Nocera 2017-08-11 16:12:15 UTC
Created attachment 357425 [details] [review]
power: Allow disabling ALS monitoring even if inactive

We definitely do want to be able to disable light sensor
monitoring even if we're not in an active session any more.

The only case this conditional was supposed to prevent is
trying to claim the light sensor when the session is inactive.
Anything else should be allowed.
Comment 11 Bastien Nocera 2017-08-11 16:35:43 UTC
The only recent versions of this problem I've seen were when the "ambient-light" was used. See bug 766067.
Comment 12 Bastien Nocera 2017-08-11 16:36:02 UTC
Comment on attachment 357425 [details] [review]
power: Allow disabling ALS monitoring even if inactive

Moved to bug 766067
Comment 13 Bastien Nocera 2017-08-11 16:38:34 UTC
Let's consider this problem solved. Please reopen if you still see this.