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 772839 - When opening a wayland session, screen locks immediately
When opening a wayland session, screen locks immediately
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-10-13 07:41 UTC by François Guerraz
Modified: 2016-10-17 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-settings-daemon log with debug enabled (63.14 KB, text/plain)
2016-10-13 10:50 UTC, François Guerraz
  Details
MetaIdleMonitorNative: initialize last event timestamp (1.33 KB, patch)
2016-10-13 20:03 UTC, Rui Matos
committed Details | Review

Description François Guerraz 2016-10-13 07:41:48 UTC
When opening a wayland session, screen starts to dim as screen locks immediately, moving the mouse cancels the action, but it's annoying.
Comment 1 Rui Matos 2016-10-13 10:28:14 UTC
Can you replace your gnome-settings-daemon executable with a script that calls the real (renamed) executable with the --debug argument so that we can see what's going on in the log output ?
Comment 2 François Guerraz 2016-10-13 10:50:58 UTC
Created attachment 337573 [details]
gnome-settings-daemon log with debug enabled
Comment 3 François Guerraz 2016-10-13 12:38:23 UTC
I noticed that this doesn't not occur right after boot. Presumably it's the gnome-settings-daemon attached to gdm that times-out and triggers the screensaver when a new session is opened because AFAIK it's sharing the same wayland display. Could it be something like that?
Comment 4 Rui Matos 2016-10-13 20:01:40 UTC
I was able to reproduce now after enabling session idle (which I usually keep disabled).
Comment 5 Rui Matos 2016-10-13 20:03:16 UTC
Created attachment 337662 [details] [review]
MetaIdleMonitorNative: initialize last event timestamp

If this isn't initialized and an idle watch gets instanced before
meta_idle_monitor_native_reset_idletime() gets called, that idle watch
would get triggered as soon as we hit the main loop.

This was causing gnome-session to go into idle mode at session start
thus making gnome-shell lock the screen.

In the past this bug was being masked by either logind emiting
session active signals or a stray input event making it through at
startup.

--

I suppose this was uncovered by a logind behavior change but I'm not
sure.
Comment 6 Florian Müllner 2016-10-13 20:10:05 UTC
Review of attachment 337662 [details] [review]:

LGTM
Comment 7 François Guerraz 2016-10-15 09:09:28 UTC
Review of attachment 337662 [details] [review]:

Works for me too.
Comment 8 Rui Matos 2016-10-17 12:00:20 UTC
Attachment 337662 [details] pushed as 280e297 - MetaIdleMonitorNative: initialize last event timestamp