Include some power-saving options for NVIDIA GPUs

Include udev rules for enabling runtime power management for NVIDIA graphics processors using PRIME, as well as setting up some memory management improvements in the driver.
This commit is contained in:
Thomas Duckworth
2025-11-29 15:58:43 +11:00
parent fdd4dc279a
commit e6ab9b5300
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
# SPDX-FileCopyrightText: none
# NVreg_UsePageAttributeTable=1 (Default 0) - Activating the better memory
# management method (PAT). The PAT method creates a partition type table at a
# specific address mapped inside the register and utilizes the memory
# architecture and instruction set more efficiently and faster. If your system
# can support this feature, it should improve CPU performance.
#
# NVreg_InitializeSystemMemoryAllocations=0 (Default 1) - Disables clearing
# system memory allocation before using it for the GPU. Potentially improves
# performance, but at the cost of increased security risks. Write "options
# nvidia NVreg_InitializeSystemMemoryAllocations=1" in
# /etc/modprobe.d/nvidia.conf, if you want to return the default value. Note:
# It is possible to use more memory (?)
options nvidia NVreg_UsePageAttributeTable=1 \
NVreg_InitializeSystemMemoryAllocations=0

View File

@@ -0,0 +1,21 @@
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
# SPDX-FileCopyrightText: none
# Enable runtime power management for NVIDIA VGA/3D controller devices on driver bind.
ACTION=="add|bind", SUBSYSTEM=="pci", DRIVERS=="nvidia", \
ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
TEST=="power/control", ATTR{power/control}="auto"
# Disable runtime power management for NVIDIA VGA/3D controller devices on driver unbind.
ACTION=="remove|unbind", SUBSYSTEM=="pci", DRIVERS=="nvidia", \
ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
TEST=="power/control", ATTR{power/control}="on"
# Enable runtime power management 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"