Graphics support - Sawangg/dotfiles GitHub Wiki

In the base installation, we didn't install any graphical drivers for our GPU. In this section, we're going to see the different configurations we need depending on our GPU manufacturer.

Nvidia

We're going to install the nvidia-open-dkms drivers. Those are the propretary Nvidia drivers that works well on my machine. Because we installed the hardened kernel, we need to use the dkms version.

doas pacman -S nvidia-open-dkms nvidia-utils

Environment variables are set in hypr/hyprland/nvidia.conf

Booster

We need to preload modules in Booster using the /etc/booster.yaml config

module_force_load: nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm

Now you can rebuild the image by running

doas chmod +x /usr/lib/booster/regenerate_images
doas /usr/lib/booster/regenerate_images

DEPRECATED: Mkinitcpio

I'm not using Mkinitcpio anymore so this config might be obsolete. If you're using booster instead of mkinitcpio, skip this.

We need to add the nvidia mkinitcpio modules. Edit /etc/mkinitcpio.conf and add

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

Save and run the next command to generate a new image.

doas mkinitcpio -P

GRUB

Finally, we need to edit our default GRUB config to add a kernel flag. Open /etc/default/grub and add at the end of GRUB_CMDLINE_LINUX_DEFAULT the following

GRUB_CMDLINE_LINUX_DEFAULT="... nvidia_drm.modeset=1 ..."

Save and run to update your config

doas update-grub

Reboot your pc and you should have your Nvidia graphicial drivers installed properly on your machine.

Service for intensive GPU tasks

If you're using your GPU for intensive tasks such as AI training or where GPU startup time is crucial, you can enable a service from the utils package

doas pacman -S nvidia-utils-dinit
doas dinitctl enable nvidia-persistenced

Hardware acceleration

Hardware acceleration is complicated in Wayland, but we're going to use the nvidia-vaapi-driver to set it up

doas pacman -S libva-nvidia-driver

Follow the instructions from the nvidia-vaapi-driver repo to enable it in your favorite browser.

More info in the Arch Wiki

AMD

TODO when I get my hands on an AMD GPU

⚠️ **GitHub.com Fallback** ⚠️