Giter Club home page Giter Club logo

arch-nvidia-drivers-installation-guide's Introduction

Arch Linux NVIDIA drivers installation guide

Arch Linux Logo

Important links

Default Prerequisites

This is a quick tutorial on how you can install proprietary NVIDIA drivers for Arch Linux. Please note if you are using anything other than the regular linux kernel, such as linux-lts, you need to make changes accordingly. All the commands marked like this are meant to be run on the terminal. Do not reboot before you have finished all the steps below!

Step 1: Installing required packages and enabling multilib

  1. Update the system: sudo pacman -Syu
  2. Install required packages: sudo pacman -S base-devel linux-headers git nano --needed
  3. Install the AUR helper, yay
    • cd ~
    • git clone https://aur.archlinux.org/yay.git
    • cd yay
    • makepkg -si
  4. Enable multilib repository
    • sudo nano /etc/pacman.conf
    • Uncomment the following lines by removing the # -character at the start them
      • [multilib]
      • Include = /etc/pacman.d/mirrorlist
    • Save the file with CTRL+S and close nano with CTRL+X
  5. Run yay -Syu, to update the system package database

Step 2: Installing the driver packages

  1. First find your NVIDIA card from this list here. Alternatively you can take a look at the Gentoo wiki.
  2. Check what driver packages you need to install from the table below
Driver name Kernel Base driver OpenGL OpenGL (multilib)
Maxwell (NV110) series and newer linux or linux-lts nvidia nvidia-utils lib32-nvidia-utils
Maxwell (NV110) series and newer not linux and not linux-lts nvidia-dkms nvidia-utils lib32-nvidia-utils
Kepler (NVE0) series any nvidia-470xx-dkms nvidia-470xx-utils lib32-nvidia-470xx-utils
GeForce 400/500/600 series cards [NVCx and NVDx] any nvidia-390xx-dkms nvidia-390xx-utils lib32-nvidia-390xx-utils
Tesla (NV50/G80-90-GT2XX) any nvidia-340xx-dkms nvidia-340xx-utils lib32-nvidia-340xx-utils
  1. Install the correct Base driver, OpenGL, and OpenGL (multilib) packages
    • Example: yay -S nvidia-470xx-dkms nvidia-470xx-utils lib32-nvidia-470xx-utils
  2. Install nvidia-settings with yay -S nvidia-settings

Step 3: Enabling DRM kernel mode setting

In this step please complete all the parts: Setting the Kernel Parameter, Add Early Loading of NVIDIA Modules, and Adding the Pacman Hook.

Setting the Kernel Parameter:

Setting the kernel parameter depends on what bootloader you are using. Complete only one of the options below (A or B). After that, continue to Add Early Loading of NVIDIA Modules.

Option A) For GRUB users

  1. Edit the GRUB configuration file:
    • sudo nano /etc/default/grub
    • Find the line with GRUB_CMDLINE_LINUX_DEFAULT
    • Append the words inside the quotes with nvidia-drm.modeset=1
      • Example: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
    • Save the file with CTRL+S and close nano with CTRL+X
  2. Update the GRUB configuration: sudo grub-mkconfig -o /boot/grub/grub.cfg

Option B) For systemd-boot users

  1. Navigate to the bootloader entries directory: cd /boot/loader/entries/
  2. Edit the appropriate .conf file for your Arch Linux boot entry
    • sudo nano <filename>.conf
  3. Append nvidia-drm.modeset=1 to the options line
  4. Save the file with CTRL+S and close nano with CTRL+X

Add Early Loading of NVIDIA Modules:

  1. Edit the mkinitcpio configuration file:
    • sudo nano /etc/mkinitcpio.conf
    • Find the line that says MODULES=()
    • Update the line to: MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
    • Find the line that says HOOKS=()
    • On the HOOKS=() line, find the word kms inside the parenthesis and remove it
    • Save the file with CTRL+S and close nano with CTRL+X
  2. Regenerate the initramfs with sudo mkinitcpio -P

Adding the Pacman Hook:

  1. Get the nvidia.hook -file from this repository
    • cd ~
    • wget https://raw.githubusercontent.com/korvahannu/arch-nvidia-drivers-installation-guide/main/nvidia.hook
  2. Open the file with your preferred editor.
    • nano nvidia.hook
  3. Find the line that says Target=nvidia.
  4. Replace the word nvidia with the base driver you installed, e.g., nvidia-470xx-dkms
    • The edited line should look something like this: Target=nvidia-470xx-dkms
  5. Save the file with CTRL+S and close nano with CTRL+X
  6. Move the file to /etc/pacman.d/hooks/ with: sudo mv ./nvidia.hook /etc/pacman.d/hooks/

Step 4: Reboot and enjoy!

You can now safely reboot and enjoy the proprietary NVIDIA drivers. If you have any problems check the Arch Linux Wiki or the forums for common pitfalls and questions.

arch-nvidia-drivers-installation-guide's People

Contributors

korvahannu avatar gaaaabeee avatar parmjotsinghrobot avatar pietrobondioli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.