XWayland applications fail to start
Note: I previously submitted this issue to the Arch Linux bugtracker, find it here.
Affected version
This issue only occurs under Wayland.
$ gnome-shell --version
GNOME Shell 40.1
$ uname -a
Linux hyacinth 5.12.3-arch1-1 #1 SMP PREEMPT Wed, 12 May 2021 17:54:18 +0000 x86_64 GNU/Linux
$ lsb_release -a
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
Bug summary
When attempting to launch an X application in GNOME on Wayland, the application fails to start. Attempting to run one from a terminal shows no output and hangs indefinitely.
This affects Firefox, Chrome, Emacs etc. Firefox launches and functions normally when run as
$ GDK_BACKEND=wayland firefox
which suggests the issue is with XWayland. Downgrading to gnome-shell 40.0.1 fixes the issue.
Steps to reproduce
- Launch gnome-shell on Wayland. I do this from a tty, but other methods likely work:
$ export XDG_SESSION_TYPE=wayland
$ dbus-run-session gnome-session
- Attempt to open an X-only application (e.g. Emacs, xterm, etc.)
What happened
An indicator appears in the top bar that the application is launching, but then disappears. The application does not open.
What did you expect to happen
The application should launch normally via XWayland.
Relevant logs, screenshots, screencasts etc.
Output of strace xterm
:
execve("/usr/bin/xterm", ["xterm"], 0x7fff8f7763d0 /* 52 vars */) = 0
[...a bunch of mmap/mprotect/etc calls to load the executable...]
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
sysinfo({uptime=89724, loads=[73440, 59424, 58976], totalram=16463568896, freeram=3327610880, sharedram=272666624, bufferram=1307860992, totalswap=0, freeswap=0, procs=537, totalhigh=0, freehigh=0, mem_unit=1}) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X0"}, 20
[the process hangs here]
Messages from the system journal that may be relevant:
May 14 23:00:52 hyacinth gnome-session[246043]: gnome-session-binary[246043]: WARNING: Failed to upload environment to systemd: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
May 14 23:00:52 hyacinth gnome-session-binary[246043]: WARNING: Failed to upload environment to systemd: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
May 14 23:00:52 hyacinth gnome-session[246043]: gnome-session-binary[246043]: WARNING: Failed to reset failed state of units: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
May 14 23:00:52 hyacinth gnome-session[246043]: gnome-session-binary[246043]: WARNING: Falling back to non-systemd startup procedure due to error: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
May 14 23:00:52 hyacinth gnome-session-binary[246043]: WARNING: Failed to reset failed state of units: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
May 14 23:00:52 hyacinth gnome-session-binary[246043]: WARNING: Falling back to non-systemd startup procedure due to error: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
May 14 23:00:52 hyacinth gnome-session[246043]: gnome-session-binary[246043]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
May 14 23:00:52 hyacinth gnome-session-binary[246043]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
May 14 23:00:52 hyacinth gnome-shell[246153]: Adding device '/dev/dri/card0' (i915) using atomic mode setting.
May 14 23:00:52 hyacinth gnome-shell[246153]: Boot VGA GPU /dev/dri/card0 selected as primary
May 14 23:00:53 hyacinth gnome-shell[246153]: Using public X11 display :0, (using :1 for managed services)
May 14 23:00:53 hyacinth gnome-shell[246153]: Using Wayland display name 'wayland-0'
May 14 23:00:53 hyacinth org.gnome.Shell.desktop[246186]: glamor: No eglstream capable devices found
May 14 23:00:53 hyacinth gnome-shell[246153]: Skipping parental controls support as it’s disabled
May 14 23:00:53 hyacinth gnome-shell[246153]: Failed to launch ibus-daemon: Failed to execute child process “ibus-daemon” (No such file or directory)
May 14 23:00:53 hyacinth dbus-daemon[507]: [system] Activating via systemd: service name='org.freedesktop.GeoClue2' unit='geoclue.service' requested by ':1.441' (uid=1000 pid=246153 comm="/usr/bin/gnome-shell ")
May 14 23:00:53 hyacinth polkitd[1354]: Registered Authentication Agent for unix-session:4 (system bus name :1.441 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF8)
May 14 23:00:53 hyacinth gnome-shell[246153]: Telepathy is not available, chat integration will be disabled.
May 14 23:00:53 hyacinth gnome-shell[246153]: Unable to connect to ibus: The given address is empty
May 14 23:00:53 hyacinth gnome-shell[246153]: Error loading calendars: Error calling StartServiceByName for org.gnome.Shell.CalendarServer: Process org.gnome.Shell.CalendarServer exited with status 127
May 14 23:00:53 hyacinth gnome-shell[246153]: Error looking up permission: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
May 14 23:00:53 hyacinth NetworkManager[508]: <info> [1621058453.9598] agent-manager: agent[6b53469e6d41e563,:1.441/org.gnome.Shell.NetworkAgent/1000]: agent registered
May 14 23:00:54 hyacinth gnome-session[246043]: gnome-session-binary[246043]: WARNING: Could not retrieve current screensaver active state: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell.ScreenShield was not provided by any .service files
May 14 23:00:54 hyacinth gnome-session-binary[246043]: WARNING: Could not retrieve current screensaver active state: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell.ScreenShield was not provided by any .service files
May 14 23:00:54 hyacinth gnome-shell[246153]: Failed to launch ibus-daemon: Failed to execute child process “ibus-daemon” (No such file or directory)
May 14 23:00:54 hyacinth gnome-shell[246153]: Failed to init X11 display: Unknown error
May 14 23:00:54 hyacinth org.gnome.Shell.desktop[246420]: The XKEYBOARD keymap compiler (xkbcomp) reports:
May 14 23:00:54 hyacinth org.gnome.Shell.desktop[246420]: > Warning: Unsupported maximum keycode 569, clipping.
May 14 23:00:54 hyacinth org.gnome.Shell.desktop[246420]: > X11 cannot support keycodes above 255.
May 14 23:00:54 hyacinth org.gnome.Shell.desktop[246420]: Errors from xkbcomp are not fatal to the X server
May 14 23:00:54 hyacinth gnome-session-binary[246043]: Entering running state
May 14 23:00:55 hyacinth gnome-shell[246153]: GNOME Shell started at Fri May 14 2021 23:00:53 GMT-0700 (Pacific Daylight Time)
May 14 23:00:55 hyacinth gnome-shell[246153]: Registering session with GDM
May 14 23:00:55 hyacinth gnome-shell[246153]: Error registering session with GDM: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.DisplayManager was not provided by any .service files
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor Gjs_ui_windowPreview_WindowPreview is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor ClutterActor is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor ClutterClone is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor StIcon is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor ClutterActor is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: _st_create_shadow_pipeline_from_actor: assertion 'clutter_actor_has_allocation (actor)' failed
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor Gjs_ui_windowPreview_WindowPreview is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor ClutterActor is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor ClutterClone is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor StIcon is on because it needs an allocation.
May 14 23:01:01 hyacinth gnome-shell[246153]: Can't update stage views actor ClutterActor is on because it needs an allocation.