The objective is to install the NVIDIA drivers on Manjaro 21 Linux. This article will discuss two methods of Nvidia driver installation in the following order:
- Automatic Install using the standard Manjaro Repository.
- Manual Install using the Official nvidia.com driver.
To install Nvidia driver on other Linux distributions, follow our Nvidia Linux Driver guide.
Software Requirements and Conventions Used
|System||Manjaro 21 Ornara Linux|
|Software||Existing Desktop installation such as Xfce, GNOME, KDE etc.|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Automatic Install using the standard Ubuntu Repository
The first method is the easiest to perform and in most cases it is the recommended approach. In fact there is not much to write about as the entire installation consists of a single command:
- Open up terminal and execute the following command:
$ sudo mhwd -a pci nonfree 0300
The above command will auto detect and install an appropriate proprietary Nvidia driver on your Manjaro 21 Linux system.
- Once the installation is concluded, reboot your system and you are done:
$ sudo reboot
- Start Nvidia Settings application to further configure your graphic card:
Manual Install using the Official Nvidia.com driver
The previous Nvidia drivers installation was rather easy. In the case that you wish to install latest Nvidia drivers or perhaps install a specific Nvidia drivers version directly downloaded from Nvidia.com this is how you can get your hands dirty.
- Update your system to load the latest kernel image. Failing this step may result in kernel headers mismatch:
sudo pacman -Syu
- Identify your NVIDIA VGA card.The below commands will allow you to identify your Nvidia card model:
$ lspci -vnn | grep VGA
- Download the Official Nvidia Driver.
Using your web browser navigate to the official Nvidia website and download an appropriate driver for your Nvidia graphic card. Save the file into your home directory. Example:
$ ls NVIDIA-Linux-x86_64-460.67.run
- Install Prerequisites. Development tools and kernel headers are required to compile and install Nvidia driver. Let’ s start by installation of kernel headers. First, we need to detect currently loaded kernel. For example:
$ uname -r 5.4.116-1-MANJARO
The kernel headers we need to install are
$ sudo pacman -S linux54-headers
Next task is to install development tools. Execute the bellow command and hit
ENTERto install all:
$ sudo pacman -S base-devel dkms
In this step we will disable the default
nouveaudrivers. To do so we need to open and edit the
/etc/default/grubGrub configuration file.
Locate the line starting with
GRUB_CMDLINE_LINUXand include the following code
$ sudo nano /etc/default/grub
Once you have made the change update GRUB:
$ sudo update-grub
After reboot, your display manager may NOT start. Do not panic when you are greeted with black screen! Simply change to TTY using
ALT+CTRL+F2key combination or SSH to your Manajaro System remotely and proceed with the next step.
Reboot your system:
$ sudo reboot
Login and begin the actual installation of Nvidia driver by executing the following linux command and following the wizard:
$ sudo bash NVIDIA-Linux-x86_64-460.67.run
You may also be asked questions like:
Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. ->YES Install NVIDIA's 32-bit compatibility libraries? -> YES Would you like to run the nvidia-xconfig utility? -> YES
The Nvidia driver is now installed.
- Reboot your system:
$ sudo reboot
- Configure NVIDIA X Server Settings.
After reboot you should be able to start NVIDIA X Server Settings app from the Activities menu.
ERROR: Failed to run `/usr/bin/dkms build -m nvidia -v 460.67 -k 5.4.114-1-MANJARO`: Error! echo Your kernel headers for kernel 5.4.114-1-MANJARO cannot be found at /usr/lib/modules/5.4.114-1-MANJARO/build or /usr/lib/modules/5.4.114-1-MANJARO/source. You can use the --kernelsourcedir option to tell DKMS where it's located. ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information.
The above error message means that the NVIDIA installer could not find the correct kernel headers matching your currently loaded kernel. Usually the reason for this error is that you do not have a your Linux kernel up to date.
For example, if your currently loaded Linux kernel is
5.4.114-1-MANJARO the install Linux kernel headers command
pacman -S linux54-headers may install kernel headers for a different minor version eg.
5.4.114-1-MANJARO. To resolve this issue update your kernel to a latest version available using the below update command:
# pacman -Syu