You are not logged in.

#1 2024-11-07 01:51:27

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 116
Website

[SOLVED]Sleeping in arch linux is broken on nvidia gpus

I have an acer nitro 5 with an amd ryzen 7 with integrated graphics and a discrete rtx 3050 and have recently installed arch linux with plasma wayland but whenever i put my computer to sleep and then wake it up, it just has a blinking cursor and then just freezes. is there anything i need to do. the journalctl logs only go up to when it was commanded to sleep with the last log being

kernel: PM: suspend entry (deep)

Last edited by Omarz2012 (2024-11-12 00:25:40)

Offline

#2 2024-11-07 12:33:14

ZeliosCraft
Member
Registered: 2023-09-30
Posts: 4

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

Hi there. It looks like something related to graphics drivers or, maybe, power management configuration.
Try disabling Wayland and using X11 session. Restart your computer and during login screen choose a X11 plasma session. Put computer to sleep and see if problem persists.
I hope this can help you to get more details of your issue.

Offline

#3 2024-11-07 13:29:04

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 116
Website

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

update: restarting sddm seem to help a bit

ZeliosCraft wrote:

Hi there. It looks like something related to graphics drivers or, maybe, power management configuration.
Try disabling Wayland and using X11 session. Restart your computer and during login screen choose a X11 plasma session. Put computer to sleep and see if problem persists.
I hope this can help you to get more details of your issue.

why disable wayland

Offline

#4 2024-11-07 14:00:56

ZeliosCraft
Member
Registered: 2023-09-30
Posts: 4

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

The issue could be related to Wayland's power management integration. This is a guess only. Did you tryied? Does it change anything?

Offline

#5 2024-11-07 16:13:15

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 116
Website

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

I will once I come home

ZeliosCraft wrote:

The issue could be related to Wayland's power management integration. This is a guess only. Did you tryied? Does it change anything?

Edit: It has nothing to do with the display manager

Last edited by Omarz2012 (2024-11-07 23:10:35)

Offline

#6 2024-11-07 23:09:39

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 116
Website

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

restarting sddm seems to fix the issue? but then it breaks again when i set it to sleep for a second time
my journalctl

Nov 07 17:37:07 omarscoolarchernitro5 org_kde_powerdevil[1209]: Sleep event. connector=card2-eDP-1, dref not set
Nov 07 17:37:06 omarscoolarchernitro5 wpa_supplicant[708]: wlan0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-41 noise=9999 txrate=175600
Nov 07 17:37:06 omarscoolarchernitro5 kernel: ACPI: button: The lid device is not compliant to SW_LID.

at this point should i just reinstall

Last edited by Omarz2012 (2024-11-07 23:32:58)

Offline

#7 2024-11-08 08:33:14

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,752

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

at this point should i just reinstall

Spoiler: that will achieve nothing w/ 99.98% probability.


https://bbs.archlinux.org/viewtopic.php?id=300676
https://wiki.archlinux.org/title/NVIDIA … er_suspend
Disable those services and add

nvidia_drm.fbdev=0 nvidia.NVreg_PreserveVideoMemoryAllocations=0

to the https://wiki.archlinux.org/title/Kernel_parameters (both currently default to 1)
You might also wanna try https://aur.archlinux.org/packages/nvidia-535xx-dkms

Offline

#8 2024-11-10 21:27:56

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 116
Website

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

so i disabl nvidia-suspend, nvidia-hibernate and nvidia-resume right?

seth wrote:

at this point should i just reinstall

Spoiler: that will achieve nothing w/ 99.98% probability.


https://bbs.archlinux.org/viewtopic.php?id=300676
https://wiki.archlinux.org/title/NVIDIA … er_suspend
Disable those services and add

nvidia_drm.fbdev=0 nvidia.NVreg_PreserveVideoMemoryAllocations=0

to the https://wiki.archlinux.org/title/Kernel_parameters (both currently default to 1)
You might also wanna try https://aur.archlinux.org/packages/nvidia-535xx-dkms

Offline

#9 2024-11-10 21:50:34

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,752

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

If you don't disable "nvidia.NVreg_PreserveVideoMemoryAllocations=0" you'll get an error from that.

Offline

#10 2024-11-11 22:23:25

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 116
Website

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

so i disable preserve meory allocations and fbdev then reboot, and then i disable the services right?

seth wrote:

If you don't disable "nvidia.NVreg_PreserveVideoMemoryAllocations=0" you'll get an error from that.

Last edited by Omarz2012 (2024-11-11 22:59:52)

Offline

#11 2024-11-11 22:39:53

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,752

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

Yes.

Offline

#12 2024-11-12 00:25:14

Omarz2012
Member
From: Oshawa, Canada
Registered: 2024-10-19
Posts: 116
Website

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

Thx it works.

Offline

#13 2025-01-29 19:57:00

jdu
Member
Registered: 2025-01-29
Posts: 1

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

Funny, sleep is working for me in wayland but not x11 (initially it didn't work on either but I got it to work on Wayland. These kms flags don't do anything for me (although I have fbdev and PreserveVideoMemoryAllocations set to 1 for wayland, flipping them to zero has done nothing and my computer wakes to a black screen/cursor. sometimes the GUI finally appears, most times it doesn't.

My wayland settings:

[root@arch mark]# cat /etc/modprobe.d/nvidia.conf 
options nvidia NVreg_PreserveVideoMemoryAllocation=1 NVreg_TemporaryFilePath=/var/tmp NVreg_UsePageAttributeTable=1
options nvidia_drm modeset=1 fbdev=1
# x11
#options nvidia NVreg_PreserveVideoMemoryAllocation=0 NVreg_TemporaryFilePath=/var/tmp
#options nvidia-drm modeset=1 fbdev=0

any ideas?

[root@arch modprobe.d]# lsmod | grep nvidia
nvidia_uvm           3837952  0
nvidia_drm            135168  155
nvidia_modeset       1671168  88 nvidia_drm
video                  81920  2 amdgpu,nvidia_modeset
drm_ttm_helper         16384  3 amdgpu,nvidia_drm
nvidia              77496320  1442 nvidia_uvm,nvidia_modeset

Last edited by jdu (2025-01-29 19:59:16)

Offline

#14 2025-05-07 10:51:39

__pedro_andrade
Member
Registered: 2025-02-22
Posts: 4

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

I can bypass this trouble by adding a script in shortcut Ctrl + Shift + F11 that reset the kwin in the x11:
killall kwin_x11; nohup kwin_x11 --replace > /dev/null 2>&1 &
After arrounf 10 sec, the black screen with the mouse cursor makes be in the graphic enviorment.

After this execution the desktop screen stay black, so use this another script for reset the plasmashell and recover them:
kquitapp5 plasmashell && kstart5 plasmashell

I just put this one in the Ctrl + Shift + F12 shortcut

Its not solve the problem, but works fine. Hope that can help anybody else smile

Last edited by __pedro_andrade (2025-05-07 10:54:06)

Offline

#15 2025-05-07 15:31:30

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,752

Re: [SOLVED]Sleeping in arch linux is broken on nvidia gpus

You probably don't have to restart kwin, cycling the compositor (SHIFT+Alt+F12 and iirc there also used to be some dbus function) should™ suffice?

Offline

Board footer

Powered by FluxBB