GNOME Bugzilla – Bug 693910
power: Don't change the brightness on inactive sessions
Last modified: 2017-08-11 16:38:34 UTC
.
Created attachment 236277 [details] [review] power: Don't change the brightness on inactive sessions Spotted by Cosimo Cecchi.
This seems to help but it still doesn't work consistently across user switches in my testing.
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
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?
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.
I'll test this later today.
Test packages here: http://people.fedoraproject.org/~hadess/g-s-d-3.7-black-screen/
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 on attachment 239472 [details] [review] power: Don't switch off screens on inactive sessions As per comment
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.
The only recent versions of this problem I've seen were when the "ambient-light" was used. See bug 766067.
Comment on attachment 357425 [details] [review] power: Allow disabling ALS monitoring even if inactive Moved to bug 766067
Let's consider this problem solved. Please reopen if you still see this.