No video after sleep (NVIDIA)

Hello

I have a NVIDIA RTX 3070 card and I am having trouble with my openSUSE install after the computer comes back from sleep. Even though the displays do get turned on, the video never shows, I get only a black screen and even the virtual terminals (crtl+alt+F?) are nos accessible (or blank, I don’t know).

Searching the internet I found out that this has been an issue with NVIDIA cards for years and people proprosed many solutions to it.

Before I go on and attempt some of those, I would like first to ask you if you could point me to the right direction.

Thank you in advance

Hi
Hmmm, what desktop environment, I have GNOME with a Quadro T400 (RTX) and a GT1030 without issues returning to the desktop when monitors (I have three) sleep…

I install the Nvidia driver the hard way (which I find is easy).


inxi -Ga

Graphics:
  Device-1: NVIDIA TU117GLM [Quadro T400 Mobile] driver: nvidia v: 515.65.01
    alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current (as of
    2022-07) arch: Turing code: TUxxx process: TSMC 12nm built: 2018-22 pcie:
    gen: 2 speed: 5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s
    bus-ID: 02:00.0 chip-ID: 10de:1fb2 class-ID: 0300
  Device-2: NVIDIA GP108 [GeForce GT 1030] vendor: eVga.com. driver: nvidia
    v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current
    (as of 2022-07) arch: Pascal code: GP10x process: TSMC 16nm
    built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 4 link-max: gen: 3
    speed: 8 GT/s bus-ID: 03:00.0 chip-ID: 10de:1d01 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: gnome-shell v: 42.4 driver: X: loaded: nvidia
    gpu: nvidia,nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x572mm (40.00x22.52")
    s-diag: 1166mm (45.9")
  Monitor-1: DP-1 pos: primary,top-left res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  Monitor-2: DP-3 pos: top-center res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  Monitor-3: DP-5 pos: primary,bottom-r res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  OpenGL: renderer: NVIDIA T400/PCIe/SSE2 v: 4.6.0 NVIDIA 515.65.01
    direct render: Yes

offload inxi -Ga

Graphics:
  Device-1: NVIDIA TU117GLM [Quadro T400 Mobile] driver: nvidia v: 515.65.01
    alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current (as of
    2022-07) arch: Turing code: TUxxx process: TSMC 12nm built: 2018-22 pcie:
    gen: 2 speed: 5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s
    bus-ID: 02:00.0 chip-ID: 10de:1fb2 class-ID: 0300
  Device-2: NVIDIA GP108 [GeForce GT 1030] vendor: eVga.com. driver: nvidia
    v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current
    (as of 2022-07) arch: Pascal code: GP10x process: TSMC 16nm
    built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 4 link-max: gen: 3
    speed: 8 GT/s bus-ID: 03:00.0 chip-ID: 10de:1d01 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: gnome-shell v: 42.4 driver: X: loaded: nvidia
    gpu: nvidia,nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x572mm (40.00x22.52")
    s-diag: 1166mm (45.9")
  Monitor-1: DP-1 pos: primary,top-left res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  Monitor-2: DP-3 pos: top-center res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  Monitor-3: DP-5 pos: primary,bottom-r res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  OpenGL: renderer: NVIDIA GeForce GT 1030/PCIe/SSE2 v: 4.6.0 NVIDIA
    515.65.01 direct render: Yes

I’m using Gnome and I installed the NVIDIA driver from their private repository (G06 version)

Can you check if you have nvidia.service

systemctl list-unit-files --type=service

I think you just nailed it:


➜  ~ systemctl list-unit-files --type=service | grep nvidia
nvidia-hibernate.service                     disabled        disabled
nvidia-persistenced.service                  disabled        disabled
nvidia-powerd.service                        disabled        disabled
nvidia-resume.service                        disabled        disabled
nvidia-suspend.service                       disabled        disabled

So, should I enable them all?

Hi
I have them disabled/masked… I don’t want any power saving features on my Desktop except screen blanking…


 systemctl list-unit-files --type=service | grep nvidia
nvidia-hibernate.service                     masked          disabled
nvidia-powerd.service                        masked          disabled
nvidia-resume.service                        masked          disabled
nvidia-suspend.service                       masked          disabled

It is disabled by default?
Try enabling it, and see if it’s going to work.
else you can follow malcolmlewis advice and see if it will work.
The problem I think is the nvidia.persistenced.service that it is not working properly and needs to be troubleshoot.
See this link https://download.nvidia.com/XFree86/Linux-x86_64/396.51/README/nvidia-persistenced.html
To avoid the hustle it’s better to use the .run driver with the option

no-systemd

you put something like this;

--no-systemd

after the .run of the installer. That’s only my own honest opinion.
If you chooses this route, you must as well install DKMS, this way you will not be reinstalling the .run nvidia driver on every kernel version upgrade.

Will definetly consider your last advice on going with the .run, but only after stressing out the “easy install” route. I hope enabling those services will solve the issue for me.

Thank you for your help

Looks like it worked.

Just enabled these services:


sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service

BTW, found this referencem, if you’re interested: https://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/powermanagement.html

Hi,
Nice to see it’s working. Thanks for the link. I’ve been in that link before when I posted a similar problem some months ago.
It was from an advice of one of the good folks in this forum. I tried without success and I gave up and just used the no-systemd option.
When I zypper dup two days ago I decided to try it again, and this time fortunately it worked.
I am posting what I did as my reference and maybe for others also who might had a chance to see this thread for future reference.

When the .run nvidia installer is installed it creates a “nvidia-persistenced-init.tar.bz2” in /usr/share/doc/NVIDIA_GLX-1.0/samples/
It has a install.sh script to automatically install the needed files to their intended target locations. a bit different from the link provided
which is to be installed manually.

On my tumbleweed I created a new /tmp partition I’m not sure if it’s needed and maybe someone can comment and correct this.
I did it to be sure I will have enough space to save video memory.

In /etc/modprobe.d/ I created a new file called “nvidia.conf” with the ff. contents.

#Power Management
options nvidia NVreg_DynamicPowerManagement=0x02
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_TemporaryFilePath=/tmp 
options nvidia_drm.modeset=1

then do dracutt -f then mkinitrd.

When I rebooted I found the nvidia.conf options were ok.

cat /proc/driver/nvidia/params

ResmanDebugLevel: 4294967295
RmLogonRC: 1
ModifyDeviceFiles: 1
DeviceFileUID: 0
DeviceFileGID: 0
DeviceFileMode: 438
InitializeSystemMemoryAllocations: 1
UsePageAttributeTable: 4294967295
EnableMSI: 1
RegisterForACPIEvents: 1
EnablePCIeGen3: 0
MemoryPoolSize: 0
KMallocHeapMaxSize: 0
VMallocHeapMaxSize: 0
IgnoreMMIOCheck: 0
TCEBypassMode: 0
EnableStreamMemOPs: 0
EnableUserNUMAManagement: 1 
NvLinkDisable: 0
RmProfilingAdminOnly: 1
PreserveVideoMemoryAllocations: 1
EnableS0ixPowerManagement: 0
S0ixPowerManagementVideoMemoryThreshold: 256
DynamicPowerManagement: 2
DynamicPowerManagementVideoMemoryThreshold: 200
RegisterPCIDriver: 1
EnablePCIERelaxedOrderingMode: 0
EnableGpuFirmware: 2
RegistryDwords: ""
RegistryDwordsPerDevice: ""
RmMsg: ""
GpuBlacklist: ""
TemporaryFilePath: "/tmp"

Suspend/sleep is working.