Solved Suspend/Wake issue (Debian 12 Nvidia Drivers)

Solved issue

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
518
Reaction score
432
Credits
6,399
Prelude:
I did a fresh install on a new NVMe SDD. Upgrate from my SATA SSD, upgrade from my Debian 10 OS.

Issue:
When waking from suspend, I get a blank screen and a cursor. Things are still running, so it's not hanging. Now I have tried everything I, the internet, and for what it's worth, 4 different AIs could think of.

Update (2024-10-01):
Solution: The 535 drivers are mentioned in an "nvidia" package search, that's what I used. They work. Use them.


Current specs:
Everything in my sig with changes: +256GB NVME, +Debian 12
Kernel: 6.1.0-25
DE: XFCE 4.18
DM: None / LightDM uninstalled (was careful with dependencies, nothing meaningful lost)
Nvidia Driver: 550.120 (built against this kernel, with i386 compatibility for older apps)
Notes: Had siilar issue (not the same, see below) with an upgrade to 11 on my laptop (intel igpu)

Remediation attempts (my laptop has a similar behavior -- but different issue -- since upgrade to 11):
  • Switching to another TTY, then back again, which worked for the laptop (so disabled compositing and all is well). Doesn't work for my PC (different issue).
  • Full upgrade from Debian 12.5 to 12.7, kernel upgrade with Nvidia driver rebuild.
  • Kernel parameters: nomodeset and nvidia-drm.modeset=0 (was being hopeful); acpi_sleep=nonvs (AI suggest, had my justified doubts).
  • Replacing compositor (everyone and AI suggested it, despite the above).
  • Lots of hacky pre- and post-suspend scripts and systemd unit files. Best I could do was kill x11 completely and auto-restart it after a few seconds.
  • Disabling powermizer, disabling blanking, even disabling vsync.

Worked:
  • Killing my xsession and restarting it (duh).
  • Not starting X and suspending from just the console (no issues).
  • LiveCD boot with defualts (nouveau). Even after uninstalling LightDM. Couldn't do a live swap betwean nvidia and nouveau drivers though.

Likely cause: driver in tandem with current install/settings:
  • [prefer to avoid] Upgrading to 13 as it'll like be on first freeze in a couple months and stable by mid-late 2025. Still want to avoid.
  • [want to avoid] Swapping back to nouveau driver. (Really want to avoid unless there's been major progress the last 2 years)
  • [pointless? ] Downgrading driver to 460. (Really doubt this will fix anything, was running 5xx on my Deb 10)
  • [want to avoid] Reinstall and enable a DM (may work in a hacky way due to the force refresh at the greeter/login, on LightDM anyway)

So any other suggests would be good? Anything I haven't exhausted?
 
Last edited:


Kernel parameters: nomodeset and nvidia-drm.modeset=0
If you're having this problem with Wayland session then you do need to enable nvidia-drm modeset
Otherwise try with X session, does X session work?

Kernel: 6.1.0-25
If the above doesn't work I'd suggest upgrading your kernel to the latest from backports, keep in mind you'll need to rebuild nvidia driver otherwise you'll stuck at boot with no way to recover.

Soon after backported kernel is installed immediately run sudo systemctl set-default multi-user.target, this way you'll prevent boot issue if nvidia driver fails.
Of course prior reboot you need driver ready to be installed upon reboot, I suppose you know how all this works since you said you were building the driver yourself.
 
If you're having this problem with Wayland session then you do need to enable nvidia-drm modeset
Otherwise try with X session, does X session work?
I'm using X11... XFCE4 still is not compatible, and likely will get there by 2028. If/When I'm ready to switch, it'll be to KDE. I like having modeset ensures ensured (past-tense) my tty was at the correct video mode (it seems I don't need any display parameters these days, heck even my BIOS post is automatically at the right video mode).

If the above doesn't work I'd suggest upgrading your kernel to the latest from backports, keep in mind you'll need to rebuild nvidia driver otherwise you'll stuck at boot with no way to recover.
This is the latest stable kernel. Backports is automatically enabled by my fresh install script, although it's a new install, so I haven't forced a backports upgrade yet... Just did, nothing changed except some configs to align with systemd standards.

Soon after backported kernel is installed immediately run sudo systemctl set-default multi-user.target, this way you'll prevent boot issue if nvidia driver fails.
Heh, already set. It's a necessity to ensure booting straight into a CLI these days thanks to all the newfangled conventions (which ain't so newfangled as I am oldfangled). And I always boot into a CLI first.

Thanks for the suggests so far.
 
Prelude:
I did a fresh install on a new NVMe SDD. Upgrate from my SATA SSD, upgrade from my Debian 10 OS.

Issue:
When waking from suspend, I get a blank screen and a cursor. Things are still running, so it's not hanging. Now I have tried everything I, the internet, and for what it's worth, 4 different AIs could think of.

Current specs:
Everything in my sig with changes: +256GB NVME, +Debian 12
Kernel: 6.1.0-25
DE: XFCE 4.18
DM: None / LightDM uninstalled (was careful with dependencies, nothing meaningful lost)
Nvidia Driver: 550.120 (built against this kernel, with i386 compatibility for older apps)
Notes: Had siilar issue (not the same, see below) with an upgrade to 11 on my laptop (intel igpu)

Remediation attempts (my laptop has a similar behavior -- but different issue -- since upgrade to 11):
  • Switching to another TTY, then back again, which worked for the laptop (so disabled compositing and all is well). Doesn't work for my PC (different issue).
  • Full upgrade from Debian 12.5 to 12.7, kernel upgrade with Nvidia driver rebuild.
  • Kernel parameters: nomodeset and nvidia-drm.modeset=0 (was being hopeful); acpi_sleep=nonvs (AI suggest, had my justified doubts).
  • Replacing compositor (everyone and AI suggested it, despite the above).
  • Lots of hacky pre- and post-suspend scripts and systemd unit files. Best I could do was kill x11 completely and auto-restart it after a few seconds.
  • Disabling powermizer, disabling blanking, even disabling vsync.

Worked:
  • Killing my xsession and restarting it (duh).
  • Not starting X and suspending from just the console (no issues).
  • LiveCD boot with defualts (nouveau). Even after uninstalling LightDM. Couldn't do a live swap betwean nvidia and nouveau drivers though.

Likely cause: driver in tandem with current install/settings:
  • [prefer to avoid] Upgrading to 13 as it'll like be on first freeze in a couple months and stable by mid-late 2025. Still want to avoid.
  • [want to avoid] Swapping back to nouveau driver. (Really want to avoid unless there's been major progress the last 2 years)
  • [pointless? ] Downgrading driver to 460. (Really doubt this will fix anything, was running 5xx on my Deb 10)
  • [want to avoid] Reinstall and enable a DM (may work in a hacky way due to the force refresh at the greeter/login, on LightDM anyway)

So any other suggests would be good? Anything I haven't exhausted?
Now this is how to ask for help. That's verbose.

Signed,

Matthew Campbell
 
You could try to upgrade the Kernel through backports I believe it is 6.10.6+bpo

Also check your USB power options in the BIOS and see if they are set to "low power mode" if they are uncheck that option so they don't do that
 
You could try to upgrade the Kernel through backports I believe it is 6.10.6+bpo
Ah, yes, so it is. My bad @CaffeineAddict when I said I'd upgraded to the latest. I didn't even notice my kernel was held back (loads of other upgrades) during my upgrade (nvidia driver as it must be [re]built against every new kernel - and I'm still not used to nvidia as I have used AMD GPUs all my linux life until recently).
I'll let y'all know if it helps, though I'm not holding my breath. I think I may have to consider 13/trixie or going to nouveau.
 
A suggestion well intentioned.

Run Linux Mint
 
Well, just a general update: I tried again with the latest kernel. No good. When I have the time this weekend, I'm going to make double sure it is the Nvidia driver, which means removing today's build, trying nouveau, and if the problem is resolved, rolling back to an older nvidia driver. If all fails, a fresh install on my swap partition just to test things out (i.e. break things intentionally) to figure this out because I think it's important to pin-point the issue for the sake of others in my situation, especially if it's something I can report to whomever is ultimately responsible, depending what the issue is (I've widened the possibilities again so first order is to narrow the causes).
I'll post back in this thread once I have a workaround and can provide a solution to anyone in a similar boat to me. Hopefully I'll also be able to report a bug or smack myself for something stupid I overlooked (like libs that may not be compatible). For now, the only workaround remains setting up a kill on the current x-session just before/after suspend.



A suggestion well intentioned.

Run Linux Mint
Actually, Mint was my number one for installing on refurbished machines. I've thought about LMDE before, but I always come back to pure Debian in the end. I think I've gotten too used to fine-tuning and controlling, and for the last 10 or so years since Debian's been my main distro, this is only the second issue I've had (the first being with a laptop -- back when laptops had to be at least two or more years old for the hardware to be supported even by Ubuntu).
 
I hate to mark an issue resolved when it isn't really, but...

Fact: The nvidia 550.xx drivers will not work on Debian 12, as of Kernel 6.10.6.
Fact: There is a compile error with the 460 (and successor 470) driver when building on anything above a 4.9 (IIRC that was my kernel on my 10 install, may have been 5.10). Conjecture: This is likely caused by a header files being different.

The 535 drivers are mentioned in an "nvidia" package search, that's what I used. They work.

Debian does provide an nvidia-driver package. It's under "non-free", not "non-free-firmware" in your sources.list. Yes, I don't like this either but since it has a frontend, it goes there. It's >500MB with dependencies, but excluding 32-bit support (which would be even more, likely). The driver from Nvidia's site is ~300MB. X11 started slightly slower with the Debian repo version as opposed to the same driver from the site. IDK, it could be some other factors or maybe I'm literally losing my mind after a week of this.

Install the driver from Nvidia's site if:
  • If you are willing to rebuild the driver each kernel update.
  • Half a second means that much -- it probably won't affect most people as they use Display Managers & Greeters.
  • Don't wish to "taint" you repos adding "non-free" beyond firmware. It's kinda paradoxical, but still, maybe you are only prepared to compromise with this one thing (I feel this way so I get you).
Otherwise, use the Debian nvidia-driver package:
  • Automatically rebuilds driver or patches it against kernel updates
  • Handles dependencies and is better integrated.

Thanks to everyone who contributed, too. And good luck to the person with this issue who stumbles upong this thread.

PS: Will edit in a TL;DR answer on the OP.
 

Members online


Top