Heads-up: the KERNEL=="nvidia" rule in nvidia-470xx.rules can kernel-oops the system during boot.
It enumerates GPU minors via cat /proc/driver/nvidia/gpus/*/information. If udev runs it while RM is still initialising, a race that hits hardest on cold boots when the GPU takes longest to come up, the procfs read handler NULL-derefs:
BUG: kernel NULL pointer dereference, address: 00000000000002a8
Comm: cat
RIP: _nv000702rm+0x146/0x1c0 [nvidia]
Call Trace: rm_get_gpu_uuid -> nv_procfs_read_gpu_info -> proc_reg_read -> vfs_read
This turned out to be the cause of a long-standing intermittent "hangs on first boot of the day" for me, the oops wedges the console (or panics outright with oops=panic).
Fix: get the minors without reading information, e.g. iterate the gpus/ dir (readdir doesn't hit that handler):
KERNEL=="nvidia", RUN+="/usr/bin/bash -c 'i=0; for g in /proc/driver/nvidia/gpus/*; do if [ ! -c /dev/nvidia$${i} ]; then /usr/bin/mknod -Z -m 666 /dev/nvidia$${i} c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) $${i}; fi; i=$$((i+1)); done'"
Or arguably that rule could be dropped entirely, nvidia-modprobe in the last rule creates the nodes anyway.
Pinned Comments
SoftExpert commented on 2025-02-09 10:20 (UTC) (edited on 2026-03-08 12:31 (UTC) by SoftExpert)
For the beginners in need of assistance, first take a look at this recommended guide https://github.com/korvahannu/arch-nvidia-drivers-installation-guide - maybe it helps to solve the issues your are having with this version of the driver.
The majority of patches used in this package are provided by Joan Bruguera to whom we owe a tremendous depth of gratitude !
There is also the repository shared by phobos1641, where he has gathered all the patches that work for his configuration.