Bug#1059245: gdm3: GDM3 fails to start on Wayland, maybe due to org.freedesktop.systemd1 failing to activate

2024-04-22 Thread Olivier Mehani
Package: gdm3
Version: 45.0.1-3
Followup-For: Bug #1059245

Dear Maintainer,


I have just had the same bug happen on a different machine after an 
upgrade.

See attached apt history for the differences in packages before/after 
the issue appeared.

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

apt-get dist-upgrade

   * What exactly did you do (or not do) that was effective (or
 ineffective)?

Forced Xorg, rather than Wayland (with WaylandEnable=true), but neither 
work, same as for the original issue.

   * What was the outcome of this action?

GDM failed to start.

   * What outcome did you expect instead?

GDM starts.

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.6.15-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gdm3 depends on:
ii  accountsservice   23.13.9-6
ii  adduser   3.137
ii  dbus [default-dbus-system-bus]1.14.10-4
ii  dbus-bin  1.14.10-4
ii  dbus-daemon   1.14.10-4
ii  dconf-cli 0.40.0-4+b1
ii  dconf-gsettings-backend   0.40.0-4+b1
ii  debconf [debconf-2.0] 1.5.86
ii  gir1.2-gdm-1.045.0.1-3
ii  gnome-session [x-session-manager] 45.0-2
ii  gnome-session-bin 45.0-2
ii  gnome-session-common  45.0-2
ii  gnome-settings-daemon 46~beta-2
ii  gnome-shell   44.9-1
ii  gnome-terminal [x-terminal-emulator]  3.51.90-1
ii  gsettings-desktop-schemas 46.0-1
ii  libaccountsservice0   23.13.9-6
ii  libaudit1 1:3.1.2-2
ii  libc6 2.37-15
ii  libcanberra-gtk3-00.30-11
ii  libcanberra0  0.30-11
ii  libgdk-pixbuf-2.0-0   2.42.10+dfsg-3+b1
ii  libgdm1   45.0.1-3
ii  libglib2.0-0  2.78.4-1
ii  libglib2.0-bin2.78.4-1
ii  libgtk-3-03.24.41-1
ii  libgudev-1.0-0238-3
ii  libkeyutils1  1.6.3-3
ii  libpam-modules1.5.2-9.1+b1
ii  libpam-runtime1.5.2-9.1
ii  libpam-systemd [logind]   255.4-1
ii  libpam0g  1.5.2-9.1+b1
ii  librsvg2-common   2.54.7+dfsg-2
ii  libselinux1   3.5-2
ii  libsystemd0   255.4-1
ii  libx11-6  2:1.8.7-1
ii  libxau6   1:1.0.9-1
ii  libxcb1   1.15-1
ii  libxdmcp6 1:1.1.2-3
ii  mutter [x-window-manager] 44.8-3
ii  polkitd   124-1
ii  procps2:4.0.4-4
ii  systemd-sysv  255.4-1
ii  ucf   3.0043+nmu1
ii  x11-common1:7.7+23
ii  x11-xserver-utils 7.7+10

Versions of packages gdm3 recommends:
ii  at-spi2-core   2.50.0-1+b1
ii  desktop-base   12.0.6+nmu1
ii  gnome-session [x-session-manager]  45.0-2
ii  x11-xkb-utils  7.7+8
ii  xserver-xephyr 2:21.1.12-1
ii  xserver-xorg   1:7.7+23
ii  zenity 4.0.1-1

Versions of packages gdm3 suggests:
pn  libpam-fprintd
ii  libpam-gnome-keyring  42.1-1+b2
pn  libpam-pkcs11 
pn  libpam-sss
ii  orca  46.1-1

-- Configuration Files:
/etc/gdm3/daemon.conf changed:
[daemon]
WaylandEnable=false
[security]
[xdmcp]
[chooser]
[debug]
Enable=true


-- debconf information:
* shared/default-x-display-manager: gdm3
  gdm3/daemon_name: /usr/sbin/gdm3

*** /home/shtrom/apt_history_gdm_issue.log

Start-Date: 2024-04-20  20:59:25
Commandline: apt-get -y upgrade
Requested-By: shtrom (1000)
Upgrade: dpkg:amd64 (1.22.2, 1.22.4), fontconfig:amd64 (2.14.2-6, 2.15.0-1.1), 
libvulkan1:amd64 (1.3.268.0-1, 1.3.275.0-1), libvulkan1:i386 (1.3.268.0-1, 
1.3.275.0-1), reportbug:amd64 (12.0.0, 13.0.1), libsvtav1enc1d1:amd64 
(1.7.0+dfsg-2, 1.7.0+dfsg-2+b1), libsvtav1enc1d1:i386 (1.7.0+dfsg-2, 
1.7.0+dfsg-2+b1), libbox2d2:amd64 (2.4.1-3, 2.4.1-3+b2), 
libgucharmap-2-90-7:amd64 (1:15.1.2-1, 1:15.1.2-1+b1), libsphinxbase3:amd64 
(0.8+5prealpha+1-16+b1, 0.8+5prealpha+1-16+b2), 

Bug#1059245: gdm3: GDM3 fails to start on Wayland, maybe due to org.freedesktop.systemd1 failing to activate

2023-12-26 Thread Olivier Mehani
Package: gdm3
Version: 45.0.1-2
Followup-For: Bug #1059245

Thanks for the reply, Simon.

I have done some more investigation, comparing to a freshly installed 
VM, and see this difference in the debug logs of gdm-wayland-session, 
which seems to be what misbehaves in my previous logs.

  $ sudo journalctl -t gdm-wayland-session
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: Gdm: Enabling debugging
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: Gdm: Running session 
message bus
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: GLib: g_unix_open_pipe() 
called with FD_CLOEXEC; please migrate to using O_CLOEXEC instead
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: GLib: g_unix_open_pipe() 
called with FD_CLOEXEC; please migrate to using O_CLOEXEC instead
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: Gdm: could not fetch 
environment: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process 
org.freedesktop.systemd1 exited with status 1
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: Gdm: Running wayland 
session
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: GLib: g_unix_open_pipe() 
called with FD_CLOEXEC; please migrate to using O_CLOEXEC instead
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: GLib-GIO: Using 
cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus 
< 2.73.3)
  Dec 26 14:01:56 desktop gdm-wayland-session[1469]: Gdm: Could not register 
display: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Aucun affichage 
disponible

This compared to a healthier test VM

  $ sudo journalctl -t gdm-wayland-session
  Dec 26 07:29:00 test-vm gdm-wayland-session[2232]: Gdm: Enabling debugging
  Dec 26 07:29:00 test-vm gdm-wayland-session[2232]: Gdm: Running session 
message bus
  Dec 26 07:29:00 test-vm gdm-wayland-session[2232]: GLib-GIO: Using 
cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus 
< 2.73.3)
  Dec 26 07:29:00 test-vm gdm-wayland-session[2232]: Gdm: session message bus 
already running, not starting another one
  Dec 26 07:29:00 test-vm gdm-wayland-session[2232]: Gdm: Running wayland 
session
  Dec 26 07:29:00 test-vm gdm-wayland-session[2232]: GLib-GIO: Using 
cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus 
< 2.73.3)
  Dec 26 07:29:00 test-vm gdm-wayland-session[2232]: Gdm: gdm-wayland-session: 
Session will register itself

So the error seems to be that “Aucun affichange disponible” (No display 
available), so this would confirm the permission issue somewhere. I 
indeed can't see a running Xwayland on the impacted system.


-- System Information:
Debian Release: 12.4
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-15-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=en_AU (charmap=UTF-8) (ignored: LC_ALL set 
to en_AU.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gdm3 depends on:
ii  accountsservice   22.08.8-6
ii  adduser   3.134
ii  dbus [default-dbus-system-bus]1.14.10-1~deb12u1
ii  dbus-bin  1.14.10-1~deb12u1
ii  dbus-daemon   1.14.10-1~deb12u1
ii  dconf-cli 0.40.0-4
ii  dconf-gsettings-backend   0.40.0-4
ii  debconf [debconf-2.0] 1.5.82
ii  gir1.2-gdm-1.045.0.1-2
ii  gnome-session [x-session-manager] 43.0-1+deb12u1
ii  gnome-session-bin 43.0-1+deb12u1
ii  gnome-session-common  43.0-1+deb12u1
ii  gnome-settings-daemon 43.0-4
ii  gnome-shell   43.9-0+deb12u1
ii  gnome-terminal [x-terminal-emulator]  3.46.8-1
ii  gsettings-desktop-schemas 43.0-1
ii  libaccountsservice0   22.08.8-6
ii  libaudit1 1:3.0.9-1
ii  libc6 2.36-9+deb12u3
ii  libcanberra-gtk3-00.30-10
ii  libcanberra0  0.30-10
ii  libgdk-pixbuf-2.0-0   2.42.10+dfsg-1+b1
ii  libgdm1   45.0.1-2
ii  libglib2.0-0  2.78.3-1
ii  libglib2.0-bin2.78.3-1
ii  libgtk-3-03.24.38-2~deb12u1
ii  libgudev-1.0-0237-2
ii  libkeyutils1  1.6.3-2
ii  libpam-modules1.5.2-6+deb12u1
ii  libpam-runtime1.5.2-6+deb12u1
ii  libpam-systemd [logind]   252.19-1~deb12u1
ii  libpam0g  1.5.2-6+deb12u1
ii  librsvg2-common   2.54.7+dfsg-1~deb12u1
ii  libselinux1   3.4-1+b6
ii  libsystemd0   

Bug#1059245: gdm3: GDM3 fails to start on Wayland, maybe due to org.freedesktop.systemd1 failing to activate

2023-12-22 Thread Simon McVittie
On Fri, 22 Dec 2023 at 03:23:21 +0100, Olivier Mehani wrote:
> GDM3 doesn't seem to be able to start a Wayland session (nor a fallback Xorg 
> session, but I'm less concerned about this, and this seems to be a 
> separate permission issue).

That's a valid bug, let's leave your report open for that.

If neither Wayland nor Xorg works, that would suggest (to me, at least)
that this is a lower-level issue, indeed perhaps involving permissions
as you say.

> This seems to be related to 
> org.freedesktop.systemd1 failing to activate (and triggering the 
> fallback to Xorg).

I don't think this is necessarily the root cause, though.

> The smoking gun implicating org.freedesktop.systemd1 is
> 
>   déc. 22 03:17:17 desktop gdm-launch-environment][28769]: 
> pam_unix(gdm-launch-environment:session): session opened for user 
> Debian-gdm(uid=113) by (uid=0)
>   déc. 22 03:17:17 desktop /usr/libexec/gdm-wayland-session[28792]: 
> dbus-daemon[28792]: [session uid=113 pid=28792] Activating service 
> name='org.freedesktop.systemd1' requested by ':1.0' (uid=113 pid=28785 
> comm="/usr/libexec/gdm-wayland-session dbus-run-session ")
>   déc. 22 03:17:17 desktop /usr/libexec/gdm-wayland-session[28792]: 
> dbus-daemon[28792]: [session uid=113 pid=28792] Activated service 
> 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited 
> with status 1

Even though it looks bad at first glance, this could actually be fine. gdm
can run more than one "greeter" (login prompt) under the same uid, so it
intentionally avoids the mechanism that would normally result in having
one `dbus-daemon --session` per uid. Instead, it uses dbus-run-session(1)
to launch one `dbus-daemon --session` per greeter.

The result is that gdm-wayland-session tries to contact `systemd --user`,
which fails with exit status 1, because
/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service
contains:

Exec=/bin/false

(it is not possible to start a `systemd --user` when already inside a
session that does not already have one).

I get similar messages on a fully-working system, in this case a virtual
machine running bookworm and GNOME, without anything being obviously broken:

Dec 22 14:38:53 d12gnome /usr/libexec/gdm-wayland-session[691]: 
dbus-daemon[691]: [session uid=113 pid=691] Activating
 service name='org.freedesktop.systemd1' requested by ':1.10' (uid=113 pid=851 
comm="/usr/libexec/gsd-sharing")
Dec 22 14:38:53 d12gnome /usr/libexec/gdm-wayland-session[691]: 
dbus-daemon[691]: [session uid=113 pid=691] Activated service 
'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with 
status 1
Dec 22 14:38:53 d12gnome gsd-sharing[851]: Failed to StopUnit service: 
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process 
org.freedesktop.systemd1 exited with status 1
Dec 22 14:38:53 d12gnome gsd-sharing[851]: Failed to StopUnit service: 
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process 
org.freedesktop.systemd1 exited with status 1
Dec 22 14:38:53 d12gnome gnome-shell[727]: Error looking up permission: 
GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
Dec 22 14:38:53 d12gnome org.gnome.Shell.desktop[783]: Failed to initialize 
glamor, falling back to sw
Dec 22 14:38:53 d12gnome /usr/libexec/gdm-wayland-session[691]: 
dbus-daemon[691]: [session uid=113 pid=691] Activating service 
name='org.gtk.vfs.Daemon' requested by ':1.25' (uid=113 pid=885 
comm="ibus-daemon --panel disable")

So I think you might need to look elsewhere for the root cause of the gdm
session not starting successfully.

smcv



Bug#1059245: gdm3: GDM3 fails to start on Wayland, maybe due to org.freedesktop.systemd1 failing to activate

2023-12-21 Thread Olivier Mehani
Package: gdm3
Version: 45.0.1-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

GDM3 doesn't seem to be able to start a Wayland session (nor a fallback Xorg 
session, but I'm less concerned about this, and this seems to be a 
separate permission issue). This seems to be related to 
org.freedesktop.systemd1 failing to activate (and triggering the 
fallback to Xorg).

The smoking gun implicating org.freedesktop.systemd1 is

  déc. 22 03:17:17 desktop gdm-launch-environment][28769]: 
pam_unix(gdm-launch-environment:session): session opened for user 
Debian-gdm(uid=113) by (uid=0)
  déc. 22 03:17:17 desktop /usr/libexec/gdm-wayland-session[28792]: 
dbus-daemon[28792]: [session uid=113 pid=28792] Activating service 
name='org.freedesktop.systemd1' requested by ':1.0' (uid=113 pid=28785 
comm="/usr/libexec/gdm-wayland-session dbus-run-session ")
  déc. 22 03:17:17 desktop /usr/libexec/gdm-wayland-session[28792]: 
dbus-daemon[28792]: [session uid=113 pid=28792] Activated service 
'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with 
status 1
  déc. 22 03:17:17 desktop /usr/libexec/gdm-wayland-session[28785]: Unable to 
register display with display manager
  déc. 22 03:17:17 desktop gdm-launch-environment][28769]: 
pam_unix(gdm-launch-environment:session): session closed for user Debian-gdm

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

Rebooting the machine after a long uptime and some updates. This was 
with gdm3-43 on bookworm; the same is observed after installing gdm3-45 from 
testing.

libgdm1:amd64 (43.0-3) was updated on 2023-10-10 via unattended 
upgrades, but the system successfully rebooted a few times since then.

   * What exactly did you do (or not do) that was effective (or
 ineffective)?

* Re-rebooting the machine.
* Making sure that the the system was not in degraded mode according to systemd 
(systemctl stop and systemctl reset-failed).
* Configuring the Wi-Fi network with nmcli (in addition to pre-existing 
functional ethernet connectivity, just in case some network dependency blocked 
the org.freedesktop.systemd1 activatio)
* Installing gdm3-45 from testing

   * What was the outcome of this action?

Nothing fixed the issue.

   * What outcome did you expect instead?

Getting a graphical login prompt.

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 12.4
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-15-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF8, LC_CTYPE=fr_FR.UTF8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gdm3 depends on:
ii  accountsservice   22.08.8-6
ii  adduser   3.134
ii  dbus [default-dbus-system-bus]1.14.10-1~deb12u1
ii  dbus-bin  1.14.10-1~deb12u1
ii  dbus-daemon   1.14.10-1~deb12u1
ii  dconf-cli 0.40.0-4
ii  dconf-gsettings-backend   0.40.0-4
ii  debconf [debconf-2.0] 1.5.82
ii  gir1.2-gdm-1.045.0.1-1
ii  gnome-session [x-session-manager] 43.0-1+deb12u1
ii  gnome-session-bin 43.0-1+deb12u1
ii  gnome-session-common  43.0-1+deb12u1
ii  gnome-settings-daemon 43.0-4
ii  gnome-shell   43.9-0+deb12u1
ii  gnome-terminal [x-terminal-emulator]  3.46.8-1
ii  gsettings-desktop-schemas 43.0-1
ii  libaccountsservice0   22.08.8-6
ii  libaudit1 1:3.0.9-1
ii  libc6 2.36-9+deb12u3
ii  libcanberra-gtk3-00.30-10
ii  libcanberra0  0.30-10
ii  libgdk-pixbuf-2.0-0   2.42.10+dfsg-1+b1
ii  libgdm1   45.0.1-1
ii  libglib2.0-0  2.78.3-1
ii  libglib2.0-bin2.78.3-1
ii  libgtk-3-03.24.38-2~deb12u1
ii  libgudev-1.0-0237-2
ii  libkeyutils1  1.6.3-2
ii  libpam-modules1.5.2-6+deb12u1
ii  libpam-runtime1.5.2-6+deb12u1
ii  libpam-systemd [logind]   252.19-1~deb12u1
ii  libpam0g  1.5.2-6+deb12u1
ii  librsvg2-common   2.54.7+dfsg-1~deb12u1
ii  libselinux1   3.4-1+b6
ii  libsystemd0   252.19-1~deb12u1
ii  libx11-6  2:1.8.4-2+deb12u2
ii  libxau6   1:1.0.9-1
ii  libxcb1   1.15-1
ii  libxdmcp6