Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How-To install GPU Drivers for best experience
#1
Information 
Hey all ...

As I work on the upcoming XeroLinux Arch Post-Install Toolkit, I figured why not share the best way to install GPU Drivers. This is meant for Vanilla Arch simply because the ArchInstall script does not install everything required or do anything for Wayland to work reliably dunno why. Keep in mind that some WMs specifically Wayland ones like Sway or Hyprland might require more work,  Same goes for Optimus with AMD/Intel. I do not know what, best thing you can do is consult their Wikis/Discords included at the bottom or do more research. Please do not come to me with any questions I am just showing you what works for most people.. Also remember to have the multilib repo enabled otherwise this will not work.

Also, before you go through the guide, know that the reasons why I opted to link to it via toolkit instead of doing it all for you, is to allow you to learn how to do it yourself, and because it's not that simple to script such things and adopt it to every single config that exists out there. So I hope you do learn a few things. Using Distros such as ArchLinux is because you chose to build your OS your way for your hardware from the ground up... Now on with the guide...

GPU install and configuration

[Image: qsGGegT.png]

- AMD (Not Legacy ATI)

Install amd opensource drivers :
sudo pacman -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader vulkan-mesa-layers lib32-vulkan-mesa-layers libva-mesa-driver lib32-libva-mesa-driver

-Codecs For DaVinci Resolve (Not for Legacy ATI) :
sudo pacman -S mesa-vdpau lib32-mesa-vdpau rocm-opencl-runtime rocm-hip-runtime

- ATI Legacy (No Wayland Support) :
sudo pacman -S xf86-video-ati vulkan-radeon lib32-vulkan-radeon libvdpau-va-gl vulkan-swrast libva-vdpau-driver libclc

[Image: wrvihcH.png]

- Intel

Install intel opensource drivers :
sudo pacman -S mesa lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader intel-media-driver intel-gmmlib onevpl-intel-gpu

For older Intel iGPUs (Broadwell to Rocket Lake) replace the openvpl-intel-gpu package with intel-media-sdk. That's it...

-Codecs :
sudo pacman -S mesa-vdpau lib32-mesa-vdpau gstreamer-vaapi libva-mesa-driver lib32-libva-mesa-driver intel-gmmlib

[Image: ffQenFe.jpeg]

- nVidia

Install nvidia drivers [Desktop] :
sudo pacman -S nvidia-dkms nvidia-utils lib32-nvidia-utils nvidia-settings vulkan-icd-loader lib32-vulkan-icd-loader egl-wayland opencl-nvidia lib32-opencl-nvidia libvdpau-va-gl libvdpau

Note : Replace nvidia-dkms with nvidia-open-dkms for 30 Series and up for better experience..

- Cuda (4gb) :
sudo pacman -S cuda

For Intel/nVidia laptops also include the following Prime package on top of the nVidia & Intel drivers/codecs  :
sudo pacman -S  nvidia-prime

[Image: CZWkklF.png]

For Wayland Support and better functionality on nVidia :

With all that out of the way, I will also be showing you what you need to do in order to make Wayland work. Again this is for most cases some DEs/WMs will require more, do your own research for that, read project wiki and so on I will just be showing General config...

Step 1 - Edit mkinitcpio.conf

First off you will need to edit your mkinitcpio.conf to add the necessary modules related to DRM. Keep in mind this is intended for GPUs from 900 series and up supported by the latest drivers.

To do so...
sudo sed -i '/^MODULES=(/ s/)$/ nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf

Once added please make sure to run sudo mkinitcpio -P to rebuild modules...

Step 2  - Enable Power Services :

You will need those for powermizer especially if you are using laptop
sudo systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service nvidia-powerd.service

Step 3 - Add modprope options :

Those are necessary for Kernel modules to load
echo -e 'options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0 NVreg_DynamicPowerManagement=0x02' | sudo tee -a /etc/modprobe.d/nvidia.conf
echo -e 'options nvidia_drm modeset=1 fbdev=1' | sudo tee -a /etc/modprobe.d/nvidia.conf

.:: Various DE/WM/Laptop Specific Configs ::.

- For Gnome :

You might want to re-enable Wayland since they hide it for whatever reason. If it is in fact hidden from GDM re-enable it via :
sed -i 's/^WaylandEnable=false/#&/' /etc/gdm/custom.conf

- For Hyprland :

The above should, in theory work for Hyprland too, but in case you are having issues check This Link for the Wiki, maybe they have more info, as I do not and will never be using this WM, it's on you to do the research and testing...

- For Optimus Laptops :

Those laptops, specifically ASUS ROG ones have been and in my opinion still represent a thorn in Linux's side. That's not to say that they don't work, just that they are a bit more complicated to say the least. Worry not though, there's a team of dedicated devs, who strive on making those laptops work on Linux. Here's a link to their Main Page where you will find all the guides and tools you will need to get up and running.. For support head on over to their Discord Server.

Hope that helps Wink
~ XeroLinux Toolkit Maintainer ~
I do try to help where I can, when I can.
I do this on my own, so I might not have all the answers.
[Image: K7U76Mv.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Video How to install Vanilla Arch with ArchInstall (Jan 2024) DarkXero 4 1,054 02-26-2024, 05:32 PM
Last Post: DarkXero
  How to install and use yay/paru AUR helpers for Arch Linux DarkXero 2 1,220 02-15-2024, 01:16 PM
Last Post: DarkXero
  Archfi Install Script + Hyprland Setup Tutorial (sept 2023) ATH-Linux 0 437 02-15-2024, 01:08 AM
Last Post: ATH-Linux
  How-To install & run WayDroid on Linux (Wayland) DarkXero 0 2,251 10-19-2023, 02:03 PM
Last Post: DarkXero
Information How-To Install Microsoft Surface Kernel DarkXero 0 1,915 11-23-2021, 05:39 PM
Last Post: DarkXero

Forum Jump:


Users browsing this thread: 1 Guest(s)