Getting started
Nvidia proprietary drivers⚓︎
Determine which driver is required by your GPU⚓︎
- There are three Nvidia driver options available in the Nvidia repository - nvidia-glG06, nvidia-glG05 and nvidia-glG04.
- The nvidia-glG06 package corresponds with the Nvidia 515 series driver.
- The nvidia-glG05 package corresponds with the Nvidia 470 series driver.
- The nvidia-glG04 package corresponds with the Nvidia 390 series driver.
- Please refer to the Nvidia website to determine which driver best supports your GPU.
Setup the driver⚓︎
With YaST⚓︎
- Go to YaST2.
- Then Software Management.
- On the menu, click Configuration > Repositories... (or do
Ctrl + R
). - Click Add > Community Repositories.
- Select nVidia Graphics Drivers > Accept > Trust.
- On the Configured Software Repositories > Click Ok
- Back to Software Management Windows" > View > Repositories > Select nVidia Graphics Drivers.
- Select x11-video-nvidiaG06 > Accept (Some graphic cards need G05 or G04, see the first section above)
- Reboot.
Using the command line⚓︎
- Add the Nvidia Repository. If using Tumbleweed for example, you would run
sudo zypper addrepo --refresh https://download.nvidia.com/opensuse/tumbleweed NVIDIA
. For Leap, you can runsudo zypper addrepo --refresh 'https://download.nvidia.com/opensuse/leap/${releasever}' NVIDIA
. - To auto-detect and install the right driver for your hardware, run:
sudo zypper install-new-recommends --repo nvidia
Alternatively you can also specify which version with:sudo zypper in x11-video-nvidiaG06
orsudo zypper in x11-video-nvidiaG05
orsudo zypper in x11-video-nvidiaG04
(you can usezypper se -s x11-video-nvidia
to help you determine which driver best fits your hardware`). - Reboot.
CUDA⚓︎
- CUDA can be installed with the Nvidia-ComputeG05 or Nvidia-ComputeG04 package.
- See Nvidia's documentation for further information.
Manual installation⚓︎
Warning
This setup is not supported by your distribution. Make sure you know what you are doing and you know the risks of installing NVIDIA the manual way. Before doing this, make sure you have created a snapshot so you can rollback if something goes wrong e.g. sudo snapper create
.
Sometimes, installing NVIDIA through zypper is not what you want because you want to either get the latest driver from the new feature branch or install only the things you "needed". Thus, you will do a manual install of NVIDIA. In preparation, run sudo systemctl isolate multi-user.target
and to disable your display manager, run sudo systemctl disable --now display-manager.service
. Make sure Xorg or an existing X session is not running.
- Check in
zypper
if you haveNVIDIA
repo. If there is, remove NVIDIA repo withsudo zypper removerepo NVIDIA
. - Uninstall the existing NVIDIA packages with the following commands:
$ sudo zypper remove x11-video-nvidiaG06 nvidia-glG06 # or `sudo zypper remove x11-video-nvidiaG05 nvidia-glG05` or`sudo zypper remove x11-video-nvidiaG04 nvidia-glG04` depending on the driver you are using. $ sudo zypper ref -rf # to refresh all repositories.
- Do note that NVIDIA has two "download types"; the new feature branch and production branch. Download NVIDIA.run or
nvidia-installer
with your chosen download type through your browser or throughcurl
orwget
from either of these websites: - Let's say you downloaded NVIDIA into your
$HOME
from the new feature branch which as of writing is NVIDIA 495.44, you will get theNVIDIA-Linux-x86_64-495.44.run
. Then runsudo sh -c "$HOME/NVIDIA-Linux-x86_64-495.44.run -e"
for expert mode. Choose the things you needed from the install. - Once done, run
sudo mkinitrd
which calls dracut to regenerate the initramfs to make sure the NVIDIA modules are installed. - Disabling the nouveau can already be done when installing NVIDIA-Linux.XXX.xx.run. But in case you want to disable it manually, disable the nouveau driver by adding this to your kernel parameters
rd.driver.blacklist=nouveau nouveau.modeset=0
in/etc/default/grub
or blacklisting it by running# echo "blacklist nouveau" >> /etc/modprobe.d/nouveau-blacklist.conf
. If you did the former, runsudo grub2-mkconfig -o /boot/grub/grub.cfg
. - Reboot.
Signing NVIDIA to enable Secure Boot (WIP)⚓︎
Hybrid Graphics/Optimus⚓︎
1 See Hybrid Graphics
Last update: 2022-06-14