[nouveau] System crashes on suspend on Ubuntu 21.10

Bug #1950393 reported by Vladislav K. Valtchev
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Since I started using kernel 5.13.0-20 (and 5.13.0-21) on Ubuntu 21.10, my GDM session crashes when I try to put my laptop to standby.

I've attached a relevant slice of the system journal that starts from the moment I pressed the power button, configured to trigger suspend, in my case.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: xorg 1:7.7+22ubuntu2
ProcVersionSignature: Ubuntu 5.13.0-21.21-generic 5.13.18
Uname: Linux 5.13.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: unknown
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Wed Nov 10 00:47:13 2021
DistUpgraded: 2021-10-16 23:05:19,206 DEBUG Running PostInstallScript: '/usr/lib/ubuntu-advantage/upgrade_lts_contract.py'
DistroCodename: impish
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation HD Graphics 530 [8086:191b] (rev 06) (prog-if 00 [VGA controller])
   Subsystem: Lenovo HD Graphics 530 [17aa:380a]
   Subsystem: Lenovo GM107M [GeForce GTX 950M] [17aa:380b]
InstallationDate: Installed on 2020-03-17 (602 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
MachineType: LENOVO 80RU
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.13.0-21-generic root=UUID=0e855d19-79da-402d-9586-b7bfe9a9622a ro
SourcePackage: xorg
Symptom: display
Title: Xorg crash
UpgradeStatus: Upgraded to impish on 2021-10-16 (24 days ago)
dmi.bios.date: 08/09/2017
dmi.bios.release: 1.61
dmi.bios.vendor: LENOVO
dmi.bios.version: E5CN61WW
dmi.board.asset.tag: No Asset Tag
dmi.board.name: Lenovo ideapad 700-15ISK
dmi.board.vendor: LENOVO
dmi.board.version: NO DPK
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad 700-15ISK
dmi.ec.firmware.release: 1.22
dmi.modalias: dmi:bvnLENOVO:bvrE5CN61WW:bd08/09/2017:br1.61:efr1.22:svnLENOVO:pn80RU:pvrLenovoideapad700-15ISK:rvnLENOVO:rnLenovoideapad700-15ISK:rvrNODPK:cvnLENOVO:ct10:cvrLenovoideapad700-15ISK:skuLENOVO_MT_80RU_BU_idea_FM_Lenovoideapad700-15ISK:
dmi.product.family: IDEAPAD
dmi.product.name: 80RU
dmi.product.sku: LENOVO_MT_80RU_BU_idea_FM_Lenovo ideapad 700-15ISK
dmi.product.version: Lenovo ideapad 700-15ISK
dmi.sys.vendor: LENOVO
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.107-8ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 21.2.2-1ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 21.2.2-1ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.20.13-1ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-2build1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20200714-1ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-1build1

Revision history for this message
Vladislav K. Valtchev (vvaltchev) wrote :
Revision history for this message
Vladislav K. Valtchev (vvaltchev) wrote :

I guess the most relevant part from the system journal is the following:

-------------------------------------------------------------------------
Nov 10 00:20:13 lenovo gdm-launch-environment][18707]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0)
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (EE)
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: Fatal server error:
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (EE) systemd-logind disappeared (stopped/restarted?)
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (EE)
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (EE)
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: Please consult the The X.Org Foundation support
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: at http://wiki.x.org
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: for help.
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (EE) Please also check the log file at "/home/vlad/.local/share/xorg/Xorg.0.log" for additional information.
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (EE)
Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (II) AIGLX: Suspending AIGLX clients for VT switch
Nov 10 00:20:13 lenovo upowerd[3602]: Could not acquire inhibitor lock: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Nov 10 00:20:13 lenovo dbus-daemon[1120]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service' requested by ':1.178' (uid=1000 pid=12386 comm="/usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/use" label="unconfined")
-------------------------------------------------------------------------

From which gdm-x-session complains that systemd-logind "disappeared".

Revision history for this message
Vladislav K. Valtchev (vvaltchev) wrote : Re: GDM session crashes on suspend on Ubuntu 21.10

I just tried suspending my machine while running a Wayland session ("Ubuntu"), instead of an Xorg session ("Ubuntu on Xorg") and I got the same problem. Therefore, the issue has *nothing* to do with Xorg itself.

summary: - GDM Xorg session crashes on suspend
+ GDM session crashes on suspend on Ubuntu 21.10
affects: ubuntu → xorg (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report.

Your log shows evidence of bug 1949352 but that probably doesn't explain "session crashes".

The most common GDM crash we are seeing in 21.10 is bug 1945061. But to confirm exactly which crash you are experiencing here, please follow these instructions: https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

affects: xorg (Ubuntu) → gdm3 (Ubuntu)
Changed in gdm3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Vladislav K. Valtchev (vvaltchev) wrote :
Download full text (3.6 KiB)

Hi Daniel,
unfortunately, there are no crash files in /var/crash/. I've checked also: https://errors.ubuntu.com/user/<whoopsie-id> but there are no crashes reported in the last month.

It looks like the "crash" is not caused by a fatal signal like SIGSEGV and no core dump is generated.

But, still from the same log file (attached), I noticed that systemd-logind exited with a failure:

----------------------------------------------------------------------------------------------
Nov 10 00:20:13 lenovo upowerd[3602]: Could not acquire inhibitor lock: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Nov 10 00:20:13 lenovo dbus-daemon[1120]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service' requested by ':1.178' (uid=1000 pid=12386 comm="/usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/use" label="unconfined")
Nov 10 00:20:13 lenovo gsd-power[12749]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Nov 10 00:20:13 lenovo gsd-media-keys[12746]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Nov 10 00:20:13 lenovo systemd[1]: Starting SSSD PAM Service responder...
Nov 10 00:20:13 lenovo systemd[1]: systemd-logind.service: Main process exited, code=exited, status=1/FAILURE
Nov 10 00:20:13 lenovo systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
----------------------------------------------------------------------------------------------

Later, I observe that gnome-session cannot communicate with systemd using GDBus and ends up failling back to a "non-systemd procedure":

----------------------------------------------------------------------------------------------
Nov 10 00:20:13 lenovo gnome-session[18803]: gnome-session-binary[18803]: WARNING: Failed to upload environment to systemd: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
Nov 10 00:20:13 lenovo gnome-session-binary[18803]: WARNING: Failed to upload environment to systemd: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
Nov 10 00:20:13 lenovo systemd[12345]: Failed to start GNOME Wacom tablet support service.
Nov 10 00:20:13 lenovo systemd[12345]: org.gnome.SettingsDaemon.Power.service: Failed with result 'exit-code'.
Nov 10 00:20:13 lenovo systemd[12345]: Failed to start GNOME power management service.
Nov 10 00:20:13 lenovo gnome-session[18803]: gnome-session-binary[18803]: WARNING: Failed to reset failed state of units: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
Nov 10 00:20:13 lenovo gnome-session-binary[18803]: WARNING: Failed to reset failed state of units: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
Nov 10 00:20:13 lenovo gnome-session[18803]: gnome-session-binary[18803]: WARNING: Falling back to non-systemd startup procedure due to err...

Read more...

Revision history for this message
Vladislav K. Valtchev (vvaltchev) wrote :

If I grep for `systemd`, after the first meaningful message:

Nov 10 00:20:06 lenovo systemd-logind[11553]: Power key pressed.

The first error is:

Nov 10 00:20:11 lenovo systemd-logind[11553]: Error during inhibitor-delayed operation (already returned success to client): Unit nvidia-resume.service is masked.

And later:

Nov 10 00:20:13 lenovo /usr/libexec/gdm-x-session[12386]: (EE) systemd-logind disappeared (stopped/restarted?)

Revision history for this message
Vladislav K. Valtchev (vvaltchev) wrote :

Interesting update
--------------------

Given the "Unit nvidia-resume.service is masked" complain by systemd-logind in my previous comment, I thought it could be related with the switching on and off the proprietary nvidia driver: after turning it on, I turned it off (switching to Nouveau) because of this other bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1947614

So, I opened the "Software & Updates" tool and in "Additional Drivers" I turned nvidia-driver-470 on again and... voila', the session-crash-on-suspend bug disappeared.

It looks like to me that the tool messed up some systemd units like nvidia-resume.service and it didn't return them to the previous state after I switched back to Nouveau.

Note: the only thing I used to turn on and off the nvidia driver is that "Software & Updates" tool, no custom configurations/hacks at all.

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

If the crash returns then please:

1. Wait 10 seconds.

2. Reboot.

3. Run:

   journalctl -b-1 > prevboot.txt

4. Attach the resulting text file here.

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Vladislav K. Valtchev (vvaltchev) wrote :

Hi Daniel,
In my understanding, the crash is not reproducible after my workaround (switching to the nvidia driver), because the nvidia-resume.service is not masked (my theory).

Therefore, I switched back to the Nouveau driver, and I reproduced the problem and collected the system logs as you asked. Now prevboot.txt contains the logs from a clean boot, through the session crash and ends with a (user requested) reboot.

Just for the record, these are the steps to reproduce the bug:

 1. Install Ubuntu 21.10 on a laptop(?) with an nvidia GPU
 2. Open "Software & Updates" -> "Additional Drivers"
 3. Select the latest driver (470)
 4. Reboot
 5. Login normally on GDM
 6. Open "Software & Updates" -> "Additional Drivers"
 7. Select "Nouveau display driver" and apply the changes
 8. Reboot
 9. Login normally on GDM
10. Try to suspend the system
11. You should observe a session crash here

summary: - GDM session crashes on suspend on Ubuntu 21.10
+ [nouveau] GDM session crashes on suspend on Ubuntu 21.10
tags: added: nouveau
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [nouveau] GDM session crashes on suspend on Ubuntu 21.10

Thanks for the information. I can confirm your system crashed because of the nouveau kernel driver. It's not a very stable driver and does cause a lot of bugs so I would always recommend installing the Nvidia driver instead.

Nov 11 16:15:52 lenovo /usr/libexec/gdm-x-session[2605]: (WW) modeset(0): flip queue failed: Permission denied
Nov 11 16:15:52 lenovo /usr/libexec/gdm-x-session[2605]: (WW) modeset(0): Page flip failed: Permission denied
Nov 11 16:15:52 lenovo /usr/libexec/gdm-x-session[2605]: (EE) modeset(0): present flip failed
Nov 11 16:15:53 lenovo kernel: nouveau 0000:01:00.0: Enabling HDA controller
Nov 11 16:15:53 lenovo kernel: nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 619444 [ PRIVRING ]
Nov 11 16:15:53 lenovo /usr/libexec/gdm-x-session[2605]: (EE)
Nov 11 16:15:53 lenovo /usr/libexec/gdm-x-session[2605]: Fatal server error:
Nov 11 16:15:53 lenovo /usr/libexec/gdm-x-session[2605]: (EE) systemd-logind disappeared (stopped/restarted?)

affects: gdm3 (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Incomplete → New
no longer affects: systemd (Ubuntu)
summary: - [nouveau] GDM session crashes on suspend on Ubuntu 21.10
+ [nouveau] System crashes on suspend on Ubuntu 21.10
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
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.