NVIDIA on Hyprland: black screen at start, flicker on wake, or the wrong GPU driving the outputs
Re-audited against this Omarchy 4 workstation, which has an NVIDIA RTX 3090 with nvidia-open-dkms 610.57.04-1 and hyprland 0.56.2-1, and against the current Hyprland and Arch wikis. Most of the record held: the driver split, the early-KMS MODULES list, the i915-first note for Intel hybrids, the AQ_DRM_DEVICES and AQ_FORCE_LINEAR_BLIT advice with the udev symlink recipe, and the XWayland explicit-sync version floors all still match content/nvidia/_index.md and content/configuring/extra/multi-gpu.md in hyprwm/hyprland-wiki. Omarchy's side still matches install/hardware/nvidia.sh and default/hypr/nvidia.lua, both read on disk. Four things were wrong, and three of them are version drift. First, /sys/module/nvidia_drm/parameters/modeset is declared bool, 0400 at line 35 of /usr/src/nvidia-610.57.04/kernel-open/nvidia-drm/nvidia-drm-linux.c, so the record's symptom, fix and verify all tell the reader to run a command that returns Permission denied unprivileged. Confirmed by running it here. It needs sudo, and the Arch wiki prints it with a root prompt for the same reason. Second, the whole modeset step is now largely obsolete: nvidia-drm-os-interface.c line 45 sets nv_drm_modeset_module_param = true as the in-driver default, and the Arch wiki says DRM has been enabled by default since nvidia-utils 560.35.03-5, so framing modeset=1 as the headline cause misdirects a reader on a current install. Third, sudo mkinitcpio -P does not work on Omarchy 4. /etc/mkinitcpio.d/ is empty here and /usr/bin/mkinitcpio calls die 'No presets found in %s' in the -P case, so the command aborts and rebuilds nothing. Omarchy builds a UKI through limine-mkinitcpio-hook, whose script is /usr/share/libalpm/scripts/limine-mkinitcpio-install, so the fix now says to fire that hook by reinstalling the kernel package, and notes that /usr/bin/omarchy-update-pacman-guard aborts only when -S and -u are both present, so nothing here trips the guard and there is no bare -Sy. Fourth, step 6 is stale: the Arch NVIDIA/Tips_and_tricks page says NVreg_PreserveVideoMemoryAllocations was for the 430 to 590 drivers and was succeeded by NVreg_UseKernelSuspendNotifiers=1 on 595 and later, and that the three nvidia sleep services are now disabled by default per upstream. Confirmed on this box: nvidia-utils ships /usr/lib/modprobe.d/nvidia-sleep.conf setting NVreg_UseKernelSuspendNotifiers=1 and NVreg_TemporaryFilePath=/var/tmp, sort /proc/driver/nvidia/params shows both, /proc/cmdline carries no nvidia parameter at all, and systemctl is-enabled nvidia-suspend nvidia-hibernate nvidia-resume returns disabled three times. The record's advice to enable them would be a regression. I also corrected two smaller points. hyprctl getoption cursor:use_cpu_buffer returns int: 2 with set: false here, and the wiki's config-options table gives 2 as auto, enabled with NVIDIA, so setting it to 1 on an NVIDIA card is a no-op and no_hardware_cursors is the knob that does something. Omarchy sets ELECTRON_OZONE_PLATFORM_HINT to wayland in envs.lua, not auto in nvidia.lua, which the previous audit noted as a nit without giving the value. The kernel-parameter branch now names Omarchy's real mechanism, /etc/limine-entry-tool.d/*.conf, which I read on disk. Not exercised: I changed nothing, rebuilt no initramfs and rebooted nothing, so the corrected rebuild path is read from the hook script and mkinitcpio source rather than run. I could not list /boot to confirm the fallback UKI file exists, because the ESP is mounted dmask=0077, so the danger note tells the reader to check the boot menu instead. This machine is a single-GPU NVIDIA desktop, so the hybrid and multi-GPU branches were checked against the wiki only. Severity and frequency are left alone: the modeset branch is now rare, but the multi-GPU, cursor and XWayland flicker branches are still very common on NVIDIA, and a black screen at start is still high.
Editing /etc/mkinitcpio.conf.d and rebuilding the initramfs can leave you with an image that references a module that does not exist, which boots to a black screen. Confirm dkms status shows the module installed for every kernel before rebooting. Do not run mkinitcpio -P on Omarchy 4: with no presets in /etc/mkinitcpio.d/ it aborts rather than rebuilding, and the real path is the limine-mkinitcpio-hook pacman hook, reached by reinstalling the kernel package. Omarchy 4 does give you a way back: /etc/limine-entry-tool.d/omarchy-defaults.conf sets ENABLE_LIMINE_FALLBACK=yes and a BOOT_ORDER of *, *fallback, Snapshots, so a fallback entry and Snapper snapshots are selectable in the boot menu. Check that the fallback entry is really there before you reboot, because a machine that has never rebuilt its UKI may not have one yet. Loading the NVIDIA modules early also breaks resume from hibernation, because the nvidia module in the initramfs has no access to NVreg_TemporaryFilePath where the previous video memory is stored. If you hibernate, drop the MODULES line and rebuild.
Symptom
Hyprland starts to a black screen or exits immediately on an NVIDIA box, or it runs but flickers badly in Electron apps and XWayland games, or on a hybrid laptop the external HDMI/DP outputs are dead while the internal panel works, or the mouse pointer leaves a trail or disappears over fullscreen windows. sudo cat /sys/module/nvidia_drm/parameters/modeset prints N instead of Y. That file is mode 0400, so an ordinary user gets Permission denied rather than a letter, and a permission error is not a diagnosis.
Cause
Four separate NVIDIA-specific requirements, all of which look the same from the user's seat. (1) DRM mode setting is off, so there is no DRM master for the compositor to take. On drivers older than 560 this had to be switched on by hand with nvidia_drm.modeset=1. From nvidia-utils 560.35.03-5 Arch enables it by default, and in the 610 series the module's own default is already on, so on a current Arch or Omarchy install this branch is almost always already satisfied and the real fault is one of the other three. (2) The wrong driver package for the card. 50xx-series and newer require the open kernel modules, NVIDIA recommends them for Turing and Ampere (16xx/20xx) and later, and older cards need the legacy branch. (3) On hybrid Intel-or-AMD-plus-NVIDIA laptops, Aquamarine picks a primary GPU on its own and a monitor wired to the card that was not selected simply does not appear. (4) NVIDIA's hardware cursor plane needs a CPU buffer. Hyprland's cursor:use_cpu_buffer defaults to 2, auto, which already enables it on NVIDIA, so a pointer still misbehaving on a current release is a case for cursor:no_hardware_cursors rather than for use_cpu_buffer. Separately, XWayland game flicker is the implicit-sync gap, fixed by explicit sync in xorg-xwayland 24.1 or later plus wayland-protocols 1.34 or later plus driver 555 or later.
Fix
**1. Check DRM mode setting before changing anything.** The modeset parameter is declared module_param_named(modeset, nv_drm_modeset_module_param, bool, 0400) in the driver source, so only root can read it back:
sudo cat /sys/module/nvidia_drm/parameters/modeset # must print Y
On a current install it already prints Y. Arch turns DRM on by default from nvidia-utils 560.35.03-5, and in the 610 series the module default is true in the driver itself. Omarchy's installer writes both files anyway, so on Omarchy 4 /etc/modprobe.d/nvidia.conf and /etc/mkinitcpio.conf.d/nvidia.conf already exist.
Only on a driver older than 560, or a distribution that does not set it, write them yourself:
sudo tee /etc/modprobe.d/nvidia.conf >/dev/null <<'EOF'
options nvidia_drm modeset=1
EOF
sudo mkdir -p /etc/mkinitcpio.conf.d
sudo tee /etc/mkinitcpio.conf.d/nvidia.conf >/dev/null <<'EOF'
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
EOF
On a hybrid Intel iGPU plus NVIDIA dGPU machine, load i915 first or Electron and Chromium apps stall for up to a minute after boot: MODULES+=(i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm).
Keep the file name nvidia.conf. On Omarchy 4 it sorts before omarchy_hooks.conf, which reads MODULES and drops the kms hook when nvidia_drm is early loaded and NVIDIA owns every display controller. A differently named drop-in that sorts after it changes that decision.
**Regenerating the initramfs is not the same command on both.**
Plain Arch:
sudo mkinitcpio -P
Omarchy 4: do not run that. /etc/mkinitcpio.d/ holds no presets, and mkinitcpio -P calls die 'No presets found in %s' when the glob is empty, so the command aborts without building anything. Omarchy boots a UKI built by limine-mkinitcpio-hook, whose pacman hook runs /usr/share/libalpm/scripts/limine-mkinitcpio-install. Fire that hook by reinstalling the kernel package you run:
sudo pacman -S linux # or linux-lts, linux-zen, whichever is installed
Omarchy's update guard does not block this. /usr/bin/omarchy-update-pacman-guard aborts only when -S and -u appear in the same pacman command line. Never use a bare pacman -Sy.
**2. Install the right driver set.** DKMS variants so every installed kernel is covered, plus headers for each kernel:
# GSP-capable (Turing/16xx/20xx and newer, mandatory on 50xx)
sudo pacman -S --needed linux-headers nvidia-open-dkms nvidia-utils lib32-nvidia-utils egl-wayland libva-nvidia-driver
# Older, pre-GSP cards, the 580xx legacy branch (AUR)
# yay -S nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils
egl-wayland is already a dependency of nvidia-utils, so naming it is belt and braces rather than a separate step. This is the same split Omarchy's installer makes in install/hardware/nvidia.sh. Check which side you are on with omarchy-hw-nvidia-gsp; echo $? (0 means use nvidia-open-dkms).
**3. Environment variables** in ~/.config/hypr/hyprland.lua. On Omarchy 4 you do not need any of this, and duplicating it only creates a second place to keep in step. Omarchy sets NVD_BACKEND, LIBVA_DRIVER_NAME and __GLX_VENDOR_LIBRARY_NAME in /usr/share/omarchy/default/hypr/nvidia.lua, gated on whether the card is GSP-capable, and it sets ELECTRON_OZONE_PLATFORM_HINT to wayland in /usr/share/omarchy/default/hypr/envs.lua. On pre-GSP cards Omarchy sets NVD_BACKEND to egl and leaves LIBVA_DRIVER_NAME unset.
On any other distribution:
hl.env("LIBVA_DRIVER_NAME", "nvidia")
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
hl.env("NVD_BACKEND", "direct") -- "egl" on pre-GSP cards
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") -- stops Electron/CEF flicker
**4. Pick the GPU explicitly on multi-GPU and hybrid boxes.** Never use a bare /dev/dri/cardN, because those numbers are reassigned at boot. Find the PCI id, then pin a udev symlink:
lspci -d ::03xx # list display controllers
ls -l /dev/dri/by-path # map PCI id to cardN
AMD_IGPU_ID=$(lspci -d ::03xx | grep 'AMD' | cut -f1 -d' ')
printf 'KERNEL=="card*", KERNELS=="0000:%s", SUBSYSTEM=="drm", SUBSYSTEMS=="pci", SYMLINK+="dri/amd-igpu"\n' "$AMD_IGPU_ID" \
| sudo tee /etc/udev/rules.d/amd-igpu-dev-path.rules
sudo udevadm control --reload && sudo udevadm trigger
-- First entry is the primary renderer. Any card that drives a monitor you
-- want to use MUST appear in this list, even if it is not primary.
hl.env("AQ_DRM_DEVICES", "/dev/dri/amd-igpu:/dev/dri/card1")
hl.env("AQ_FORCE_LINEAR_BLIT", "0") -- last resort for a broken secondary monitor
**5. Cursor artefacts.** Check what is in effect before setting anything:
hyprctl getoption cursor:use_cpu_buffer
hyprctl getoption cursor:no_hardware_cursors
Both default to 2, auto. use_cpu_buffer auto means enabled on NVIDIA, so on an NVIDIA card it is already on and writing use_cpu_buffer = 1 changes nothing. The option that changes behaviour is no_hardware_cursors, whose auto means disable only while tearing:
hl.config({
cursor = {
no_hardware_cursors = 1, -- 0 use hw cursors if possible, 1 never, 2 auto
},
})
On Omarchy put that in ~/.config/hypr/looknfeel.lua, which is where Omarchy's own install/user/hardware/fix-nouveau-cursor.sh appends the same setting for nouveau cards.
**6. Suspend and wake.** The mechanism changed in the 595 series and the old advice is now wrong on a current driver.
Drivers 595 and later, which includes everything Omarchy 4 installs today: video memory preservation is handled by kernel suspend notifiers, set by the packaged /usr/lib/modprobe.d/nvidia-sleep.conf. There is nothing to add to the kernel command line, and nvidia-suspend.service, nvidia-hibernate.service and nvidia-resume.service are deliberately disabled. Leave them disabled. Verify with:
sort /proc/driver/nvidia/params | grep -E 'UseKernelSuspendNotifiers|TemporaryFilePath'
You want UseKernelSuspendNotifiers: 1 and TemporaryFilePath: "/var/tmp".
Drivers 430 to 590 only: enable nvidia-suspend.service, nvidia-hibernate.service and nvidia-resume.service, which Arch already does, and put nvidia.NVreg_PreserveVideoMemoryAllocations=1 on the kernel command line. On Omarchy 4 a kernel parameter goes in a drop-in under /etc/limine-entry-tool.d/, not in /etc/default/grub, and the UKI has to be rebuilt afterwards:
printf 'KERNEL_CMDLINE[default]+=" nvidia.NVreg_PreserveVideoMemoryAllocations=1"\n' \
| sudo tee /etc/limine-entry-tool.d/nvidia.conf
sudo pacman -S linux
Verify
sudo cat /sys/module/nvidia_drm/parameters/modeset # Y
sort /proc/driver/nvidia/params | grep -E 'UseKernelSuspendNotifiers|TemporaryFilePath'
hyprctl systeminfo | grep -iA2 'GPU information'
hyprctl monitors | grep '^Monitor' # every physical output listed
nvidia-smi
vainfo
The modeset read needs root because the parameter is mode 0400. /proc/driver/nvidia/params is readable unprivileged. A full-screen XWayland game should no longer flicker.
Sources
- https://wiki.hypr.land/Nvidia/
- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Multi-GPU/
- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/
- https://wiki.hypr.land/Configuring/Basics/Variables/
- https://github.com/basecamp/omarchy/blob/quattro/install/hardware/nvidia.sh
- https://github.com/basecamp/omarchy/blob/quattro/default/hypr/nvidia.lua
- https://wiki.archlinux.org/title/NVIDIA
- https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks