No display after sleep: KDE Neon (Plasma 5) and Dell Precision 3660

Hardware: Dell Precision 3660 Desktops with RTX 4070 Graphics cards (I’m using HMDI out, not DP)
Software: Latest KDE Neon with nvidia-driver-545 graphics installed via apt-get (but problem also occurs on machines running fail safe graphics)
Symptoms: Initial install problematic as the nouveau drivers fail with the 4070s. Used safe graphics mode. Install goes okay, but rebooting after install finished hangs - have to power cycle. Log in goes okay, post-install config goes okay, but machine goes to sleep and doesn’t wake up. Nothing wakes the screen, but disk light is flashing. Have to power cycle. Change power settings to not sleep. Seems okay. Another user (it’s a lab) logs in, leaves screen up during class. Machine display goes to sleep (but not the machine) and cannot be gotten back. Confirmed that the machine can be remotely logged-into, but no signal to the display. Problem does not occur at the login screen (sddm) – machine can sit there for hours with the monitor asleep.
Troubleshooting: disabled sleep, tried unplugging the cable and re-plugging, tried power cycling the monitor, confirmed the OS can be remotely accessed so it’s not asleep, but nothing results in signal to the monitor, tried nvidia drivers and have tried safe graphics mode.

I don’t really know how to troubleshoot graphics so I appreciate pointers of where to look for problems. Many thanks.

Could this be Bug 469975?

It’s difficult to say as we didn’t let the machines sleep while doing the install - we went right through the installed and closed-out as indicated in the installer. That’s when the first crash/hang occurs. I do have an update, however, that I will post.

We seem to have figured out some of the mess. Testing has shown that, across the machines, the common problem seems to be the way kde-nomodeset works && whether or not the installation of the nvidia-drivers goes according to plan.

TLDR; safe graphics is why this is happening.

Whatever the xsession/power settings are doing when the display goes to sleep, safe graphics cannot recover. Everything else we saw was because 1) we installed the nvidia drivers, but they were not being used - nomodeset was still active after installation for some reason 2) or a weird case where nvidia was supposed to be active, but /usr/lib/modprobe.d/nvidia… did not contain the appropriate blacklist entries to prevent nouveau drivers.

I think this has something to do with having to set safe graphics during install and first-boot. All I can confirm is that the solution is this: enable nomodeset in grub to boot into safe graphics, run nvidia-detector and install nvidia-drivers-545 or whatever it recommends, DOUBLE CHECK that the /usr/lib/modprobe.d/nvidia conf file contains blacklist lines for Nouveau, && double check that /etc/default/grub does not contain nomodeset.

Even doing the above, on one of the machines, the kde-nomodeset daemon was still running and complained that we were in safe graphics mode, which we confirmed was not true. Clicking the option to reenable default graphics mode resulted in a dbus error that I didn’t catch. Manually quitting that applet/daemon resulted in it not reappearing. Currently, I have watched two different machines go to sleep at different times with different power settings and both come back up. Fingers crossed we solved it.