Gnome crashing when connecting external monitor to a laptop

Hello,

I’m using Fedora 40 Workstation with Gnome and Wayland. My laptop is Lenovo Thinkbook 15 G3 ACL with AMD graphics.

When I connect an external monitor (LG 4k) via usb c to my laptop, sometimes Gnome crashes and takes me to the login screen. I cannot consistently reproduce it, so I’m not sure exactly what produces it. Sometimes it happens when connecting laptop to a charger, but it’s rare. One time it happened randomly and unprovoked when I was just on my laptop and nothing was connected to it.

I just reinstalled Fedora and tested a couple of times on a fresh install with no files restored and it seemed to be fine. Then I restored my home folder and started to reinstall software. But then when I tested it later, it again crashed like before. I think it might be something to do with extensions manager flatpak provided by Gnome, but I’m not sure. On my old installation I remember it even crashed when all the extensions were disabled.

Any help would be appreciated.

Thanks!

Hello!

Try to reproduce it and when it happens run sudo dmesg and send the output.
Another good command is journalctl. With this we’ll be able to start some troubleshooting. :slight_smile:

OK, I post the logs as soon as I’m able to reproduce it.
Which one is better dmseg or journalctl?

From line 5027, seems like a bunch of things crashed on gnome:

Oct 11 21:37:04 fedora systemd[7836]: org.gnome.Shell@wayland.service: Main process exited, code=killed, status=9/KILL
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Keyboard.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Color.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[1]: tmp-.mount_BitwarPrBcYL.mount: Deactivated successfully.
Oct 11 21:37:04 fedora remnote.desktop[9202]: X connection to :0 broken (explicit kill or server shutdown).
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.MediaKeys.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Power.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora kernel: hub 1-1:1.0: USB hub found
Oct 11 21:37:04 fedora kernel: hub 1-1:1.0: 5 ports detected
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Wacom.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[7836]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[7836]: xdg-desktop-portal-gnome.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[7836]: xdg-desktop-portal-gtk.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: dbus-:1.2-org.gnome.Calendar@0.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[7836]: dbus-:1.2-org.gnome.Calendar@0.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: gnome-terminal-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 21:37:04 fedora systemd[7836]: gnome-terminal-server.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: gnome-terminal-server.service: Consumed 1.771s CPU time.
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Keyboard.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Color.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.MediaKeys.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Power.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: org.gnome.SettingsDaemon.Wacom.service: Failed with result ‘exit-code’.
Oct 11 21:37:04 fedora systemd[7836]: app-gnome-vorta-8307.scope: Consumed 2.143s CPU time.

Just to test, can you choose a xorg session and try again?
Another question: when you are sent to the login screen, your session starts clean (as a new session, as if you logged of)?

Ok, I will try to test, but it’s not easy to trigger it.
So, when I log back in, it’s a brand new session.
One workaround I thought of, is to lock my screen when pluging in any usb c cable, but I will have to test it too.