Prepare your system for building drivers
- you may want to install development tools:
sudo pacman -S git base-devel
- then you may want to install your proper kernel headers:
sudo pacman -S $(mhwd-kernel -li | grep '*' | cut -d ' ' -f5 | awk '{print $0,"-headers"}' | sed s'/ //'g)
340xx (dkms for kernel 5.4 or 5.10 only)
You need to get the sources first:
git clone https://gitlab.manjaro.org/packages/extra/nvidia-340xx-utils.git
git clone https://gitlab.manjaro.org/packages/multilib/lib32-nvidia-340xx-utils.git
git clone https://github.com/philmmanjaro/nvidia-340xx-dkms.git
Then compile all packages with makepkg:
cd nvidia-340xx-utils && makepkg -si
cd ../lib32-nvidia-340xx-utils && makepkg -si
cd ../nvidia-340xx-dkms && makepkg -si
To bypass incompatibility with the current xorg
, the IgnoreABI
option needs to be added to xorg
config. To do that, create the file /etc/X11/xorg.conf.d/30-nvidia-ignoreabi.conf
from terminal:
sudo nano /etc/X11/xorg.conf.d/30-nvidia-ignoreabi.conf
Add the following content to this newly created file:
Section "Files"
ModulePath "/usr/lib64/nvidia/xorg"
ModulePath "/usr/lib64/xorg/modules"
EndSection
Section "Device"
Identifier "Nvidia Card"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
Section "ServerFlags"
Option "IgnoreABI" "1"
EndSection
Save the file and exit nano
text editor by pressing CTRL+X then Y (you can follow at the bottom what it does). It should save the file, close nano, and bring you back to the terminal.
If you have the AUR enabled in Pamac, updating the system will fail because it will try to update these Nvidia packages from the AUR, and differences between Arch and Manjaro kernel creates incompatibility with these AUR packages.
To avoid that, you will need to add these Nvidia packages to the ignore list in Pamac from it settings in Preferences → Advanced → Ignore List (searching for Nvidia and selecting the packages to add them to the ignore list).
With this you will have 340xx driver, even if Manjaro officially dropped it.