You are not logged in.

#1 2024-08-09 17:19:22

Sidotre
Member
Registered: 2024-08-09
Posts: 6

[SOLVED] Nvidia dGPU does not turn off while not in use.

My laptop has an r7 6800h cpu and an rtx 3070 gpu. The nvidia gpu consumes 10 W of power when idle which drains my battery.
To disable it while not running light programs, i followed the instructions told by the wiki https://wiki.archlinux.org/title/PRIME# … Management
i tried making the configuration files myself and also intalling the  nvidia-prime-rtd3pm package from the AUR.
After rebooting, i ran cat "/sys/bus/pci/devices/0000:01:00.0/power/runtime_status" but even when i closed all other apps, the gpu was still active and was consuming 10 W of power.
I don't recall installing a background app that would need the gpu to be active at all times so i'm not sure if this is caused by an external app or if i'm soing something wrong with the configuration.
What can be done about this?

Edit: I should probably mention that i'm using TLP.

https://gitlab.gnome.org/GNOME/mutter/-/issues/2969
It seems this issue has been a thing since gnome 43.

SOLVED: Changing the name of the file "/usr/share/glvnd/egl_vendor.d/10_nvidia.json" to "90_nvidia.json" decreases the priority of the nvidia gpu. This makes the system start the iGPU first which in turn makes gnome-shell to not be render by the dGPU. After this change nvidia-smi shows no processes running and the gpu turns off a few seconds sfter boot when on battery. This seems to have nearly doubled my battery life. Very nice.

Last edited by Sidotre (2024-08-09 20:07:22)

Offline

#2 2024-08-09 18:05:43

topcat01
Member
Registered: 2019-09-17
Posts: 288

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

Does nvidia-smi show anything running on the GPU?

Offline

#3 2024-08-09 18:13:14

Sidotre
Member
Registered: 2024-08-09
Posts: 6

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.58.02              Driver Version: 555.58.02      CUDA Version: 12.5     |
|-----------------------------------------+------------------------+----------------------+
| 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 3070 ...    On  |   00000000:01:00.0 Off |                  N/A |
| N/A   41C    P8              9W /  115W |      12MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      1864      G   /usr/bin/gnome-shell                            2MiB |
+-----------------------------------------------------------------------------------------+

It seems that gnome-shell is running with the nvidia gpu. How do i pass that to the iGPU?

Offline

#4 2024-08-09 18:15:03

topcat01
Member
Registered: 2019-09-17
Posts: 288

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

That is why it does not turn off - gnome-shell is keeping it open. Are you not using prime-run/gpu offloading?

Offline

#5 2024-08-09 18:22:21

Sidotre
Member
Registered: 2024-08-09
Posts: 6

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

i do use prime-run for some games but other than that, i haven't done much configuration after installing the nvidia drivers

Offline

#6 2024-08-09 18:56:21

topcat01
Member
Registered: 2019-09-17
Posts: 288

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

https://gitlab.gnome.org/GNOME/mutter/-/issues/2969
Looks like this is a known issue. I don't use gnome.

You could either disable the dgpu completely or try something like:
https://wiki.archlinux.org/title/Waylan … IA_modules

Offline

#7 2024-08-09 19:06:41

Sidotre
Member
Registered: 2024-08-09
Posts: 6

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

quote from gtlab thread
"One way to solve this problem (at least on ubuntu 22.04 with Wayland) is to change the priority in /usr/share/glvnd/egl_vendor.d/ i.e. rename 10_nvidia.json to 90_nvidia.json. Then iGPU is always used (by gnome-shell and gnome-remote-desktop)."
after doing this, nvidia-smi shows no processes that are running

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.58.02              Driver Version: 555.58.02      CUDA Version: 12.5     |
|-----------------------------------------+------------------------+----------------------+
| 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 3070 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   41C    P8              9W /  115W |       2MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

However, the output of " cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status" is still "active". Shouldn't it be powering off?

Offline

#8 2024-08-09 19:17:28

topcat01
Member
Registered: 2019-09-17
Posts: 288

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

Assuming you have set up power management successfully, it should work. Don't run nvidia-smi for a bit as it might wake up the card (or any other tooling; cat on the status file is ok). I would also reboot just to be sure.

Last edited by topcat01 (2024-08-09 19:18:01)

Offline

#9 2024-08-09 19:27:35

Sidotre
Member
Registered: 2024-08-09
Posts: 6

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

I'm sure i set it up correctly, and i also rebooted. But no luck. The card is still going even though there should be nothing preventing it from stopping.

Offline

#10 2024-08-09 20:01:55

Sidotre
Member
Registered: 2024-08-09
Posts: 6

Re: [SOLVED] Nvidia dGPU does not turn off while not in use.

OK it's solved. I did everything right and only needed to be on battery power for the settings to take effect.
the output of cat /sys/bus/pci/devices/0000\:01\:00.0/power_state is now D3cold which means it's suspended.
Thanks for the help!

Offline

Board footer

Powered by FluxBB