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 711253 - Trouble with inactive graphical session for seat0
Trouble with inactive graphical session for seat0
Status: RESOLVED NOTGNOME
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-01 11:06 UTC by Laércio de Sousa
Modified: 2014-02-20 12:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Explicitly set variable XDG_VTNR for seat0 sessions (1.38 KB, patch)
2013-11-01 11:06 UTC, Laércio de Sousa
none Details | Review
Delay non-seat0 display servers startup (1.28 KB, patch)
2013-11-06 15:56 UTC, Laércio de Sousa
none Details | Review

Description Laércio de Sousa 2013-11-01 11:06:19 UTC
Created attachment 258724 [details] [review]
Explicitly set variable XDG_VTNR for seat0 sessions

In some multiseat setups using systemd-logind (mainly those with multiple video cards and proprietary drivers), one can get an undesirable INACTIVE graphical session for seat0 (no sound, no pendrives, etc.).

An interesting dicussion about this problem can be found here: https://bugzilla.redhat.com/show_bug.cgi?id=1018196 . To summarize, due to
some race condition between seat0 and non-seat0 seats, a non-seat0 X server
can "steal" the VT expected by seat0 X server, like those defined by GDM_INITIAL_VT.

In this case, unless XDG_VTNR is explicitly defined by GDM (which is currently not done), the pam_systemd module fails to infer the correct VT for seat0 X server (i.e., the one corresponding to vtXX command line argument), returning XDG_VTNR=0 to seat0's graphic session, which causes all the trouble.

There are several approaches suggested to circumvect this problem, which involves patching GDM, systemd-logind or even X.Org server. Regarding to GDM, we have the following suggestions:

A. Set XDG_VTNR explicitly for seat0 sessions, using the value defined by GDM_INITIAL_VT.

B. Ensure that GDM will start seat0 X server before any other non-seat0 one.

C. Somehow keep non-seat0 X servers from opening GDM_INITIAL_VT before seat0 X server.

I'm uploading a patch that implements solution A above.
Comment 1 Laércio de Sousa 2013-11-06 15:56:16 UTC
Created attachment 259092 [details] [review]
Delay non-seat0 display servers startup

This alternate approach for GDM induces a small delay between seat0 and non-seat0 display servers startup (seat0 one should start first), avoiding any race condition between them. No need of setting XDG_VTNR explicitly anymore.
Comment 2 Ray Strode [halfline] 2013-11-06 16:38:15 UTC
i prefer the first approach, but it needs to use the actual VT of the X server, not just the one that's right at boot up (as per discussion on the downstream report)
Comment 3 Laércio de Sousa 2014-02-20 11:55:55 UTC
This problem is now solved using an external approach: latest xserver git version no longer touches VTs for non-seat0 seats (see http://cgit.freedesktop.org/xorg/xserver/commit/?id=46cf2a6093).

This bug can be closed for now.