Hello all,
I cannot get suspend to work. Any help is appreciated.
I can recall it used to work, so maybe it is kernel related but I am not sure.
By not working I mean, I have a black screen upon waking up. I suspect its because of PreserveVideoMemoryAllocations
not getting set correctly. I havent tried if I can ssh into my machine in that process.
All the info I know could be useful, but please ask if something is missing.
$ systemctl list-unit-files | grep nvidia
nvidia-hibernate.service enabled disabled
nvidia-persistenced.service disabled disabled
nvidia-powerd.service disabled disabled
nvidia-resume.service enabled disabled
nvidia-suspend.service enabled disabled
$ cat /proc/driver/nvidia/params
ResmanDebugLevel: 4294967295
RmLogonRC: 1
ModifyDeviceFiles: 1
DeviceFileUID: 0
DeviceFileGID: 0
DeviceFileMode: 438
InitializeSystemMemoryAllocations: 1
UsePageAttributeTable: 4294967295
EnableMSI: 1
EnablePCIeGen3: 0
MemoryPoolSize: 0
KMallocHeapMaxSize: 0
VMallocHeapMaxSize: 0
IgnoreMMIOCheck: 0
TCEBypassMode: 0
EnableStreamMemOPs: 0
EnableUserNUMAManagement: 1
NvLinkDisable: 0
RmProfilingAdminOnly: 1
PreserveVideoMemoryAllocations: 0
EnableS0ixPowerManagement: 1
S0ixPowerManagementVideoMemoryThreshold: 256
DynamicPowerManagement: 3
DynamicPowerManagementVideoMemoryThreshold: 200
RegisterPCIDriver: 1
EnablePCIERelaxedOrderingMode: 0
EnableResizableBar: 0
EnableGpuFirmware: 0
EnableGpuFirmwareLogs: 2
EnableDbgBreakpoint: 0
OpenRmEnableUnsupportedGpus: 1
DmaRemapPeerMmio: 1
ImexChannelCount: 2048
CreateImexChannel0: 0
RegistryDwords: ""
RegistryDwordsPerDevice: ""
RmMsg: ""
GpuBlacklist: ""
TemporaryFilePath: "/var/tmp"
ExcludedGpus: ""
$ sudo cat /etc/modprobe.d/nvidia.conf
options nvidia_drm modeset=1
options nvidia_drm fbdev=1
options nvidia NVreg_EnableGpuFirmware=0
options nvidia Nvreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_EnableS0ixPowerManagement=1
options nvidia NVreg_TemporaryFilePath=/var/tmp
(so its not fully read? since PreserveVideoMemoryAllocations=0)
$ nvidia-smi
Thu Sep 5 20:12:43 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3080 Off | 00000000:01:00.0 On | N/A |
| 0% 44C P8 48W / 370W | 1213MiB / 10240MiB | 3% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 990 G /usr/lib/Xorg 303MiB |
| 0 N/A N/A 1344 G /usr/bin/kwalletd6 3MiB |
| 0 N/A N/A 1412 G /usr/bin/ksmserver 3MiB |
| 0 N/A N/A 1414 G /usr/bin/kded6 3MiB |
| 0 N/A N/A 1415 G /usr/bin/kwin_x11 10MiB |
| 0 N/A N/A 1491 G /usr/bin/plasmashell 107MiB |
| 0 N/A N/A 1570 G /usr/lib/kactivitymanagerd 3MiB |
| 0 N/A N/A 1579 G ...b/polkit-kde-authentication-agent-1 3MiB |
| 0 N/A N/A 1580 G /usr/lib/org_kde_powerdevil 3MiB |
| 0 N/A N/A 1581 G /usr/lib/xdg-desktop-portal-kde 3MiB |
| 0 N/A N/A 1784 G kdeconnectd 3MiB |
| 0 N/A N/A 1837 G /usr/bin/nextcloud 12MiB |
| 0 N/A N/A 1867 G /usr/bin/kaccess 3MiB |
| 0 N/A N/A 1868 G /usr/lib/DiscoverNotifier 3MiB |
| 0 N/A N/A 2315 C+G /opt/warpdotdev/warp-terminal/warp 36MiB |
| 0 N/A N/A 45379 G /usr/lib/firefox/firefox 606MiB |
+-----------------------------------------------------------------------------------------+
neofetch
./o. paco@candybox
./sssso- -------------
`:osssssss+- OS: EndeavourOS Linux x86_64
`:+sssssssssso/. Host: MS-7D31 1.0
`-/ossssssssssssso/. Kernel: 6.10.7-arch1-1
`-/+sssssssssssssssso+:` Uptime: 3 hours, 55 mins
`-:/+sssssssssssssssssso+/. Packages: 1442 (pacman), 36 (flatpak)
`.://osssssssssssssssssssso++- Shell: bash 5.2.32
.://+ssssssssssssssssssssssso++: Resolution: 1920x1080, 2560x1440
.:///ossssssssssssssssssssssssso++: DE: Plasma 6.1.4
`:////ssssssssssssssssssssssssssso+++. WM: KWin
`-////+ssssssssssssssssssssssssssso++++- Theme: Breeze-Dark [GTK2], Breeze [GTK3]
`..-+oosssssssssssssssssssssssso+++++/` Icons: breeze-dark [GTK2/3]
./++++++++++++++++++++++++++++++/:. Terminal: WarpTerminal
`:::::::::::::::::::::::::------`` CPU: 12th Gen Intel i7-12700K (20) @ 4.900GHz
GPU: NVIDIA GeForce RTX 3080 Lite Hash Rate
Memory: 3363MiB / 64084MiB
I also tried adding the commands from nvidia.conf
to my grubconfig.
journal of a boot
journalctl -b -4 | grep nvidia
Sep 05 15:54:18 candybox kernel: nvidia: loading out-of-tree module taints kernel.
Sep 05 15:54:18 candybox kernel: nvidia: module license 'NVIDIA' taints kernel.
Sep 05 15:54:18 candybox kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Sep 05 15:54:18 candybox kernel: nvidia: module license taints kernel.
Sep 05 15:54:18 candybox kernel: nvidia: unknown parameter 'Nvreg_PreserveVideoMemoryAllocations' ignored
Sep 05 15:54:18 candybox kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 235
Sep 05 15:54:18 candybox kernel: nvidia 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
Sep 05 15:54:18 candybox kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 560.35.03 Fri Aug 16 21:21:48 UTC 2024
Sep 05 15:54:18 candybox kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Sep 05 15:54:18 candybox kernel: nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
Sep 05 15:54:19 candybox systemd-modules-load[269]: Inserted module 'nvidia_uvm'
Sep 05 15:54:19 candybox kernel: nvidia-uvm: Loaded the UVM driver, major device number 511.
Sep 05 15:54:19 candybox kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
Sep 05 15:54:19 candybox kernel: nvidia 0000:01:00.0: vgaarb: deactivate vga console
Sep 05 15:54:19 candybox kernel: fbcon: nvidia-drmdrmfb (fb0) is primary device
Sep 05 15:54:20 candybox kernel: nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
pacman -Q | grep systemd
lib32-systemd 256.5-1
systemd 256.5-1
systemd-libs 256.5-1
systemd-resolvconf 256.5-1
systemd-sysvcompat 256.5-1
I tried disableing the systemd service files and using a workaround that was given on the forums:
sudo cat /lib/systemd/system-sleep/nvidia
#!/bin/sh
echo "$(date) $1 $2 $SYSTEMD_SLEEP_ACTION" >> /var/log/my-sleep-log
case "$1" in
pre)
case "$SYSTEMD_SLEEP_ACTION" in
suspend|hibernate)
/usr/bin/nvidia-sleep.sh "$SYSTEMD_SLEEP_ACTION"
;;
suspend-after-failed-hibernate)
/usr/bin/nvidia-sleep.sh "suspend"
;;
esac
;;
post)
/usr/bin/nvidia-sleep.sh "resume" && sleep 5
;;
esac
# orig:
# pq 2024-09-04
# see https://forums.developer.nvidia.com/t/systemds-suspend-then-hibernate-not-working-in-nvidia-optimus-laptop/213690/2
#case "$1" in
# post)
# /usr/bin/nvidia-sleep.sh "resume"
# ;;
#esac
but /var/log/my-sleep-log
was never written, so I doubt that file is getting called for me.
I am willing to put a bounty on it, since I really dont like having my computer online all the time or reboot it and having to open all the windows again. :)
Thanks!