OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
gpu-drivers medium very-common DISPUTE

Get the NVIDIA dGPU to actually power down on a hybrid laptop

omarchyarchendeavouroscachyosmanjaronvidiaintelamdhyprlandwaylandlaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The udev rules are byte-identical to Arch's PRIME#PCI-Express Runtime D3 (RTD3) section, options nvidia "NVreg_DynamicPowerManagement=0x02" including the quoting is the wiki's own, the 0x03 note for 'Ampere or later notebooks with supported configurations' is correct, the runtime_status check path is correct, and nvidia-prime-rtd3pm really does ship those two files. Two defects in the tail: (a) VK_DRIVER_FILES=/usr/share/vulkan/icd.d/intel_icd.json is hardcoded to Intel on a record that also claims to apply to AMD iGPUs (the AMD file is radeon_icd.json), and pinning a single 64-bit ICD silently removes Vulkan from 32-bit Steam/Proton, and a wrong path here breaks Vulkan everywhere with no error message. (b) Enabling nvidia-persistenced is at best pointless here and reads as counterproductive advice in a 'make the dGPU sleep' record.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Setting VK_DRIVER_FILES and __EGL_VENDOR_LIBRARY_FILENAMES globally means Vulkan/OpenGL apps will NOT see the NVIDIA GPU unless you unset or override them per-app. Steam games launched without prime-run will silently run on the iGPU. If Runtime D3 status: Not supported persists on nvidia-open below driver 610, the udev rules have no effect.

Symptom

Battery life is roughly halved on a laptop with an NVIDIA dGPU. nvidia-smi shows the GPU permanently awake, sudo lsof +c0 /dev/nvidia* lists Hyprland and random desktop apps holding it open, and cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status never says suspended.

Cause

PCI-Express Runtime D3 power management is not configured, so the dGPU never enters D3cold. Anything that touches an EGL/Vulkan device enumeration (including the compositor itself) wakes it and keeps it up.

Fix


sudo tee /etc/udev/rules.d/80-nvidia-pm.rules >/dev/null <<'EOF'
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"

# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"
EOF

# Turing and Ampere-or-older notebooks:
sudo tee /etc/modprobe.d/nvidia-pm.conf >/dev/null <<'EOF'
options nvidia "NVreg_DynamicPowerManagement=0x02"
EOF
# Ampere-or-newer notebooks with supported configurations: use 0x03 instead.

reboot

(Or install the AUR package nvidia-prime-rtd3pm, which ships exactly these two files. Do not enable nvidia-persistenced for this: it is unrelated to RTD3.)

Verify:


cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status          # want: suspended
cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_suspended_time  # should be climbing

To stop EGL/GLX clients waking the card, default them to Mesa, but check your ICD filenames first, a bad path kills Vulkan silently:


ls /usr/share/vulkan/icd.d/ /usr/share/glvnd/egl_vendor.d/

sudo tee /etc/environment.d/50-mesa-default.conf >/dev/null <<'EOF'
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
__GLX_VENDOR_LIBRARY_NAME=mesa
EOF

Leave VK_DRIVER_FILES unset unless you have a reason to pin it. If you do set it, list every ICD you still need (Intel: intel_icd.json, AMD: radeon_icd.json, plus the 32-bit ones from that directory listing if you use Steam/Proton), colon-separated.

Verify


cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status   # suspended
cat /proc/driver/nvidia/gpus/0000:01:00.0/power              # Runtime D3 status: Enabled

If runtime_status reports active, check that power/runtime_suspended_time keeps incrementing. That also means it is asleep.

Sources

nvidia-dgpu-no-runtime-d3-battery-drain