Power management not switching off dGPU when not in use

Hi,

I have a Legion 5-15ARH05H Laptop (Lenovo) - Type 82B1 (Ryzen 4800H - GTX 1660TI)
And, although i have done everything stated in the docs, the dGPU does not switch off when not in use, in hybrid mode, in arch linux.

lspci shows 4 devices under NVIDIA and all but the VGA portion, switch off

$ lspci | grep "NVIDIA"

01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1)
01:00.3 Serial bus controller: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)
$ cat /sys/bus/pci/devices/0000\:01\:00.?/power/runtime_status

active
suspended
suspended
suspended

When the NVreg_DynamicPowerManagement parameter is set to 0x01 i get

$ cat /proc/driver/nvidia/gpus/0000:01:00.0/power

Runtime D3 status:          Enabled (coarse-grained)
Video Memory:               Active

GPU Hardware Support:
 Video Memory Self Refresh: Supported
 Video Memory Off:          Supported

While with NVreg_DynamicPowerManagement parameter set to 0x02

Runtime D3 status: Not Suported

And with NVreg_DynamicPowerManagement parameter set to 0x03

Runtime D3 status: Disabled by default

In all three cases, it never shows Power Limits.

Any help would be greatly appreciated.

nvidia-bug-report.log.gz (583.1 KB)

From user reports, this doesn’t work on Ryzen 4th gen, only on select 5th gen and newer.

Do you know why not on 4th gen?

As i understand it, the internal display is directly connected to the iGPU, so it is driven by it and not the dGPU, in which case, what does the cpu have to do with the dGPU switching off when not needed?

This looks like a nvidia driver problem, rather than a hardware one.

Unfortunately, i removed windows the first minute i got the laptop, so i did not test if it works or not.

The cpu drives the pcie bus and provides the necessary power management features through acpi which needs to be mandatory specified so the nvidia driver can use it.
I suspect amd didn’t do this before the 5th gen ryzen.
With windows, you most often have to install vedor specific software from the notebook manufacturer for power management to work.

So, maybe if i use a different OSI string in the kernel command line, it could theoretically work?

No.

So…
No chance of switching off the dGPU when not in use.
No chance of using the full power of the dGPU being limited to 80 Watts for absolutely no apparent reason.

And almost 3 days trying to fix this mess, wasted, while other laptops with the same CPU and an AMD dGPU, can and do deactivate the dGPU when not in use, in linux.

That went well.

Anyway, thanks for your help generix.

Maybe when the open kernel modules implement any power management features, there might be some hope.

Naah, i will have probably gotten rid of this laptop, in favor of an all AMD one.

I don’t need any CUDA anyway, DaVinci Resolve works perfectly fine with the AMDGPU PRO drivers, all the tools i need for my work are there, wayland is perfect out of the box, no stutters, no tears, no issues, no configs and the performance of the latest RX dGPUs is better while cosuming less power, less heat and power managemet WORKS on linux.

I’ve been an nShitia customer for many years, especially on the desktop and i, like many others, had to deal with their issues and various problems over the years, just because, when the drivers work, they work well.
But good luck on getting them to work, the same way they do on windows and have feature parity on linux.

This was the last straw.
NVIDIA, linux users, are NOT lesser people, or “not important enough”.
I am a customer and as such, i refuse to be treated like shit.

I don’t beg.
I vote with my wallet.