How to set up NVIDIA drivers with .run installer on OpenMandriva ROME

Keep in mind, this is not the recommended way to install NVIDIA drivers (99.9% of the time the repository provided drivers will work and they are a better choice in near every way possible), it also involves a little bit more general legwork and unexpected issues might arise in specific scenarios. Generally recommended that you know what you’re doing

If you have an issue with the repo drivers (for example at the moment it breaks Wayland on some setups like in my use case) or you want more control over the driver version, you can follow through this little guide. It’s preferred that you have a fresh installation of OM ROME (and without any nvidia stuff installed prior)

  1. Update the system with sudo dnf dsync --refresh then reboot

  2. Download https://www.nvidia.com/en-us/drivers/details/237587 (or other version, I’ll be going with 565.77 for this post), set it as executable in file properties or by running chmod +x command

  3. Open OM welcome, go to Applications tab > Development > install C/C++ Compilers Suite

  4. Open terminal and enter these comments one by one in this exact order
    sudo dnf install kernel-desktop-devel
    sudo dnf install dkms (make sure it isn’t trying to install an another kernel, this is a little quirk with the dkms package at the moment of writing this post)
    sudo dnf install acpid libglvnd-devel pkgconfig egl-wayland
    systemctl set-default multi-user.target
    Reboot

  5. You’ll boot to console mode, login then enter root by sudo su. Navigate to the location of downloaded driver (example cd /home/user/Downloads) then run ./NVIDIA-Linux-x86_64-565.77.run

When the installer opens, there’ll be some prompts

  • If it asks about nouveau, allow it to blacklist the module but skip rebuilding initramfs so it lets you install
  • Select Yes if you need 32-bit compatibility libraries
  • If it asks about registering with DKMS, select yes (so the driver automatically rebuilds with every new kernel version)
  • Select Rebuild initramfs, it’ll fail but ignore that
  • Select yes for nvidia-xconfig utility
  1. After it’s done, run these commands one by one
    echo "options nvidia-drm modeset=1 fbdev=1" >> /etc/modprobe.d/nvidia.conf
    dracut --regenerate-all --force (updates initramfs)
    grub2-mkconfig -o /boot/grub2/grub.cfg
    systemctl set-default graphical.target
    reboot
    That’s it, you should be able to login to desktop

  2. If you want working suspend/sleep, enter these in terminal
    sudo su
    echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" >> /etc/modprobe.d/nvidia.conf
    systemctl enable nvidia-suspend.service
    systemctl enable nvidia-hibernate.service
    systemctl enable nvidia-resume.service
    Reboot

To install a newer driver version you’ll need to

  1. Download it’s run file
  2. Enter systemctl set-default multi-user.target in terminal then reboot
  3. Run the installer and go through the steps as described before
  4. Run the dracut and grub-mkconfig commands as described before (every time you install a newer version)
  5. Enter systemctl set-default graphical.target in terminal then reboot

This probably works on Rock as well but I didn’t verify. Feel free to point out anything wrong or left out

1 Like

Really well written guide, thank you. Everything went as stated from start to finish.

Unfortunately for my case specifically, I’m still stuck on Loading initial ramdisk... after rebooting following Step 6.

Context for other readers: Boot hangs after 'initiating ramdisk' when installed - #38 by DeviateDefiant

We also package the dkms kmod.

Huh, wonder if it works with wayland just like the .run driver. sadly uninstalling the latter will probably brick my system

It’s probably a config they package in the .run driver, then. We don’t ship that config because it’s out of spec for xorg configs (i.e. /usr/share/X11/xorg.conf.d).

It causes the dreaded “Loading initial ramdisk…” thing after uninstallation, so I’ll probably wait until I have to reinstall or something to try the dkms kmod. That said, probably should’ve mentioned this caveat in my post, can’t edit it anymore though