How to install & configure nvidia driver on arch linux

Nvidia is a graphics processing chip manufacturer that currently generates most of its revenue from the sales of graphics processing units (GPUs), which are used for competitive gaming, professional visualization, and cryptocurrency mining.

1. Install nvidia driver using pacman command

sudo pacman -S nvidia

Note: add pacman hook to compile module on kernel upgrades

2. Blacklist nouveau driver

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

3. Add graphics card configuration in Xorg server


4. Load nvidia modules on boot – update firmware


MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

sudo mkinitcpio -P linux

5. Finally, update ~/.xinitrc

use this command to list providers and update in xinitrc file

xrandr --listproviders


Test the GPU processes now

Using nvidia-smi

Using nvtop

5 thoughts on “How to install & configure nvidia driver on arch linux

  1. Hello! Still can’t make it work. Should I create the xinitrc for the user or root? i3 throws a permission denied. Confused as hell :S

    1. yes,
      you should.
      my .xinitrc looks like this.



      # merge in defaults and keymaps

      if [ -f $sysresources ]; then
      xrdb -merge $sysresources

      if [ -f $sysmodmap ]; then
      xmodmap $sysmodmap

      if [ -f “$userresources” ]; then
      xrdb -merge “$userresources”

      if [ -f “$usermodmap” ]; then
      xmodmap “$usermodmap”

      # start some nice programs

      if [ -d /etc/X11/xinit/xinitrc.d ] ; then
      for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
      [ -x “$f” ] && . “$f”
      unset f

      # xscreensaver &
      # xrandr –listproviders
      xrandr –setprovideroutputsource modesetting NVIDIA-0
      #xrandr –setprovideroutputsource modesetting NVIDIA-G0
      #xrandr –setprovideroutputsource modesetting nouveau
      xrandr –auto
      exec i3 &>> “/var/log/i3.log” # replace with your own display manager

        1. lightdm u create a symlink by using the "systemctl enable lightdm" command
          and it will automatically log u in, if u want to specifically control how x-starts, then check your zprofile. (I use Zsh)

  2. Bruh, thanks, i literally spend the whole day trying to fix, this problem, and i couldnt install additional ram, i found out is because of neoveu

Leave a Reply

Your email address will not be published. Required fields are marked *