You are not logged in.

#1 2025-03-07 18:08:07

shana133
Member
Registered: 2020-03-29
Posts: 10

[SOLVED] Nvidia system shortly unresponsive after resume from suspend

Hello
I'm trying to figure out how to resolve this bug or at least investigate its source.

System Overview:
I've two installations on separate drives - one I've been maintaining for about 8 years and the other one very clean install with nothing but working drivers and i3wm for graphical interface without compositor. The issue is present on both. Both systems are up to date but lets focus on the clean one.
It has `nvidia-drm.modeset=1` and resume configured as kernel params, mkinitcpio.conf contains `MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)`. On both systems force full composite pipeline is enabled in nvidia-settings and monitor configuration is saved to xorg.conf.

Hardware
CPU Intel i9-9900k
GPU Nvidia rtx 2080 ti

Issue:
What's happening is on resume from suspend(s2idle[deep]) applications freeze for 10-60s (apps that use opengl? eg spotify, discord, kitty(kitty has workaround for that which can be set in config)). Other applications eg browser are not interactive during that time then work fine when system unfreezes.
I haven't seen any errors in journalctl or dmesg related to that.

What I've tried so far:
Past 3 months I've been searching for a fix every now and then. Reread many pages of nvidia on wiki.
Ensured that services for nvidia-suspend nvidia-resume and nvidia-hibernate are enabled. Looking at driver params PreserveVideoMemoryAllocations is enabled based on wiki.
Made clean install to make sure it's happening in minimal environment.

I don't know where can I look for to resolve this issue or what logs can I provide to at least narrow down the source of this issue.
Not sure whether it's related to cache aliasing? https://download.nvidia.com/XFree86/Lin … ssues.html

Last edited by shana133 (2025-05-09 10:13:37)

Offline

#2 2025-05-03 00:34:26

Shapeshifter
Member
Registered: 2008-03-11
Posts: 235

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

I have the same problem. Were you ever able to resolve it?

Offline

#3 2025-05-03 05:59:23

shana133
Member
Registered: 2020-03-29
Posts: 10

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

No. It's still happening on latest system. I've found more apps that freeze for a brief period after resume eg Obsidian, chrome. SMplayer hangs as well but doesn't seem to be able to recover.

Offline

#4 2025-05-03 06:35:24

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

Do you also get this when simply switching the framebuffer (ctrl+alt+f3, in doubt try to disable the framebuffer console to trigger this - for grub see https://wiki.archlinux.org/title/GRUB/T … ramebuffer

Offline

#5 2025-05-03 06:46:55

shana133
Member
Registered: 2020-03-29
Posts: 10

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

seth wrote:

Do you also get this when simply switching the framebuffer (ctrl+alt+f3, in doubt try to disable the framebuffer console to trigger this - for grub see https://wiki.archlinux.org/title/GRUB/T … ramebuffer

That sounds like it could work. I'm using systemd boot so video=efifb:off video=vesafb:off kernel params should do the same as the docs you mentioned for grub.
I'll be able to test this on Monday.

Offline

#6 2025-05-03 07:02:27

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

Brace yourself, I'm actually trying to trigger the symptom w/ the framebuffer switch to check whether it's related to that or actually the sleep.

Offline

#7 2025-05-07 21:58:08

shana133
Member
Registered: 2020-03-29
Posts: 10

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

Sorry it took longer that I expected to have PC available to test this.

seth wrote:

Do you also get this when simply switching the framebuffer (ctrl+alt+f3, in doubt try to disable the framebuffer console to trigger this - for grub see https://wiki.archlinux.org/title/GRUB/T … ramebuffer
Brace yourself, I'm actually trying to trigger the symptom w/ the framebuffer switch to check whether it's related to that or actually the sleep.

When programs unfreeze after resume from suspend I tested what you mentioned:
- Switching to vtty (ctrl+alt+f3) neither causes lag/freeze nor switching back to session where programs freeze(shortly) after wakeup (that was with /proc/cmdline

initrd=\intel-ucode.img initrd=\initramfs-linux.img root=PARTUUID=67568f3a-5088-438c-bdf4-576f7605138c rw nvidia-drm.modeset=1 resume=PARTUUID=b94831f2-1b42-40e9-a3d2-e222bb5f1bbf

)
So nothing from framebuffer disabled.

- Added to kernel options video=efifb:off video=vesafb:off and rebuilt initramfs, reboot pc, suspend, wakeup. Programs still were frozen for some time(5-20 seconds). In addition to discord, spotify there is also smplayer but it doesn't recover after wakeup.

Is there any logs I can provide to narrow down the issue? Rechecked `journalctl -e -b --since "20 minutes ago"` and dmesg, but they look fine - only ufw block noise.

Offline

#8 2025-05-08 13:23:29

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

You could try the 535xx driver behavior, https://bbs.archlinux.org/viewtopic.php … 0#p2240550
For the GPU generation, "nvidia_drm.fbdev=0", https://wiki.archlinux.org/title/Kernel_parameters and https://wiki.archlinux.org/title/NVIDIA … P_firmware might be worth some shot.

Offline

#9 2025-05-08 15:40:28

shana133
Member
Registered: 2020-03-29
Posts: 10

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

seth wrote:

You could try the 535xx driver behavior, https://bbs.archlinux.org/viewtopic.php … 0#p2240550
For the GPU generation, "nvidia_drm.fbdev=0", https://wiki.archlinux.org/title/Kernel_parameters and https://wiki.archlinux.org/title/NVIDIA … P_firmware might be worth some shot.

I've tried those nvidia parameters but same results.
I've matched packages that I currently have installed with the 535xx equivalent:

yay -S nvidia-535xx-utils nvidia-535xx-dkms opencl-nvidia-535xx lib32-nvidia-535xx-utils lib32-opencl-nvidia-535xx libxnvctrl-535xx nvidia-535xx-settings
 -> No AUR package found for nvidia-utils=535.216.01
 -> could not find all required packages: nvidia-utils =535.216.01

Or would it be better to first remove existing ones then in the next transaction try to install those listed above? Tried to do it in a single transaction and replace packages.
After failing to reasonably install 535xx packages I went with downgrade to 535.113 but nvidia-dkms fails to build with 6.14.2 kernel.
I'd need to downgrade kernel Linux 6.14.2-arch1-1 to 6.1 lts or something like that to make it work which I'm not comfortable doing. In addition I have very small boot partition(15mb space remaining after building initramfs image) which cannot be resized to accommodate fallback kernels.
I do have separate drive where I started setting up system(transitioning to pipewire but not all work yet so not really daily driver system) so I could try reproducing this there.

Offline

#10 2025-05-08 20:38:23

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

After failing to reasonably install 535xx packages

"reasonably" and "yay" are mutually exclusive.
It tries to install some versioned nvidia-utils instead of nvidia-535xx-utils for whatever silly reason.
Focus on nvidia-535xx-utils and nvidia-535xx-dkms, you can change the other packages afterwards.
You can also try to first uninstall the nvidia packages (you'll have to remove egl-gbm, egl-wayland and egl-x11 anyway), but there's no guarantee that yay will not come up with that "conflict" (nvidia-535xx-utils provides nvidia-utils) again, but I suspect that happens because https://aur.archlinux.org/packages/libxnvctrl-535xx lists a generic nvidia-utils version as dependency, so postpone downgrading that in a second step.

Offline

#11 2025-05-09 10:12:16

shana133
Member
Registered: 2020-03-29
Posts: 10

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

I did narrow down yesterday which package caused that and tried to install just nvidia-535xx-utils nvidia-535xx-dkms lib32-nvidia-535xx-utils before you mentioned. That's what I meant by reasonably - targeting just main packages then moving to other ones. Yesterday after installing nvidia-535xx-dkms and its utils `dkms install --no-depmod nvidia/535.247.01 -k 6.14.2-arch1-1` had issues to complete.

sudo dkms install nvidia/535.113.01 -k 6.14.2-arch1-1
...
Building module(s)......(bad exit status: 2)
Failed command:
'make' -j16 IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=6.14.2-arch1-1 modules
Error! Bad return status for module build on kernel: 6.14.2-arch1-1 (x86_64)

Weirdly enough I did upgrade nvidia to latest 570.144, reboot then installed those 3 packages I mentioned and it built without issues.
egl-wayland is required by nvidia-535xx-utils so didn't uninstall egl-x11 as well, just egl-gbm.
Both nvidia-535xx-settings and libxnvctrl-535xx depend on "nvidia-utils=${pkgver}".
Looking at what nvidia-535xx-utils provides is:
Provides                      : nvidia-utils=535.247.01 (and other things)

Since it failed to install with yay I did download a snapshot and updated PKGBUILD.
So the issue is in PKGBUILD for nvidia-535xx-settings which expects pkgver=535.216.01. After updating makedepends and depends to current utils version it built just fine.

After rebooting the first difference I noticed is that during startup console only the primary display was active. On nvidia 570 all 3 displays were active. I had to reanable nvidia-suspend.service, nvidia-resume.service and nvidia-hibernate.service to work with NVreg_PreserveVideoMemoryAllocations=1 otherwise the suspend would not work. It did work with 0 and the services disabled.

Now after resume from supend there are no freezes(spotify, discord, etc), no hangups or application crashes(smplayer).
I'll mark it as solved but we can discuss further if you want me to check more things.

Offline

#12 2025-05-09 12:45:37

seth
Member
Registered: 2012-09-03
Posts: 64,303

Re: [SOLVED] Nvidia system shortly unresponsive after resume from suspend

You should probably just subscribe to https://bbs.archlinux.org/viewtopic.php … 0#p2240550 to keep track of the situation.
Eventually the 535xx solution will cease to work.
Smells like it's related to the fbdev stuff, though.

Offline

Board footer

Powered by FluxBB