FS#76368 - [gnome-shell] doesn't display after upgrade to 43 / gstreamer related

Attached to Project: Arch Linux
Opened by Guoyi (malacology) - Tuesday, 01 November 2022, 08:42 GMT
Last edited by Toolybird (Toolybird) - Friday, 04 November 2022, 21:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 13
Private No

Details

Description:

gdm can't be displaied after mutter and gnome-shell upgrade to 43

but it can be displaied after editing the configure file `/etc/gdm/custom.conf`

```
# GDM configuration storage

[daemon]
# Uncomment the line below to force the login screen to use Xorg
WaylandEnable=false

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
Enable=true
```

XDG_SESSION_TYPE=wayland dbus-run-session gnome-session frozen from tty

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 04 November 2022, 21:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  gnome-shell 1:43.1-1
Comment by Paolo Mainardi (paolomainardi) - Tuesday, 01 November 2022, 16:04 GMT
Bug and resolution confirmed, I have been affected too, using Xorg solves but this is very breaking.
Comment by Wouter Standaert (joejoepie) - Tuesday, 01 November 2022, 16:22 GMT
I'm having the same issue on my Dell XPS 13 Plus laptop. Temporarily resolved by downgrading all packages to 10/27/2022.
Comment by Joachim Werner (jockl) - Tuesday, 01 November 2022, 16:32 GMT
I can confirm, same issue on my Thinkpad T470. Switching back to X11 works for me.
Comment by Paul Bryan (pbryan) - Tuesday, 01 November 2022, 16:33 GMT
This affects `gnome-shell --wayland` as well. Exact same behavior as GDM: it remains in text mode, frozen text cursor, no keyboard response (can't Ctrl+Alt+Fn to another tty). So, this seems to be an issue with Mutter, not GDM.
Comment by George Lakidon (urFate_) - Tuesday, 01 November 2022, 18:38 GMT
Got same bug. Someone told that is Mutter issue. I has tried to build & use latest mutter from their git repository but it's was gave nothing. (Amd GPU setup, Acer aspire e5-521g)
Comment by Jared (tofaffy) - Tuesday, 01 November 2022, 19:33 GMT
I also have this problem on the Asus Zephyrus G15 (2021) with Nvidia 3080. Switching back to X11 works, but is unsatisfactory due to lack of features. Also can't use keyboard to drop into tty.
Comment by Toolybird (Toolybird) - Tuesday, 01 November 2022, 21:02 GMT
I just tried a fresh install in a new VM and all works fine. Instead of empty "me too" posts we need hard data, log files, crash info, etc. So far there is very little clue as to where the problem lies. Does gdm actually display and let you enter a password? If yes, then it's likely the problem is elsewhere.
Comment by Jared (tofaffy) - Tuesday, 01 November 2022, 21:10 GMT
Sorry Toolybird, I'm quite new to Linux and debugging things. I can provide whatever files you might think are helpful. I checked through journalctl and there doesn't seem t be a moment where things crash. GDM never loads. Right after the reboot, I rebooted. Right after the kernel booting message, I immediately have a black screen with a cursor (_ <--like that) that isn't blinking. GDM never displays, so there is no chance to enter a password.
Comment by Paolo Mainardi (paolomainardi) - Tuesday, 01 November 2022, 21:17 GMT
@Toolybird debug is quite hard - basically you have blank screen, just the frozen cursor, TTY not working (alt + fN), the power off button instead is still working and intact is the only thing doable. I then tired to boot at runlevel 3 - installed and started lightdm, it works and starting Gnome wayland crashes exactly like GDM does, that’s why the problem is Gnome not GDM.
Comment by Paul Bryan (pbryan) - Tuesday, 01 November 2022, 21:35 GMT
Unclear how to debug this. Can't run in gdb because I lose access to any TTY after gnome-shell or GDM starts. Is there a way to have gnome-shell or GDM emit debug log data (ideally to a file)?
Comment by Mauro (hermes83) - Tuesday, 01 November 2022, 21:39 GMT
You could see the logs from the previous session with journalctl like this:
journalctl --boot=-1
Comment by Joachim Werner (jockl) - Tuesday, 01 November 2022, 21:58 GMT
This is my journalctl output with wayland activated. At 16:06 I push the power button and it shuts down. There doesn't seem to be any indication from gdm/gnome/wayland as to what's wrong, only afterwards it says "Session never registered". Same symptoms btw, cursor and system doesn't respond to Alt-F2.
   startup.log (150.8 KiB)
Comment by Paul Bryan (pbryan) - Tuesday, 01 November 2022, 21:58 GMT
Starting gnome-shell from user account logged in tty1, seeing nothing suspicious in journal.

[snip]
Nov 01 14:52:14 sesame login[363]: LOGIN ON tty1 BY pbryan
Nov 01 14:52:14 sesame kernel: fscrypt: AES-256-CTS-CBC using implementation "cts-cbc-aes-aesni"
Nov 01 14:52:14 sesame kernel: fscrypt: AES-256-XTS using implementation "xts-aes-aesni"
Nov 01 14:52:18 sesame systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Nov 01 14:52:18 sesame audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? >
Nov 01 14:52:18 sesame systemd[728]: Created slice User Core Session Slice.
Nov 01 14:52:19 sesame systemd[728]: Starting D-Bus User Message Bus...
Nov 01 14:52:19 sesame systemd[728]: Started D-Bus User Message Bus.
Nov 01 14:52:19 sesame dbus-daemon[785]: [session uid=1001 pid=785] Activating via systemd: service name='org.gtk.vfs.Daemon' unit='gvfs-daemon.service' requested by ':1.0' (uid=1001 pid=76>
Nov 01 14:52:19 sesame systemd[728]: Starting Virtual filesystem service...
Nov 01 14:52:19 sesame dbus-daemon[785]: [session uid=1001 pid=785] Successfully activated service 'org.gtk.vfs.Daemon'
Nov 01 14:52:19 sesame systemd[728]: Started Virtual filesystem service.
Nov 01 14:52:19 sesame dbus-daemon[785]: [session uid=1001 pid=785] Activating via systemd: service name='org.a11y.Bus' unit='at-spi-dbus-bus.service' requested by ':1.4' (uid=1001 pid=769 >
Nov 01 14:52:19 sesame systemd[728]: Starting Accessibility services bus...
Nov 01 14:52:19 sesame dbus-daemon[785]: [session uid=1001 pid=785] Successfully activated service 'org.a11y.Bus'
Nov 01 14:52:19 sesame systemd[728]: Started Accessibility services bus.
Nov 01 14:52:22 sesame systemd-logind[351]: Power key pressed short.
Nov 01 14:52:22 sesame systemd-logind[351]: Powering Off...
Nov 01 14:52:22 sesame systemd-logind[351]: System is powering down.
[snip]

Looks to me like gnome-shell is starting normally, but just not rendering on screen.
Comment by Toolybird (Toolybird) - Wednesday, 02 November 2022, 04:11 GMT
Thanks for the logs. On my working VM, immediately after the line:

Using Wayland display name 'wayland-0'

I see the following lines which are not showing in the log provided by @jockl:

gnome-shell[449]: Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.
gnome-shell[449]: Will monitor session 1

But I have no idea if this is significant or not.

Are folks using early KMS? [1]. If not, please try. What happens if you ssh login from another machine and have a poke around? Maybe try restarting the gdm service? Maybe even add a service delay as per  FS#63763 ?

[1] https://wiki.archlinux.org/title/Kernel_mode_setting#Early_KMS_start

Comment by Paul Bryan (pbryan) - Wednesday, 02 November 2022, 05:28 GMT
Connected to my laptop via ssh to watch what was happening. Here are key lines in `ps -ef` I see after starting `gnome-shell --wayland`:

pbryan 823 742 1 22:21 tty1 00:00:00 gnome-shell --wayland
pbryan 840 719 0 22:21 ? 00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
pbryan 846 719 0 22:21 ? 00:00:00 /usr/lib/gvfsd
pbryan 851 719 0 22:21 ? 00:00:00 /usr/lib/gvfsd-fuse /run/user/1001/gvfs -f
pbryan 859 719 0 22:21 ? 00:00:00 /usr/lib/at-spi-bus-launcher
pbryan 865 859 0 22:21 ? 00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1001/at-spi/bus
pbryan 875 823 0 22:21 tty1 00:00:00 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1001/.mutter-Xwaylandauth.HG6YU1 -listenfd 4 -listenfd 5 -displayfd 6 -initfd 7
pbryan 883 823 0 22:21 tty1 00:00:00 /usr/lib/gstreamer-1.0/gst-plugin-scanner -l /usr/bin/gnome-shell

What is Xwayland (pid 875) doing here?

Trying to `kill 823` had no effect. I had to `kill -9 823` to stop the process. Once stopped, I had control of tty1 back.
Comment by Paul Bryan (pbryan) - Wednesday, 02 November 2022, 05:43 GMT
Also, per Toolybird's request, I have tried early KMS:

1. Add kms to HOOKS array in /etc/mkinitcpio.conf.
2. Run `mkinitcpio -p linux`.
3. Reboot.
4. Login to tty1 as user.
5. Run `gnome-shell --wayland`.

Same behavior observed.
Comment by q rty (q234rty) - Wednesday, 02 November 2022, 06:32 GMT
pbryan, Could you try `sudo DEBUGINFOD_URLS=https://debuginfod.archlinux.org gdb attach $(pidof gnome-shell)` while sshing into your laptop? You can then first enable logging by `set logging enabled on` and then use `thread apply all bt full` to dump the backtrace of every thread. Finally you can attach the gdb.txt here for analyze.
Comment by Paul Bryan (pbryan) - Wednesday, 02 November 2022, 06:44 GMT
q234rty, attached is the gdb.txt file you requested.
   gdb.txt (465.1 KiB)
Comment by q rty (q234rty) - Wednesday, 02 November 2022, 08:11 GMT
pbryan, would be great if you could open a bug report in https://gitlab.gnome.org/GNOME/gnome-shell/-/issues with the log attached.
Comment by Daniel (puresick) - Wednesday, 02 November 2022, 09:14 GMT
I am experiencing the same issue with neither `gnome-shell --wayland` nor GDM with wayland showing up after updating to Gnome 43.
Everything I am experiencing has already been said, but maybe this still helps somehow:

Booting straight into GDM Wayland results in just showing a freezed `_` cursor and no input being accepted (except pressing the power button, the system shuts down cleanly).
Forcing GDM in using X11 starts up GDM as it should.

Starting Gnome Wayland via GDM X11 results in a freezed screen.
It is the same with starting Gnome Wayland via another tty with `gnome-shell --wayland`. There is no error thrown or similar, just one message before the freeze showing up on screen: `libmutter-Message: 09:40:04.704: Running Gnomen Shell (using mutter 43.0) as a Wayland display server`.

`sudo journalctl -b -1 -r` output can be found in the file attached. (just pasted the snippet from logging into the other tty, starting `gnome-shell --wayland` and then pressing the power button to cleanly shut down).

This is happening on a Lenovo ThinkPad P14s Gen 2a (AMD Ryzen 7 PRO 5850U, 4k non-touch display).
Comment by Paul Bryan (pbryan) - Wednesday, 02 November 2022, 15:15 GMT
[deleted comment, updates below]
Comment by Paul Bryan (pbryan) - Wednesday, 02 November 2022, 15:56 GMT
Related upstream bug:
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5710

Debian patch that reportedly (temporarily?) addresses this issue:
https://salsa.debian.org/gnome-team/gnome-shell/-/merge_requests/66
Comment by Jake Dane (jakedane) - Wednesday, 02 November 2022, 16:17 GMT
Thanks Paul! The Debian patch works for me as workaround.

Alternative, uninstalling gstreamer-vaapi also worked for me as workaround.
Comment by Daniel (puresick) - Wednesday, 02 November 2022, 17:04 GMT
Thank you Paul and Jake!

Can confirm, after removing gstreamer-vaapi Gnome Wayland and GDM are starting (with a small noticable delay of a couple of seconds, but good enough as a workaround until we are getting the upstream patch).
Comment by Sebastian Schlatow (buzz-dee) - Wednesday, 02 November 2022, 20:42 GMT
I can also confirm, that after removing gstreamer-vaapi GNOME / GDM starts.
Comment by Corey Hinshaw (electrickite) - Thursday, 03 November 2022, 18:09 GMT
I also ran into this bug and fixed temporarily by removing gstreamer-vaapi.

However, after reading several of the linked issues in other distros, I realized that I did not have the VA-API driver package for my GPU installed. For my system (12th gen Intel), installing the intel-media-driver package resolved the issue and allowed me to boot GNOME 43 with gstreamer-vaapi.

https://wiki.archlinux.org/title/Hardware_video_acceleration#Intel
Comment by Paul Bryan (pbryan) - Thursday, 03 November 2022, 18:20 GMT
Great catch, electrickite! I too installed intel-media-driver, and can now run GNOME in Wayland. Ah, fractional scaling my old friend, how I missed you.
Comment by caspian (caspian) - Friday, 04 November 2022, 08:21 GMT
I can also confirm that installing intel-media-driver (as reported by electrickite) solved the issue for me. Uninstalling gstreamer-vaapi also helped, but installing intel-media-driver is obviously an optimal solution. Thanks electrickite!!
Comment by Sebastian Schlatow (buzz-dee) - Friday, 04 November 2022, 08:32 GMT
I can also confirm, that after installing gstreamer-vaapi and intel-media-driver GNOME / GDM starts again.
Comment by Corey Hinshaw (electrickite) - Friday, 04 November 2022, 20:42 GMT
It looks like upstream merged a more robust fix for this issue: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2519
Comment by Paul Bryan (pbryan) - Friday, 04 November 2022, 20:42 GMT
This now looks to be fixed in gnome-shell 43.1. Confirmed by removing intel-media-driver and restarting gnome-shell --wayland and by starting GDM via systemd.

Loading...