GNOME Bugzilla – Bug 711253
Trouble with inactive graphical session for seat0
Last modified: 2014-02-20 12:01:06 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.
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.
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)
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.