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

2 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

Leave a Reply to nottern Cancel reply

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