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 776203 - GDM multiseat is not compatible with recent systemd
GDM multiseat is not compatible with recent systemd
Status: RESOLVED OBSOLETE
Product: gdm
Classification: Core
Component: general
3.22.x
Other Linux
: Normal major
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-17 08:16 UTC by Oleg Samarin
Modified: 2018-05-24 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
start separate instance of dbus for each greater session in multiseat (556 bytes, patch)
2016-12-17 08:16 UTC, Oleg Samarin
none Details | Review

Description Oleg Samarin 2016-12-17 08:16:46 UTC
Created attachment 342112 [details] [review]
start separate instance of dbus for each greater session in multiseat

GDM multiseat does not more works with systemd 226 and above: the greeter scree appears only on one seat

I use:

systemd-231-10.fc25.x86_64
gdm-3.22.1-1.fc25.x86_64
gnome-session-3.22.2-1.fc25.x86_64

The reason is the following change in systemd/dbus:

-----------------------------------------------------------
systemd now supports the concept of user buses replacing
session buses, if used with dbus-1.10 (and enabled via dbus
--enable-user-session). It previously only supported this on
kdbus-enabled systems, and this release expands this to
'dbus-daemon' systems.
-----------------------------------------------------------


Gdm tries to launch gnome-session on each seat with the same username 'gdm'. With earlier systemd versions, the separate instance of dbus was started for each session. But since systemd 226 only one instance of dbus is started for the user 'gdm', so only one instance of gnome-session may work and all other gnome-sessions shut down:

----------------------------------------------------------------------
Dec 14 21:59:40 oleg2.oleghome gnome-session[4200]: gnome-session-binary[4200]: WARNING: Error getting login monitor: -13
Dec 14 21:59:40 oleg2.oleghome gnome-session-binary[4200]: WARNING: Error getting login monitor: -13
Dec 14 21:59:40 oleg2.oleghome gnome-session[4200]: gnome-session-binary[4200]: WARNING: Calling name lost callback function
Dec 14 21:59:40 oleg2.oleghome gnome-session[4200]: gnome-session-binary[4200]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 14 21:59:40 oleg2.oleghome gnome-session-binary[4200]: WARNING: Calling name lost callback function
Dec 14 21:59:40 oleg2.oleghome gnome-session-binary[4200]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
----------------------------------------------------------------------

I've maid a small patch for gdm that exclusively starts separate instance of dbus for each greater gnome-session: it replaces 'gnome-session' with 'dbus-run-session gnome-session'. After this patch multiseat works again.
Comment 1 Ray Strode [halfline] 2016-12-20 15:41:24 UTC
probably we should start each seat off from a systemd service that has DynamicUsers=yes
Comment 2 Oleg Samarin 2016-12-21 19:32:20 UTC
Starting seats from systemd instead of gdm is a good idea. But DynamicUsers=yes seems as extra. There is no problem to start dbus for each seat even by the single user.
Comment 3 Kyle 2016-12-22 03:59:05 UTC
I was wondering if I'm hitting the same bug. I'm trying to connect to Kali via Xnest (X client over tcp) but it fails.

Kali 2016.2 rolling (up to date)
dbus 1.10.14-1
systemd 232-7
gdm3 3.22.1-1

Dec 21 21:52:34 kali gdm-launch-environment][2647]: pam_unix(gdm-launch-environment:session): session opened for user Debian-gdm by (uid=0)
Dec 21 21:52:34 kali systemd[1]: Started Session c35 of user Debian-gdm.
Dec 21 21:52:34 kali systemd-logind[364]: New session c35 of user Debian-gdm.
Dec 21 21:52:34 kali gnome-session[2651]: gnome-session-is-accelerated: No composite extension.
Dec 21 21:52:34 kali gnome-session[2651]: gnome-session-check-accelerated: GL Helper exited with code 256
Dec 21 21:52:34 kali gnome-session[2651]: gnome-session-binary[2651]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:34 kali gnome-session-binary[2651]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:34 kali gdm-launch-environment][2647]: pam_unix(gdm-launch-environment:session): session closed for user Debian-gdm
Dec 21 21:52:34 kali gdm3[727]: GdmDisplay: display lasted 0.203944 seconds
Dec 21 21:52:34 kali systemd-logind[364]: Removed session c35.
Dec 21 21:52:34 kali gdm-launch-environment][2666]: pam_unix(gdm-launch-environment:session): session opened for user Debian-gdm by (uid=0)
Dec 21 21:52:34 kali systemd[1]: Started Session c36 of user Debian-gdm.
Dec 21 21:52:34 kali systemd-logind[364]: New session c36 of user Debian-gdm.
Dec 21 21:52:34 kali gnome-session[2670]: gnome-session-is-accelerated: No composite extension.
Dec 21 21:52:34 kali gnome-session[2670]: gnome-session-check-accelerated: GL Helper exited with code 256
Dec 21 21:52:34 kali gnome-session[2670]: gnome-session-binary[2670]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:34 kali gnome-session-binary[2670]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:34 kali gdm-launch-environment][2666]: pam_unix(gdm-launch-environment:session): session closed for user Debian-gdm
Dec 21 21:52:34 kali gdm3[727]: GdmDisplay: display lasted 0.223898 seconds
Dec 21 21:52:34 kali systemd-logind[364]: Removed session c36.
Dec 21 21:52:34 kali gdm-launch-environment][2685]: pam_unix(gdm-launch-environment:session): session opened for user Debian-gdm by (uid=0)
Dec 21 21:52:34 kali systemd[1]: Started Session c37 of user Debian-gdm.
Dec 21 21:52:34 kali systemd-logind[364]: New session c37 of user Debian-gdm.
Dec 21 21:52:34 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:34 kali gnome-session[2689]: gnome-session-is-accelerated: No composite extension.
Dec 21 21:52:34 kali gnome-session[2689]: gnome-session-check-accelerated: GL Helper exited with code 256
Dec 21 21:52:34 kali gnome-session[2689]: gnome-session-binary[2689]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:34 kali gnome-session-binary[2689]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:34 kali gdm-launch-environment][2685]: pam_unix(gdm-launch-environment:session): session closed for user Debian-gdm
Dec 21 21:52:34 kali gdm3[727]: GdmDisplay: display lasted 0.218747 seconds
Dec 21 21:52:34 kali systemd-logind[364]: Removed session c37.
Dec 21 21:52:34 kali gdm-launch-environment][2704]: pam_unix(gdm-launch-environment:session): session opened for user Debian-gdm by (uid=0)
Dec 21 21:52:34 kali systemd[1]: Started Session c38 of user Debian-gdm.
Dec 21 21:52:34 kali systemd-logind[364]: New session c38 of user Debian-gdm.
Dec 21 21:52:35 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:35 kali gnome-session[2708]: gnome-session-is-accelerated: No composite extension.
Dec 21 21:52:35 kali gnome-session[2708]: gnome-session-check-accelerated: GL Helper exited with code 256
Dec 21 21:52:35 kali gnome-session[2708]: gnome-session-binary[2708]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:35 kali gnome-session-binary[2708]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:35 kali gdm-launch-environment][2704]: pam_unix(gdm-launch-environment:session): session closed for user Debian-gdm
Dec 21 21:52:35 kali gdm3[727]: GdmDisplay: display lasted 0.209339 seconds
Dec 21 21:52:35 kali systemd-logind[364]: Removed session c38.
Dec 21 21:52:35 kali gdm-launch-environment][2723]: pam_unix(gdm-launch-environment:session): session opened for user Debian-gdm by (uid=0)
Dec 21 21:52:35 kali systemd[1]: Started Session c39 of user Debian-gdm.
Dec 21 21:52:35 kali systemd-logind[364]: New session c39 of user Debian-gdm.
Dec 21 21:52:35 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:35 kali gnome-session[2727]: gnome-session-is-accelerated: No composite extension.
Dec 21 21:52:35 kali gnome-session[2727]: gnome-session-check-accelerated: GL Helper exited with code 256
Dec 21 21:52:35 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:35 kali gnome-session[2727]: gnome-session-binary[2727]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:35 kali gnome-session-binary[2727]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Dec 21 21:52:35 kali gdm-launch-environment][2723]: pam_unix(gdm-launch-environment:session): session closed for user Debian-gdm
Dec 21 21:52:35 kali gdm3[727]: GdmDisplay: display lasted 0.217723 seconds
Dec 21 21:52:35 kali systemd-logind[364]: Removed session c39.
Dec 21 21:52:35 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:35 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:35 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display after 10 tries - bailing out
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display after 10 tries - bailing out
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display after 10 tries - bailing out
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:39 kali gdm3[727]: Unable to connect to display after 10 tries - bailing out
Dec 21 21:52:40 kali gdm3[727]: Unable to connect to display 192.168.2.105:1
Dec 21 21:52:40 kali gdm3[727]: Unable to connect to display after 10 tries - bailing out
Comment 4 Oleg Samarin 2016-12-22 05:23:44 UTC
Unfortunaly, the key message 'Calling name lost callback function' is logged only in debug mode. Please enable debugging in gdm.conf and repeat your test.
Comment 5 Joseph Nuzman 2017-01-04 20:39:19 UTC
I have hit the same bug, and can confirm that Oleg's patch resolves the issue on my Fedora 25 system.

gdm-3.22.1-1.fc25.x86_64
systemd-231-10.fc25.x86_64
gnome-session-3.22.2-1.fc25.x86_64
Comment 6 Ray Strode [halfline] 2017-01-04 20:46:55 UTC
Xnest won't work with GDM's login screen (which is provided by gnome-shell), you'd have better luck using Xephyr
Comment 7 Ray Strode [halfline] 2017-01-05 15:16:09 UTC
(In reply to Oleg Samarin from comment #2)
> Starting seats from systemd instead of gdm is a good idea. But
> DynamicUsers=yes seems as extra. There is no problem to start dbus for each
> seat even by the single user.

The problem is that as more and more session services become bound to systemd --user instead of the session things are going to break more and more. dbus is only one such service.

Really each greeter should be running as its own user with its own XDG_RUNTIME_DIR  it's more secure to do it that way, too.
Comment 8 mboquien 2017-01-08 18:41:38 UTC
I think I have the same issue. Is there a workaround that would not require recompiling? Also any chance to get the patch in the next 3.22 bugfix release? Thanks!
Comment 9 Joseph Nuzman 2017-01-08 19:01:33 UTC
(In reply to mboquien from comment #8)
> I think I have the same issue. Is there a workaround that would not require
> recompiling? 

A wrapper script that works around the issue is attached to the associated Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1404849
Comment 10 mboquien 2017-01-08 19:59:50 UTC
Thanks! The script appears to work. At least partially. I am running into another issue though and I do not know whether this is related. Simply, gdm on the second seat runs with X rather than Wayland. I can login but when I logout, gdm does not come back up, with a problem that looks similar to the current one if I believe the logs.

With the second seat setup:
ps aux | grep gdm
root       392  0.0  0.0 441852  8040 ?        Ssl  16:51   0:00 /usr/bin/gdm
root       410  0.0  0.0 263688  9112 ?        Sl   16:51   0:00 gdm-session-worker [pam/gdm-launch-environment]
root       412  0.3  0.0 192364 41868 ?        S    16:51   0:00 /usr/lib/xorg-server/Xorg :0 -background none -noreset -verbose 7 -logfile /dev/null -logverbose 7 -core -auth /var/run/gdm/auth-for-gdm-riFFut/database -seat seat1 -nolisten tcp
gdm        426  0.0  0.0  61144  6364 ?        Ss   16:51   0:00 /usr/lib/systemd/systemd --user
gdm        428  0.0  0.0 103380  1624 ?        S    16:51   0:00 (sd-pam)
gdm        434  0.0  0.0 186656  5068 tty1     Ssl+ 16:51   0:00 /usr/lib/gdm/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart --debug
gdm        436  0.0  0.0  39624  3452 ?        Ss   16:51   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
gdm        438  0.0  0.0  28224  1704 tty1     S+   16:51   0:00 dbus-run-session -- /usr/bin/gnome-session --autostart /usr/share/gdm/greeter/autostart --debug
gdm        439  0.0  0.0  39824  4060 tty1     S+   16:51   0:00 dbus-daemon --nofork --print-address 4 --session
gdm        440  0.0  0.0 574304 12828 tty1     Sl+  16:51   0:00 /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart --debug
gdm        449  1.4  0.2 1813692 145768 tty1   Sl+  16:51   0:01 /usr/bin/gnome-shell
gdm        480  0.2  0.1 341004 65896 tty1     Sl+  16:51   0:00 /usr/bin/Xwayland :1024 -rootless -noreset -listen 4 -listen 5 -displayfd 6
root       492  0.0  0.0 263696  8844 ?        Sl   16:51   0:00 gdm-session-worker [pam/gdm-launch-environment]
gdm        495  0.0  0.0  28224  1612 ?        Ss   16:51   0:00 dbus-run-session -- /usr/bin/gnome-session --autostart /usr/share/gdm/greeter/autostart --debug
gdm        496  0.0  0.0  39824  4004 ?        S    16:51   0:00 dbus-daemon --nofork --print-address 4 --session
gdm        497  0.0  0.0 574304 12716 ?        Sl   16:51   0:00 /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart --debug
gdm        511  0.0  0.0 344584  5812 ?        Sl   16:51   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
gdm        516  0.0  0.0  39624  3492 ?        S    16:51   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
gdm        518  0.0  0.0 221084  8240 ?        Sl   16:51   0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
gdm        526  1.2  0.1 1482716 116016 ?      Sl   16:51   0:00 /usr/bin/gnome-shell
gdm        534  0.0  0.0 344584  5736 tty1     Sl+  16:51   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
gdm        539  0.0  0.0  39624  3448 tty1     S+   16:51   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
gdm        541  0.0  0.0 221088  6140 tty1     Sl+  16:51   0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
gdm        545  0.2  0.0 814980 11500 ?        Ssl  16:51   0:00 /usr/bin/pulseaudio --daemonize=no
gdm        562  0.0  0.0 330908  8512 tty1     Sl+  16:51   0:00 /usr/lib/flatpak/xdg-permission-store
gdm        565  0.0  0.0 330908  8312 ?        Sl   16:51   0:00 /usr/lib/flatpak/xdg-permission-store
gdm        577  0.1  0.0 1020868 59656 tty1    Sl+  16:51   0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
gdm        578  0.1  0.0 895520 33692 ?        Sl   16:51   0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
gdm        590  0.0  0.0  85056  5408 ?        S    16:51   0:00 xbrlapi -q
gdm        612  0.0  0.0  85056  5408 tty1     S+   16:51   0:00 xbrlapi -q

After loginctl flush-devices and rebooting:
root       388  0.0  0.0 294364  7436 ?        Ssl  16:54   0:00 /usr/bin/gdm
root       405  0.0  0.0 263696  9004 ?        Sl   16:54   0:00 gdm-session-worker [pam/gdm-launch-environment]
gdm        410  0.0  0.0  61140  6480 ?        Ss   16:54   0:00 /usr/lib/systemd/systemd --user
gdm        411  0.0  0.0 103380  1644 ?        S    16:54   0:00 (sd-pam)
gdm        417  0.0  0.0 186656  5116 tty1     Ssl+ 16:54   0:00 /usr/lib/gdm/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart --debug
gdm        419  0.0  0.0  39624  3456 ?        Ss   16:54   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
gdm        421  0.0  0.0  28224  1580 tty1     S+   16:54   0:00 dbus-run-session -- /usr/bin/gnome-session --autostart /usr/share/gdm/greeter/autostart --debug
gdm        422  0.0  0.0  39832  4016 tty1     S+   16:54   0:00 dbus-daemon --nofork --print-address 4 --session
gdm        423  0.0  0.0 574304 12792 tty1     Sl+  16:54   0:00 /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart --debug
gdm        431  0.5  0.2 1889096 146360 tty1   Sl+  16:54   0:01 /usr/bin/gnome-shell
gdm        461  0.0  0.1 341008 65916 tty1     Sl+  16:54   0:00 /usr/bin/Xwayland :1024 -rootless -noreset -listen 4 -listen 5 -displayfd 6
gdm        508  0.0  0.0 344584  5848 tty1     Sl+  16:54   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
gdm        513  0.0  0.0  39624  3492 tty1     S+   16:54   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
gdm        515  0.0  0.0 221088  8060 tty1     Sl+  16:54   0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
gdm        519  0.0  0.0 618360 11420 ?        Ssl  16:54   0:00 /usr/bin/pulseaudio --daemonize=no
gdm        531  0.0  0.0 330908  8632 tty1     Sl+  16:54   0:00 /usr/lib/flatpak/xdg-permission-store
gdm        541  0.0  0.0 1020860 58764 tty1    Sl+  16:54   0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
gdm        558  0.0  0.0  85056  5196 tty1     S+   16:54   0:00 xbrlapi -q
Comment 11 Joseph Nuzman 2017-01-08 20:08:18 UTC
(In reply to mboquien from comment #10)
> Thanks! The script appears to work. At least partially. I am running into
> another issue though and I do not know whether this is related. Simply, gdm
> on the second seat runs with X rather than Wayland. I can login but when I
> logout, gdm does not come back up, with a problem that looks similar to the
> current one if I believe the logs.

Perhaps you're running into this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1225665

I've been running with "WaylandEnable=false" as a workaround since Fedora 22.
Comment 12 mboquien 2017-01-08 20:27:54 UTC
Thanks. That workaround works. Is there a ticket for this in the gnome bug tracker too? Note that I do not use Fedora so the issue does not appear to be distribution-specific.
Comment 13 Ray Strode [halfline] 2017-01-08 20:55:22 UTC
That latter issue may have been fixed by https://git.gnome.org/browse/gdm/commit/?id=999b2d9cd1e17f3b6f69d654862d924023ece100
Comment 14 Joseph Nuzman 2017-01-13 13:20:23 UTC
Ray, I cherry-picked that commit to gdm 3.22.1, and it does not seem to resolve the issue (GDM fails to appear on 2nd seat after login/logout, when WaylandEnable=false is commented out).
Comment 15 GNOME Infrastructure Team 2018-05-24 11:30:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdm/issues/287.