wrong nvidia configuration: suspend/resume issues

Bug #2036262 reported by Robert Haschke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-535 (Ubuntu)
New
Undecided
Unassigned

Bug Description

When returning from a suspend/resume cycle on an Optimus laptop (Intel+NVIDIA GPU), the primary laptop screen stays off. The external screen works as expected. However, when having disconnected the external monitor after suspend, the laptop screen is off as well. It is possible to switch to console and restart lightdm, but that's no solution.

The problem seems to be caused by a misconfiguration of the nvidia suspend/resume setup as explained here:
https://forums.developer.nvidia.com/t/fixed-suspend-resume-issues-with-the-driver-version-470/187150/1

suspend/resume for nvidia is triggered twice:
1. via systemd services: nvidia-[suspend|hibernate|resume].service in /usr/lib/systemd/system
2. via /lib/systemd/system-sleep/nvidia

Both paths end up calling /usr/bin/nvidia-sleep.sh.
These files are provided by package nvidia-kernel-common-*.

*Solution*: It was sufficient to delete the latter file: `sudo rm /lib/systemd/system-sleep/nvidia`

systemd documentation states: "Scripts or binaries dropped in /usr/lib/systemd/system-sleep/ are intended for local use only and should be considered hacks."
https://www.freedesktop.org/software/systemd/man/systemd-suspend.service.html

The problem exists in Ubuntu Focal and Jammy at least. Probably all versions of package nvidia-kernel-common are affected. I just successfully fixed the problem on Jammy with NVIDIA driver version 535.

Revision history for this message
Robert Haschke (rhaschke) wrote (last edit ):

In contrast to https://bugs.launchpad.net/bugs/1946303, which seems to be similar, I do not see kernel error messages or even crashes in the kernel logs.

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.