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.
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-utilsEnvironment variables are set in hypr/hyprland/nvidia.conf
We need to preload modules in Booster using the /etc/booster.yaml config
module_force_load: nvidia,nvidia_modeset,nvidia_uvm,nvidia_drmNow you can rebuild the image by running
doas chmod +x /usr/lib/booster/regenerate_images
doas /usr/lib/booster/regenerate_imagesI'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 -PFinally, 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-grubReboot your pc and you should have your Nvidia graphicial drivers installed properly on your machine.
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-persistencedHardware acceleration is complicated in Wayland, but we're going to use the nvidia-vaapi-driver to set it up
doas pacman -S libva-nvidia-driverFollow the instructions from the nvidia-vaapi-driver repo to enable it in your favorite browser.
More info in the Arch Wiki
TODO when I get my hands on an AMD GPU