From ad7f981e5c016858b492527b9e5b63b6ce06f746 Mon Sep 17 00:00:00 2001 From: Lukasz Boryn Date: Sun, 11 Oct 2026 22:21:45 +0200 Subject: [PATCH] fix(readme): correct NVIDIA power-management steps DynamicPowerManagement=0x02 fought the always-on udev rule, and mkinitcpio -P alone does not update Limine boot entries. --- README.md | 69 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 1e4b53e..71a40b7 100644 --- a/README.md +++ b/README.md @@ -182,58 +182,79 @@ does not affect the hang. ## NVIDIA -Install the full driver stack: - -```bash -sudo pacman -S nvidia-open-dkms nvidia-utils lib32-nvidia-utils lib32-vulkan-icd-loader lib32-mesa lib32-gnutls lib32-libpulse gamescope -``` - -Regenerate the initial ramdisk and reboot: - -```bash -sudo mkinitcpio -P -sudo reboot -``` +The Omarchy 4 installer already detects the GPU and installs the matching +driver (`nvidia-open-dkms` for GSP-capable cards, `nvidia-580xx-dkms` +otherwise), writes `options nvidia_drm modeset=1` to +`/etc/modprobe.d/nvidia.conf` on fresh installs (`nvidia-drm` and `nvidia_drm` +are equivalent to modprobe), loads the modules early via +`/etc/mkinitcpio.conf.d/nvidia.conf`, and sets the Hyprland NVIDIA environment +variables. The 32-bit libraries are added by the Steam installer below. What +remains is power management. ### Power management +This setup keeps the GPU **always on** (no runtime power-off), which avoids +wake-up glitches at the cost of battery life. + **Kernel command-line parameters (Limine).** `+=` appends to the current -kernel settings: +kernel settings. Modesetting is already enabled through modprobe, so only +`pcie_aspm=off` is needed here: ```bash sudo nvim /etc/default/limine -# add this to the file: -KERNEL_CMDLINE[default]+="nvidia-drm.modeset=1 pcie_aspm=off" +# add this line to the file: +KERNEL_CMDLINE[default]+="pcie_aspm=off" ``` +**Driver options:** + ```bash sudo nvim /etc/modprobe.d/nvidia.conf -# add this to the file: -options nvidia-drm modeset=1 -options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp NVreg_DynamicPowerManagement=0x02 +# keep the existing modeset line and add: +options nvidia NVreg_DynamicPowerManagement=0x00 ``` -Rebuild initramfs: +`0x00` disables runtime D3 power-off, matching the always-on udev rule below +(`0x02` would let the GPU power off when idle, which the rule then blocks). + +> Video memory across suspend: with the open kernel modules +> (`nvidia-open-dkms`) the driver preserves it automatically through kernel +> suspend notifiers (`NVreg_UseKernelSuspendNotifiers=1`; check with +> `grep UseKernelSuspendNotifiers /proc/driver/nvidia/params`). Only with the +> proprietary `nvidia-580xx-dkms` driver add +> `NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp` to +> the line above **and** enable the services it requires: +> `sudo systemctl enable nvidia-suspend nvidia-resume nvidia-hibernate`. +> See "Power Management" in `/usr/share/doc/nvidia/README`. + +**Apply both changes.** With Limine, `mkinitcpio -P` alone does not update the +boot entries — `limine-update` regenerates the initramfs/UKI and the entries +from `/etc/default/limine`: ```bash -sudo mkinitcpio -P +sudo limine-update ``` **Force the GPU always on** with a udev rule: ```bash sudo nvim /etc/udev/rules.d/80-nvidia-pm.rules -# add this to the file: +``` + +Add this to the file: + +``` # Keep NVIDIA GPU always on ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", ATTR{power/control}="on" -sudo reboot ``` +`0x030000` matches a GPU wired as a VGA controller; hybrid laptops where the +NVIDIA GPU is a "3D controller" need `0x030200` (check with `lspci -nn | grep -i nvidia`). + **Make persistence mode permanent:** ```bash -sudo systemctl enable nvidia-persistenced -sudo systemctl start nvidia-persistenced +sudo systemctl enable --now nvidia-persistenced sudo reboot ```