Skip to content

Linux installation

xCollateral edited this page Mar 15, 2024 · 1 revision

Installation on Linux explained step by step

Introduction

It can be tricky for a newcomer to make the mod work, especially if you have a DIY-distro such as Archlinux, Voidlinux, Gentoo or NixOS.
This wiki page will explain to you the basics of Vulkan on linux, and will provide you several installation guides, depending on your distribution.
If you made sure to install the mod in the correct conditions (refer to the install wiki page) and yet the mod doesn't start, make sure you have the Vulkan libs installed.

First of all you must know that in the Linux world, there are 2 types of drivers (also called modules), both don't do the same thing:

Kernel Modules

They are baked into the kernel if they are open source, or integrated with the Dynamic Kernel Module System (DKMS). These are in charge of making your GPU comprehend instructions sent by the kernel.

Here are a few example of them:

  • AMDGPU for AMD GPUs (Open-source)
  • i915 for Intel GPUs (Open-source)
  • nvidia for Nvidia GPUs (Proprietary)
  • nouveau for Nvidia GPUs as well (Open-source)

Userspace modules

Those are installed by the user, in the userspace (hence, name), the system could theorically run without them, but in our case, they provide drivers and libraries for graphical APIs (such as Vulkan).

Most of open-source Vulkan drivers on linux are provided by the mesa stack.
For sake of simplifying the wiki, we'll focus on the mesa stack and the proprietary solution for nvidia only.

A handful of examples, for the Vulkan API:

  • radeon-vulkan (a.k.a RADV) for AMD GPUs (Open-source)
  • vulkan-intel for intel GPUs (Open-source)
  • nvidia-vulkan (a.k.a NVK) for nvidia GPUs (Open-source)

How to install Vulkan userspace driver

Make sure to follow the steps according to your linux distribution and your configuration (Open vs Proprietary).

For nvidia proprietary only we'll see how to install both the kernel module and the userspace Vulkan module.
We recommend installing the DKMS version of the kernel module, as it will rebuild itself for the kernel updates overtime automatically.

Debian (and derivatives, e.g Ubuntu; Zorin; Mint; PopOS)

Nvidia - Proprietary

  1. We install the drivers (kernel + userspace modules)
    sudo apt install nvidia-driver-dkms firmware-misc-nonfree

  2. You should reboot your machine afterwards
    sudo reboot

AMD & Intel

  1. We need to install the mesa vulkan modules
    sudo apt install mesa-vulkan-drivers

Archlinux (and derivatives, Arco, EndeavourOS, Artix, Manjaro)

Nvidia - Proprietary

  1. We install the drivers (kernel + userspace modules)
    sudo pacman -S nvidia-dkms nvidia-settings nvidia-utils

  2. You should reboot your machine afterwards
    sudo reboot

Nvidia - Open-source (Experimental - not recommended as of 09/03/2024)

As of 10/03/24, nvk is only accessible through the AUR as a git version.
The module should make its way by default soon-ish.

  1. To install the git version (without an aur helper)
git clone https://aur.archlinux.org/vulkan-nouveau-git.git;
cd vulkan-nouveau-git;
makepkg -si;

Note: Unlike the Proprietary driver, a reboot is not required.

AMD

  1. We need to install the RADV module
    sudo pacman -S vulkan-radeon

Intel

  1. We need to install the vulkan intel module
    sudo pacman -S vulkan-intel

Voidlinux

Nvidia - Proprietary

  1. We install the drivers (kernel + userspace modules)
    sudo xbps-install -S nvidia-dkms nvidia-libs

  2. You should reboot your machine afterwards
    sudo reboot

AMD

  1. We need to install the RADV module
    sudo xbps-install -S mesa-vulkan-radeon

Intel

  1. We need to install the Vulkan intel module
    sudo xbps-install -S mesa-vulkan-intel

Fedora

Nvidia - Proprietary

For the proprietary driver, you should install the package provided by RPM Fusion

  1. We install the drivers (kernel + userspace modules)
    sudo dnf install akmod-nvidia

  2. You should reboot your machine afterwards
    sudo reboot

AMD & Intel

  1. We need to install the vulkan modules for both Intel and AMD GPUs
    dnf install mesa-vulkan-drivers