You are not logged in.
I have an NVidia optimus laptop with an Ampere card (RTX 3050M 4GB) and have been having trouble with the kernel losing track of the power state of the laptop after resuming from hibernation.
The dGPU is configured to enter D3Cold after some time of inactivity, using the configuration on the wiki. This works properly, with the dGPU booting up hot but turning off after some seconds until queried by a userland program.
The problem is with the hibernate function (My laptop has a firmware bug which prevents S3 suspend from working at all, alas).
Hibernate works fine, the system will write to disk and power off and then resume properly on next boot. The problem is that the kernel loses track of the dGPU's power state after resume. What do I mean by this?
After resuming from hibernate, the dGPU as expected will be on. The kernel reports that it is on in the */power/runtime_status sysfile for the card. After some seconds, the dGPU is detected as inactive/not in use and the signal to power it off is sent by the kernel. The kernel will report that the dGPU is suspended in the same sysfile, however it won't be. My laptop's LED indicator for the dGPU remains on and the dGPU doubles the power draw of the laptop.
Sending a query to the dGPU (in this case by running nvidia-smi) will cause the same brief pause as usual, indicating the kernel is sending the signal to power the dGPU back up, after which the program runs, the kernel correctly reports the dGPU as active, and then after some time the dGPU will properly shut down again.
Is there a convenient way to fix this? This seems like a kernel/nvidia driver bug
Offline