Arch Linux

Installing NVIDIA Driver on Arch Linux

Installing NVIDIA driver in Arch Linux is pretty simple. However, to set up the configurations can be frustrating. If you have just fresh installed Arch Linux, great! Just follow the following steps to install and configure NVIDIA drivers. Personally, I did not have a fresh Arch Linux, and hence I need to delete most of the graphics drivers and install them again.

Installing NVIDIA Driver

Personally, I prefer using NVIDIA Optimus in conjunction with Bumblebee (Yes, they are Transformers names. There is also a package for hybrid graphics call Prime, check it out). To install the drivers after a fresh Arch Linux intallation, do the followin steps in that order.

  1. pacman -S nvidia nvidia-lts nvidia-settings lib32-nvidia-utils lib32-nvidia-libgl mesa xf86-video-intel lib32-virtualgl
  2. gpasswd -a <user> bumblebee
  3. sudo systemctl enable bumblebeed.service

However, most people do not a fresh install. So we need to remove all the graphic drivers first. To do this, run either

  • pacman -Rdd nvidia nvidia-lts nvidia-settings lib32-nvidia-utils lib32-nvidia-libgl mesa xf86-video-intel lib32-virtualgl
  • pacman -Rs nvidia nvidia-lts nvidia-settings lib32-nvidia-utils lib32-nvidia-libgl mesa xf86-video-intel lib32-virtualgl

Either one of the above should work. Warning: If all else fails, you can try pacman -Rsc nvidia nvidia-lts nvidia-settings lib32-nvidia-utils lib32-nvidia-libgl mesa xf86-video-intel lib32-virtualgl, but I am strongly against this command unless you know what you are doing.

To test that the driver is running correctly, install mesa-demos and use glxgears to test if it works by running optirun glxgears -info. If that fails, try running optirun glxspheres64 for 64 bit system,  or optirun glxspheres32 for 32 bit system.

Running a Program with NVIDIA

Simply add optirun in front of the commands. For example, if we want to run wine with app.exe, simply type in optirun wine app.exe in the terminal.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s