Migrating to Nvidia open kernel drivers
My video card AD107 (RTX4060) supports open kernel modules so I decided to install them.
Prerequisites
- Check your card version:
lspci -k -d ::03xx
will give you card's model (RTX4060) as well as its code name (AD107). - Check support on Arch Linux NVIDIA page (applies for other distributions as well). If card's codename is NV160 or higher, open modules are available.
Installation
I use Debian 13, other distributions may have different package names. Ensure you have kernel headers as open module is a DKMS therefore it is compiled on your PC.
sudo apt install linux-headers-$(uname -r)
Then you can replace the proprietary kernel module with the open one
sudo apt install nvidia-open-kernel-dkms nvidia-kernel-dkms- --autoremove
Troubleshooting
Upon reboot I faced drivers load failure with the following message:
NVRM: Open nvidia.ko is only ready for use on Data Center GPUs.
NVRM: To force use of Open nvidia.ko on other GPUs, see the
NVRM: 'OpenRmEnableUnsupportedGpus' kernel module parameter described
NVRM: in the README.
NVRM: GPU 0000:01:00.0: RmInitAdapter failed!
NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0
[drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to allocate NvKmsKapiDevice
[drm:nv_drm_probe_devices [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to register device
As per Nvidia's instruction, you can enable this module with the following command:
echo "options nvidia NVreg_OpenRmEnableUnsupportedGpus=1" | sudo tee /etc/modprobe.d/nvidia-openpm.conf