NOTE: The information in this page is NOT endorsed by the Lutris development team. It is entirely written by the community.
NOTE: Mint is not supported and these instructions MAY NOT work in Mint. Following them may leave you packages in a broken state! or leave you with missing drivers. You have been warned!
To get the latest NVIDIA drivers it is necessary to add the Proprietary GPU Drivers PPA, enable 32 bit architecture (if you haven't already), update to refresh packages and then install the 535 driver and support for the Vulkan API (will be functional only if you have a Vulkan capable GPU):
NOTE YOU DO NOT NEED TO USE A PPA TO INSTALL VULKAN AND DRIVERS
To do all of that, run this one command:
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install -y nvidia-driver-535 libvulkan1 libvulkan1:i386
Reboot to apply changes.
Warning: Please ensure your graphics card is supported by the 535 driver before installing. For a list of supported GPUs click here: https://www.nvidia.com/Download/driverResults.aspx/186156/en-us
Disclaimer: Sometimes we forget to update the guide to reference the latest version of the NVIDIA driver. You can check the latest version of the Nvidia driver for your gpu here and then replace 535 in nvidia-driver-535 with the first part of the version number (the one before the dot, 535.48.07) that is actually latest: https://www.nvidia.com/Download/index.aspx
NOTE: Mint is not supported and these instructions WILL NOT work in Mint without manual intervention that is outside the scope of this guide. Following them WILL leave your packages in a broken state!!
To make sure you are running the latest drivers for AMD/Intel graphics, you need to add kisak-mesa PPA, enable 32 bit architecture (if you haven't already), update and upgrade your system, install support for 32-bit games and install the support for Vulkan API (will be functional only if you have a Vulkan capable GPU):
NOTE YOU DO NOT NEED TO USE A PPA TO INSTALL VULKAN AND DRIVERS
To do all of that, run this one command:
sudo add-apt-repository ppa:kisak/kisak-mesa && sudo dpkg --add-architecture i386 && sudo apt update && sudo apt upgrade && sudo apt install libgl1-mesa-dri:i386 mesa-vulkan-drivers mesa-vulkan-drivers:i386
Reboot to apply changes.
Note: Only Ubuntu 18.04 and higher is supported for AMD and Intel graphics.
Note for Intel integrated graphics users: Only Skylake and newer Intel CPUs (processors) offer full Vulkan support. Broadwell, Haswell and Ivy Bridge only offer partial support, which will very likely not work with a lot of games properly. Sandy Bridge and older lack any Vulkan support whatsoever.
First, enable multilib (32-bit support).
To enable multilib repository, uncomment the [multilib]
section in /etc/pacman.conf
/etc/pacman.conf -------------------------------------------------------------------------------------- [multilib] Include = /etc/pacman.d/mirrorlist
Then upgrade the system sudo pacman -Syu
.
Warning: Please ensure your graphics card is supported by modern NVIDIA driver before installing. For a list of supported GPUs click here: https://www.nvidia.com/Download/driverResults.aspx/149138/en-us
Proprietary driver and support for Vulkan are required for proper functionality of games.
To install it, execute the following command:
Info: To make sure you're running proprietary NVIDIA drivers on Manjaro you should run sudo mhwd -a pci nonfree 0300
sudo pacman -S --needed nvidia-dkms nvidia-utils lib32-nvidia-utils nvidia-settings vulkan-icd-loader lib32-vulkan-icd-loader
To install support for Vulkan API (will be functional only if you have a Vulkan capable GPU) and 32-bit games, execute following command:
sudo pacman -S --needed lib32-mesa vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader
To install support for Vulkan API (will be functional only if you have a Vulkan capable GPU) and 32-bit games, execute following command:
sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader
Note for Intel integrated graphics users: Only Skylake and newer Intel CPUs (processors) offer full Vulkan support. Broadwell, Haswell and Ivy Bridge only offer partial support, which will very likely not work with a lot of games properly. Sandy Bridge and older lack any Vulkan support whatsoever.
Notice: openSUSE Leap releases are currently not officaly supported because they ship an older version of glibc (2.26 but 2.27 is required at least).
Usually, if you have an AMD GPU running with open source drivers (Mesa), the required packages should already be installed. If for some reason they aren't, run the following command:
sudo zypper in kernel-firmware-amdgpu libdrm_amdgpu1 libdrm_amdgpu1-32bit libdrm_radeon1 libdrm_radeon1-32bit libvulkan_radeon libvulkan_radeon-32bit libvulkan1 libvulkan1-32bit
Usually, if you have an Intel iGPU running with open source drivers (Mesa), the required packages should already be installed. If for some reason they aren't, run the following command:
sudo zypper in kernel-firmware-intel libdrm_intel1 libdrm_intel1-32bit libvulkan1 libvulkan1-32bit libvulkan_intel libvulkan_intel-32bit
The closed source NVIDIA driver is not available by default. Please check which NVIDIA GPU you have and run one of the following One-Click Installers.
Those will then add the required official NVIDIA driver repository from https://download.nvidia.com/opensuse/ and install the required NVIDIA driver package.
For Vulkan support on NVIDIA drivers also run:
sudo zypper in libvulkan1 libvulkan1-32bit
Notice: Do NOT download video drivers via building it, installing via nix-env
or such, putting the lines below and rebuilding is the safest way to download video drivers on NixOS.
Add the following lines to your NixOS hardware config, by default it should be at /etc/nixos/hardware-configuration.nix
boot.initrd.kernelModules = [ "amdgpu" ];
To use the amdgpu graphics driver on XServer, add the following lines to your NixOS config, by default it should be at /etc/nixos/configuration.nix
(customize as you prefer)
services.xserver.enable = true; # to enable the xorg server
services.xserver.videoDrivers = [ "amdgpu" ]; # to load the amdgpu kernel module
Add the following lines to your NixOS hardware configuration, by default it should be at /etc/nixos/hardware-configuration.nix
boot.initrd.kernelModules = [ "nvidia" ];
boot.blacklistedKernelModules = ["nouveau"];
Add the following lines to your NixOS configuration, by default it should be at /etc/nixos/configuration.nix
(customize as you prefer)
# Enable the Xorg Xserver
services.xserver.enable = true;
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Do not disable this unless your GPU is unsupported or if you have a good reason to.
open = true;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
Adjust the package
variable according to your needs.
Determine which Nvidia driver package you need in accordance with your hardware. The following options are available:
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production (installs 535)
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_390
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_340
For most users, the first option will be fine, but if you have a very old nvidia GPU, then using a legacy driver is needed.
To enable OpenGL and Vulkan, you can add the following lines to your NixOS configuration, the file is located at /etc/nixos/configuration.nix
by default.
hardware.opengl.driSupport = true;
# For 32 bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
];
amdvlk is not recommended but on older AMD hardware, it can be helpful, so to use amdvlk add the following lines to your configuration instead.
hardware.opengl.driSupport = true;
# For 32 bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [
amdvlk
];
And to verify if you have OpenGL properly set up, you can install clinfo
.
For additional troubleshooting steps, you can refer to the NixOS wiki