[amdgpu] freeze occurs when wayland is connected to a second monitor

Bug #1970043 reported by hidaris
48
This bug affects 8 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Confirmed
Undecided
Unassigned
linux (Ubuntu)
Incomplete
Undecided
Unassigned
mutter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I didn't encounter this bug with ubuntu 21.10 and when I tried to use x11 in 22.04 everything was fine, so it seems to be related to mutter42. And my computer is an amd 47 4800u machine and should only have one integrated graphics card

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnome-shell 42.0-2ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
Uname: Linux 5.15.0-25-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 24 00:38:15 2022
DisplayManager: gdm3
InstallationDate: Installed on 2022-04-23 (0 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
RelatedPackageVersions: mutter-common 42.0-3ubuntu2
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 22.04
InstallationDate: Installed on 2022-04-26 (0 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
Package: mutter
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
RelatedPackageVersions: mutter-common 42.0-3ubuntu2
Tags: jammy wayland-session
Uname: Linux 5.15.0-27-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
hidaris (hidaris1208) wrote :
Revision history for this message
hidaris (hidaris1208) wrote :

I'm not particularly sure how to provide more detailed information about this, but point me in the right direction if you need to and I'll do my best to help locate the problem

description: updated
Revision history for this message
Arnaud de Saint Méloir (arnaudsm) wrote :

Same bug on 22.04, fresh install, Ryzen 5800U.
Workaround : Enable fractional scaling, plug, then disable it. Solved the issue permanently.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It sounds like some part of the system has crashed. To help us find the cause of the crash please follow these steps:

1. Look in /var/crash for crash files and if found run:
    ubuntu-bug YOURFILE.crash
Then tell us the ID of the newly-created bug.

2. If step 1 failed then look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

3. If step 2 also failed then apply the workaround from bug 994921, reboot, reproduce the crash, and retry step 1.

Please take care to avoid attaching .crash files to bugs as we are unable to process them as file attachments. It would also be a security risk for yourself.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Changed in mutter (Ubuntu):
status: New → Incomplete
Revision history for this message
rc (rrrccc) wrote :

same issue here, fresh install 22.04, nvidia 510.60.02 driver
in wayland session, if I plug-in a usb-c monitor, the system freezes. after I unplug the usb-c monitor the system resumes responsive. there is no need to press power button to hard reboot.
in X11 no such issue

Revision history for this message
hidaris (hidaris1208) wrote :

Thanks for your advice.
After reproduction the freezes error, it's strange that there is no crash files in /var/crash.
Could you please kindly check that when you're free?
Thanks again!

Revision history for this message
hidaris (hidaris1208) wrote :

I saw some error messages in the syslog that might be relevant, so post them first

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Comment #7 looks like a kernel or BIOS bug, but hopefully that's not the main issue.

Next time the freeze occurs please:

1. Wait 10 seconds.

2. Reboot.

3. Run:

   journalctl -b-1 > prevboot.txt

4. Attach the resulting text file here.

Revision history for this message
hidaris (hidaris1208) wrote :

Thanks, I put it in the attachment, this time there are many gnome shell related errors.

Revision history for this message
hidaris (hidaris1208) wrote :

The kernel or BIOS bug should not be the cause of the problem here, I get similar reports in 21.10 but it seems harmless, also in comment #7 there is mention of a dash to dock exception, I have tried disabling the dock inside extension manager but freeze still happens, so It seems to be a related issue, but not the cause of freeze happening.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'll assign this to the kernel too, in case it's a system call that's blocking.

tags: added: amdgpu
summary: - freeze occurs when wayland is connected to a second monitor
+ [amdgpu] freeze occurs when wayland is connected to a second monitor
no longer affects: gnome-shell (Ubuntu)
Changed in mutter (Ubuntu):
status: Incomplete → New
tags: added: multimonitor
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Maybe related: bug 1970495

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

hidaris, are you plugging the monitor into the laptop or into a dock?

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1970043

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
hidaris (hidaris1208) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
hidaris (hidaris1208) wrote : GsettingsChanges.txt

apport information

Revision history for this message
hidaris (hidaris1208) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
hidaris (hidaris1208) wrote : ProcEnviron.txt

apport information

Revision history for this message
hidaris (hidaris1208) wrote : ShellJournal.txt

apport information

Revision history for this message
hidaris (hidaris1208) wrote (last edit ):

Yes I am using type-c to plug the monitor into my laptop and it looks a lot like the problem you quoted

Revision history for this message
hidaris (hidaris1208) wrote :

I'll try the driver you mentioned and get back to you later.

Revision history for this message
hidaris (hidaris1208) wrote :

I installed that driver and rebooted, but the problem persists. Also, no dock is used in my case, only usb-c.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks, though you don't need the evdi driver if there is no dock/adapter box. A monitor connected directly to a USB-C port is just a native DisplayPort connection.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also maybe related: bug 1969422

Revision history for this message
hidaris (hidaris1208) wrote (last edit ):

Very strange, with comment 3 I can avoid freeze but have to turn on fractional scaling, not a permanent way to solve the problem, do I need to capture anything between the two states again?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fractional scaling certainly changes the display layout logic so it's a plausible if surprising workaround.

I would only ask anyone reading this to please verify you're not seeing any files left in /var/crash when the bug occurs.

Revision history for this message
John A. Lewis (pointful) wrote (last edit ):

I am seeing the same problem with using a USB-C monitor connected directly to my laptop. I do have one crash file in /var/crash -- see attached. The file might be a red-herring though caused only by me trying to restart gnome-shell once it was stuck.

Revision history for this message
Tobias Grundmann (lk-tobias-grundmann) wrote :

same problem here.
Dell XPS13, intel graphics,
second monitor connected via USB-C Hub. Mouse connected to same hub can be moved for halve a second after plugging in the hub, then everything freezes. X11 works.

Revision history for this message
Tobias Grundmann (lk-tobias-grundmann) wrote :

boot log

Revision history for this message
Tobias Grundmann (lk-tobias-grundmann) wrote :

after enabling fractional scaling you can even disable it again after plugging in the hub/second monitor (useful because it's blurry).
So my workaround looks like this:
boot -> freeze -> unplug hub -> enable fractional scaling -> plug hub in again -> disable fractional scaling -> adjust display arrangement -> work

additional observation: when the displays freeze the taskbar is cut off halfway, like it wouldn't fit completely on the screen.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

John, please report your crash file using the 'ubuntu-bug' command. Or 'apport-cli' if that fails. Then you will get a new bug created.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
hidaris (hidaris1208) wrote (last edit ):
Download full text (5.5 KiB)

This looks like a related question https://github.com/micheleg/dash-to-dock/issues/1705

copy log here:
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_display_get_monitor_in_fullscreen: assertion 'monitor >= 0 && monitor < n_logical_monitors' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Apr 09 01:36:01 satriani gnome-shell[118687]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
...
Apr 09 01:36:14 satriani gnome-shell[118687]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
                                                _loadFile@resource:///org/gnome/shell/ui/background.js:493:20
                                                _load@resource:///org/gnome/shell/ui/background.js:523:14
                                                _init@resource:///org/gnome/shell/ui/background.js:283:14
                                                Background@resource:///org/gnome/shell/ui/background.js:239:4
                                                getBackground@resource:///org/gnome/shell/ui/background.js:614:30
                                                _createBackgroundActor@resource:///org/gnome/shell/ui/background.js:785:49
                                                BackgroundManager@resource:///org/gnome/shell/ui/background.js:711:37
                                                _createBackgroundManager@resource:///org/gnome/shell/ui/layout.js:461:27
                                                _updateBackgrounds@resource:///org/gnome/shell/ui/layout.js:507:34
                                                _monitorsChanged@resource:///org/gnome/shell/ui/layout.js:571:14
Apr 09 01:36:14 satriani gnome-shell[118687]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
                                                _loadF...

Read more...

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

It looks like you have copied someone else's log from an unrelated bug? That shows bug 1717170 and bug 1965820. We don't need to discuss those here.

Revision history for this message
Ivan Vergés (ivanverges) wrote :

Comment #30 saved my day! I started to be affected by this bug just today, everything fine until now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.