Wayland+systemd GNOME Shell can't determine seat when Chrome Remote Desktop is running
Affected version
- GNOME Shell 3.36.1-5ubuntu2
- Ubuntu 20.04
- Affects Wayland GNOME Shell when launched as systemd user service
Bug summary
When launching Wayland GNOME Shell via a systemd user target/service (as happens on Ubuntu 20.04), GNOME Shell will fail to launch as it is unable to determine which seat on which to run.
Steps to reproduce
- Install Ubuntu 20.04
- Build and install GDM with gdm@32646105 applied to fix gdm#580 (closed).
- Log in and set up Chrome Remote Desktop (https://remotedesktop.google.com/)
- Reboot.
- Try to log into the "Ubuntu on Wayland" session using GDM.
What happened
Screen goes black for a moment, and then immediately returns to the login screen. (Note that launching an X11 session does work with the GDM fix applied.)
What did you expect to happen
Successfully log into "Ubuntu on Wayland" session.
Relevant logs, screenshots, screencasts etc.
Relevant log snippet:
May 18 13:34:13 rkjnsn-ubuntu2004 systemd[725]: Starting GNOME Shell on Wayland...
May 18 13:34:13 rkjnsn-ubuntu2004 systemd-logind[586]: Failed to restore VT, ignoring: Bad file descriptor
May 18 13:34:13 rkjnsn-ubuntu2004 gnome-shell[1409]: Failed to create backend: Could not get seat for session: No data available
May 18 13:34:13 rkjnsn-ubuntu2004 systemd[725]: gnome-shell-wayland.service: Failed with result 'protocol'.
May 18 13:34:13 rkjnsn-ubuntu2004 systemd[725]: Failed to start GNOME Shell on Wayland.
May 18 13:34:13 rkjnsn-ubuntu2004 systemd[725]: Dependency failed for GNOME Shell on Wayland.
I would guess what is happening is that when attempting determine the seat it should be using, GNOME Shell is enumerating all graphical sessions (not just Wayland sessions), and further is picking the oldest session to examine, which in this case is the "x11"-type PAM session started by Chrome Remote Desktop at boot. Since Chrome Remote Desktop has no seat, that would explain the failure.