Nvidia/Intel Hybrid Graphics poor battery life: Nvidia not entering D3 (RTD3)

I have fixed D3 powersaving by manually configuring everything for my Turing MX450 after getting rid of envycontrol.

sudo envycontrol --reset
reboot

/etc/modprobe.d/nvidia-pm.conf

Note that for Turning NVreg_DynamicPowerManagement=0x03 won’t work but you can use that for Ampere or later

# below two options are already coming from /usr/lib/modprobe.d/nvidia-* files
# options nvidia NVreg_PreserveVideoMemoryAllocations=1
# options nvidia NVreg_TemporaryFilePath=/var/tmp
options nvidia-drm modeset=1
options nvidia "NVreg_DynamicPowerManagement=0x02"
options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0
options nvidia NVreg_EnableGpuFirmware=0
options nvidia NVreg_EnableS0ixPowerManagement=1
options nvidia NVreg_DynamicPowerManagementVideoMemoryThreshold=10

/etc/udev/rules.d/80-nvidia-pm.rules

Note that first three rules also exist in envycontrol code. Rest are in arch wiki

# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"

# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"

# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"

# Enable runtime PM for NVIDIA VGA/3D controller devices on adding device
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"

# 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"

Rebuild dracut or whatever you have to update initramfs and reboot

sudo dracut-rebuild

nvidia-persistenced service is already enabled and started.

Now you can see that everything is working as expected with sleep and hibernate support as well.

❯ cat /proc/driver/nvidia/gpus/0000:05:00.0/power
Runtime D3 status:          Enabled (fine-grained)
Video Memory:               Active

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

S0ix Power Management:
 Platform Support:          Supported
 Status:                    Enabled

Notebook Dynamic Boost:     Not Supported

❯  modprobe nvidia --showconfig | rg NVreg
options nvidia "NVreg_DynamicPowerManagement=0x02"
options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0
options nvidia NVreg_EnableGpuFirmware=0
options nvidia NVreg_EnableS0ixPowerManagement=1
options nvidia NVreg_DynamicPowerManagementVideoMemoryThreshold=10
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_TemporaryFilePath=/var/tmp


❯ cat /sys/bus/pci/devices/0000:05:00.0/power/runtime_suspended_time
453877
❯ cat /sys/bus/pci/devices/0000:05:00.0/power/runtime_status
suspended
❯ cat /sys/class/drm/card*/device/power_state
D3cold
D0

I have restored /usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf as well so nvidia-smi just shows Xorg by default. but since I have NVreg_DynamicPowerManagementVideoMemoryThreshold set to 10, it doesn’t prevent nvidia from entering D3cold

❯ nvidia-smi
Sun Aug 31 17:22:06 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.76.05              Driver Version: 580.76.05      CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| 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 MX450           On  |   00000000:05:00.0 Off |                  N/A |
| N/A   46C    P8            N/A  / 5001W |       5MiB /   2048MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A             950      G   /usr/lib/Xorg                             4MiB |
+-----------------------------------------------------------------------------------------+

References:

imranr comment from https://aur.archlinux.org/packages/nvidia-prime-rtd3pm