Skip to content

Installing GPU drivers

Kiln runs its models on your GPU. On Linux, that needs your GPU’s Vulkan driver and the Vulkan loader. Most desktop installs already have both. Minimal installs, servers and containers often don’t.

Kiln checks for a GPU when an engine loads. If it finds none, it stops with an error that points here, rather than quietly running on the CPU, which is many times slower. See Kiln says it found no GPU.

Terminal window
lspci | grep -iE 'vga|3d|display'
  • AMD or Intel: you need Mesa’s Vulkan driver (open source, from your distribution). Go to step 2.
  • NVIDIA: you need NVIDIA’s driver, which includes its Vulkan driver. Go to step 3.

2. AMD or Intel: install Mesa’s Vulkan driver

Section titled “2. AMD or Intel: install Mesa’s Vulkan driver”
Terminal window
sudo dnf install vulkan-loader mesa-vulkan-drivers vulkan-tools

Then check it.

NVIDIA’s driver isn’t in most distributions’ default repositories. Install it the way your distribution recommends, then reboot.

Enable RPM Fusion, then install the driver:

Terminal window
sudo dnf install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install akmod-nvidia vulkan-tools

Wait a few minutes for the kernel module to build, then reboot.

Terminal window
vulkaninfo --summary

Under Devices, look for your GPU, with a deviceType of PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU or PHYSICAL_DEVICE_TYPE_DISCRETE_GPU. For example:

deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = AMD Radeon 8060S Graphics (RADV GFX1151)

If the only device is llvmpipe, that’s Mesa’s software renderer running on the CPU: the GPU driver is missing, or your user can’t reach the GPU (below). If vulkaninfo itself fails with ERROR_INCOMPATIBLE_DRIVER, no driver is installed at all.

That’s it: Kiln will use the GPU that vulkaninfo lists.

Your user can’t reach the GPU. On a desktop, the login session grants access to the GPU. On a server, or over SSH, your user may need to be in the render and video groups:

Terminal window
sudo usermod -aG render,video $USER

Log out and back in (or reboot), then run vulkaninfo --summary again.

After a kernel or driver update, reboot before trying again. The NVIDIA module in particular is built for the running kernel.

The container needs the GPU device, and its own copy of the driver’s user-space part.

Pass the GPU’s device nodes in, and install Mesa’s Vulkan driver in the image (for example mesa-vulkan-drivers and libvulkan1 in a Debian or Ubuntu image):

Terminal window
docker run --device /dev/dri --group-add "$(getent group render | cut -d: -f3)" my-kiln-app

When an engine built for a GPU loads and the GPU runtime reports no usable GPU, Kiln stops with an error like this:

Kiln found no GPU for libkiln_llama.so, which is built for Vulkan. Without one, it would run on the CPU,
many times slower, so it won't start.

The error lists the install commands above. Follow the steps on this page, check with vulkaninfo --summary, and run again.

To run on the CPU anyway (on a CI machine, for example), allow it:

Terminal window
java -Dkiln.allowCpu=true ... # or: export KILN_ALLOW_CPU=true

Kiln then runs, and logs a large warning that it is running on the CPU.

If the error says Kiln has no Vulkan loader (libvulkan.so.1), install the loader package from step 2 (vulkan-loader, libvulkan1 or vulkan-icd-loader).

Kiln’s published natives use Vulkan, which needs only the drivers above. The HIP and CUDA backends are for building Kiln’s engines yourself, and need ROCm or the CUDA toolkit; see Choosing a GPU backend. Kiln checks those for a GPU the same way, and its error tells you how to check: rocminfo for ROCm, nvidia-smi for NVIDIA. For ROCm, your user also needs to be in the render and video groups.

Kiln doesn’t run on Windows yet.