# Fedora Silverblue with nVidia drivers from negativo17 (how to make them work) ![Fedora Silverblue logo](https://i.imgur.com/sZhLmEu.png) ###### tags: `fedora` `silverblue` `nvidia` `drivers` `negativo17` `tutorial` *So I've finally started playing with **Fedora Silverblue 35**, because I'm looking into ways how to simplify my Linux workstation maintenance, even if it means doing a little bit more extra in the beginning… And since I'm using a desktop at home with nVidia 2070 SUPER, I had to jump at the driver support right from the beginning.* When you Google up the `Fedora Silverblue` and `nVidia drivers`, (at the time of writing) you will only see mentions of [RPMFusion](https://rpmfusion.org/) drivers for nVidia, and how to enable them. However, from my prior experience with traditional [Fedora Workstation](https://getfedora.org/en/workstation/), I know for a fact that there are -- in my opinion -- much better drivers packaged and available from [negativo17](https://negativo17.org/nvidia-driver/). And if I'm not mistaken, at some point in the past, these drivers were part of Fedora's effort to support proprietary drivers that many people have wanted (these drivers closely followed the Fedora packaging guidelines). --- And since I was not able to find any info **how to install negativo17's nVidia drivers into Silverblue**, I had to do my own research and testing. Here are my findings how to make these drivers work in Fedora Silverblue installation: 1. *Make sure to uninstall any previous nVidia drivers, and do a proper cleanup*. 2. *Update your Fedora Silverblue to the latest version & reboot.* 3. *Disable the RPMFusion's nVidia drivers repo:* ``` $ cd /etc/yum.repos.d/ $ sudo sed -ie 's/enabled=1/enabled=0/g' rpmfusion-nonfree-nvidia-driver.repo ``` 4. *Download the [negativo17's repo file for nVidia drivers](https://negativo17.org/repos/fedora-nvidia.repo):* ``` $ sudo wget https://negativo17.org/repos/fedora-nvidia.repo -o fedora-nvidia.repo ``` 5. *Update the rpm repos metadata:* ``` $ sudo rpm-ostree refresh-md ``` 6. *Install the necessary drivers (see [list of packages and their description](https://negativo17.org/nvidia-driver/#Nvidia_drivers)):* ``` $ sudo rpm-ostree install nvidia-driver nvidia-driver-libs.i686 ``` 7. OPTIONAL: *I also install NVENC encoding support (useful for OBS streaming), and support for hardware encoding for Steam In-Home Streaming, by adding these additional packages to the install command:* ``` nvenc nvidia-driver-NvFBCOpenGL ``` 8. *Disable the nouveau driver, thus forcing the usage of nVidia drivers:* ``` $ sudo rpm-ostree kargs --append=rd.driver.blacklist=nouveau \ --append=modprobe.blacklist=nouveau \ --append=nvidia-drm.modeset=1 ``` 9. *Reboot your system into new ostree.* 10. *Check that you are actually using the nVidia driver by running* `$ sudo lspci -v` *command. You should see similar output:* ``` 0a:00.0 VGA compatible controller: NVIDIA Corporation <...> <...> Kernel driver in use: nvidia Kernel modules: nouveau, nvidia_drm, nvidia ``` One more **NOTE** based on [RPMFusion's installation guide for nVidia drivers](https://rpmfusion.org/Howto/NVIDIA#Silverblue): > The step number 8. might not be needed at some point when Silverblue will support the standard way to specify this. However, right now, without that step you would be still booting with `nouveau` driver loaded, instead of nVidia's. --- ## UPDATE In case you have troubles resuming after the suspend of your machine (like e.g. artifacting or Wayland not rendering properly), make sure the services below are enabled: ``` $ sudo systemctl enable nvidia-suspend.service $ sudo systemctl enable nvidia-hibernate.service $ sudo systemctl enable nvidia-resume.service ``` Also, check that you see the `deep` selected as the output of this command: ``` $ sudo cat /sys/power/mem_sleep s2idle [deep] ``` If not, then you can enable the `deep` sleep state with this command: ``` $ sudo rpm-ostree kargs --append 'mem_sleep_default=deep' ``` And reboot your machine. If you still see some artifacting after resuming from suspend -- especially after longer time in suspend -- then there's another thing you can try: ``` $ sudo cat >> /etc/modprobe.d/nvidia-modeset.conf << EOF # Enable VRAM allocation preservation for system suspension options nvidia NVreg_PreserveVideoMemoryAllocations=1 EOF $ sudo rpm-ostree kargs --append nvidia.NVreg_PreserveVideoMemoryAllocations=1 ``` And reboot again. More info about the VRAM allocation preservation can be found [here](https://forums.developer.nvidia.com/t/resuming-from-suspend-issue-driver-450-57-fedora-32-modesetting-enabled-gtx-750-ti/146265/6). --- I hope this actually helps someone. If yes, then please, leave me a comment or like. It's nice to know that spending time writing this down wasn't for nothing… :) Thanks!