gridhead / nvidia-auto-installer-for-fedora-linux

A CLI tool which lets you install proprietary NVIDIA drivers and much more easily on Fedora Linux (32 or above and Rawhide)
https://ask.fedoraproject.org/t/nvidia-auto-installer-for-fedora-linux-now-works-with-fedora-linux-36/22310/
GNU General Public License v3.0
483 stars 28 forks source link
cuda fedora hacktoberfest nvidia optimus rpmfusion

NVIDIA Auto Installer for Fedora Linux

A CLI tool which lets you install proprietary NVIDIA drivers and much more easily on Fedora Linux (32 or above and Rawhide)

Requirements

Installation

If you use Fedora Linux (32 or above and Rawhide) - you can install NVIDIA Auto Installer for Fedora by enabling my COPR repository. Simply execute the following commands in succession to install the tool.

# dnf install dnf-plugins-core -y
# dnf copr enable t0xic0der/nvidia-auto-installer-for-fedora -y
# dnf install nvautoinstall -y

Usage

  1. Make sure you have a working internet connection
  2. Install the tool from COPR with the above instructions
  3. Execute nvautoinstall to check installation modes
  4. Run the installation modes according to your needs
  5. Give stars to the repository if you found this helpful

Modes of installation

Active internet connection and superuser privilege is required to execute the following installation modes.

Note

Coming soon

Disclaimer

This tool has been tried and tested multiple times and is expected to work flawlessly in Fedora Linux (32 or above, and Rawhide). It has not been tested on any of the spins yet so you are requested to proceed with caution. While the chances of things going wrong is pretty slim, you would still want to make backups, should things do not go as expected. As always, you are choosing to use this tool at your will and you cannot hold me responsible for any mishap that may occur due to the misuse of this tool.

Previews

Starting without any command

$ nvautoinstall
Usage: nvautoinstall [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  cheksu  Check the user privilege level.
  compat  Check your system compatibility.
  driver  Install the NVIDIA driver.
  ffmpeg  Install only the FFMPEG support software.
  getall  Install all the above packages.
  nvrepo  Enable the official NVIDIA repository for CUDA.
  plcuda  Install only the CUDA support software.
  primec  Setup PRIME support.
  rpmadd  Enable the RPM Fusion NVIDIA drivers repository.
  vidacc  Install only the VDPAU/VAAPI acceleration.
  vulkan  Install only the Vulkan support software.

Checking superuser permissions

$ sudo nvautoinstall cheksu
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser permission is available
      This tool is expected to work correctly here
[ ✗ ] Leaving installer

Checking the system compatibility

$ sudo nvautoinstall compat
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING FOR GPU COMPATIBILITY...
[ ! ] Compatibility infomation was obtained
[ ✓ ] One or more active NVIDIA GPUs were detected
      01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
      04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] (rev c2)
[ ✓ ] An Optimus Dual GPU setup was detected
[ ★ ] GATHERING CURRENT HOST INFORMATION...
[ ! ] Host information was gathered
      System: Linux v5.15.6-100.fc34.x86_64
      Hostname: 038e97fb8ac6
      Version: #1 SMP Wed Dec 1 13:41:51 UTC 2021
      Distribution: Fedora Linux x86_64
[ ★ ] CHECKING FOR HOST COMPATIBILITY...
[ ✓ ] Supported OS detected
      This tool is expected to work correctly here
[ ✗ ] Leaving installer

Handling drivers installation

$ sudo nvautoinstall driver
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF RPM FUSION NVIDIA REPOSITORY...
[ ! ] RPM Fusion repository for Proprietary NVIDIA Driver was detected
[ ★ ] ATTEMPTING CONNECTION TO RPM FUSION SERVERS...
[ ✓ ] Connection to RPM Fusion servers was established
[ ★ ] LOOKING FOR EXISTING DRIVER PACKAGES...
[ ! ] No existing NVIDIA driver packages were detected
[ ★ ] INSTALLING PROPRIETARY DRIVERS...
.....
.....
.....
[ ✓ ] Driver package installation completed
[ ✗ ] Leaving installer

Installing FFMPEG support software

$ sudo nvautoinstall ffmpeg
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF RPM FUSION NVIDIA REPOSITORY...
[ ! ] RPM Fusion repository for Proprietary NVIDIA Driver was detected
[ ★ ] ATTEMPTING CONNECTION TO RPM FUSION SERVERS...
[ ✓ ] Connection to RPM Fusion servers was established
[ ★ ] LOOKING FOR EXISTING DRIVER PACKAGES...
      xorg-x11-drv-nvidia-kmodsrc-495.44-4.fc35.x86_64
      xorg-x11-drv-nvidia-libs-495.44-4.fc35.x86_64
      akmod-nvidia-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-495.44-4.fc35.x86_64
      nvidia-settings-495.44-1.fc35.x86_64
[ ! ] A total of 5 driver packages were detected
[ ★ ] INSTALLING NVENC/NVDEC FOR FFMPEG ACCELERATION...
.....
.....
.....
[ ✓ ] NVENC/NVDEC for FFMPEG acceleration were successfully installed
[ ✗ ] Leaving installer

Installing all the above packages

$ sudo nvautoinstall getall
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] FULL FLEDGED INSTALLATION BEGINNING...
      This mode is yet to be implemented
[ ✗ ] Leaving installer

Enabling the official NVIDIA repository for CUDA

$ sudo nvautoinstall nvrepo
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF OFFICIAL CUDA REPOSITORY...
[ ! ] Official CUDA repository was not detected
[ ! ] Repository enabling is required
[ ★ ] ATTEMPTING CONNECTION TO NVIDIA SERVERS...
[ ✓ ] Connection to NVIDIA servers was established
[ ★ ] INSTALLING OFFICIAL CUDA REPOSITORY...
[ ✓ ] Official CUDA repository was enabled
[ ★ ] REFRESHING REPOSITORY LIST...
.....
[ ✓ ] Repositories have been refreshed
[ ★ ] DISABLING NVIDIA DRIVER MODULE...
.....
.....
.....
[ ✓ ] NVIDIA DRIVER module has been disabled
[ ✗ ] Leaving installer

Installing CUDA support software

$ sudo nvautoinstall plcuda
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF RPM FUSION NVIDIA REPOSITORY...
[ ! ] RPM Fusion repository for Proprietary NVIDIA Driver was detected
[ ★ ] ATTEMPTING CONNECTION TO RPM FUSION SERVERS...
[ ✓ ] Connection to RPM Fusion servers was established
[ ★ ] LOOKING FOR EXISTING DRIVER PACKAGES...
      xorg-x11-drv-nvidia-kmodsrc-495.44-4.fc35.x86_64
      xorg-x11-drv-nvidia-libs-495.44-4.fc35.x86_64
      akmod-nvidia-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-495.44-4.fc35.x86_64
      nvidia-settings-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-cuda-libs-495.44-4.fc35.x86_64
[ ! ] A total of 6 driver packages were detected
[ ★ ] CHECKING AVAILABILITY OF OFFICIAL CUDA REPOSITORY...
[ ! ] Official CUDA repository was detected
[ ★ ] ATTEMPTING CONNECTION TO NVIDIA SERVERS...
[ ✓ ] Connection to NVIDIA servers was established
[ ★ ] INSTALLING RPM FUSION METAPACKAGE FOR CUDA...
.....
.....
.....
[ ✓ ] RPM Fusion CUDA metapackage was successfully installed
[ ★ ] INSTALLING NVIDIA CUDA CORE PACKAGES...
.....
.....
.....
[ ✓ ] NVIDIA CUDA core packages were successfully installed
[ ✗ ] Leaving installer

Setting up PRIME support

$ sudo nvautoinstall primec
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF RPM FUSION NVIDIA REPOSITORY...
[ ! ] RPM Fusion repository for Proprietary NVIDIA Driver was detected
[ ★ ] ATTEMPTING CONNECTION TO RPM FUSION SERVERS...
[ ✓ ] Connection to RPM Fusion servers was established
[ ★ ] LOOKING FOR EXISTING DRIVER PACKAGES...
      xorg-x11-drv-nvidia-kmodsrc-495.44-4.fc35.x86_64
      xorg-x11-drv-nvidia-libs-495.44-4.fc35.x86_64
      akmod-nvidia-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-495.44-4.fc35.x86_64
      nvidia-settings-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-cuda-libs-495.44-4.fc35.x86_64
[ ! ] A total of 6 driver packages were detected
[ ★ ] SETTING UP PRIME SUPPORT...
[ ! ] Intervention required
      < Y > to enable PRIME support
      < N > to disable PRIME support
      < * > anything else to leave
[Y/N] Y
[ ★ ] ENABLING PRIME SUPPORT...
[ ✓ ] PRIME Support was successfully enabled
[ ✗ ] Leaving installer

Enabling the RPM Fusion NVIDIA drivers repositories

$ sudo nvautoinstall rpmadd
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF RPM FUSION NVIDIA REPOSITORY...
[ ! ] RPM Fusion repository for Proprietary NVIDIA Driver was not detected
[ ! ] Repository enabling is required
[ ★ ] ATTEMPTING CONNECTION TO RPM FUSION SERVERS...
[ ✓ ] Connection to RPM Fusion servers was established
[ ★ ] INSTALLING RPM FUSION NVIDIA REPOSITORY...
.....
.....
.....
[ ✓ ] RPM Fusion NVIDIA repository was enabled
[ ✗ ] Leaving installer

Installing the VDPAU/VAAPI support software

$ sudo nvautoinstall vidacc
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF RPM FUSION NVIDIA REPOSITORY...
[ ! ] RPM Fusion repository for Proprietary NVIDIA Driver was detected
[ ★ ] ATTEMPTING CONNECTION TO RPM FUSION SERVERS...
[ ✓ ] Connection to RPM Fusion servers was established
[ ★ ] LOOKING FOR EXISTING DRIVER PACKAGES...
      xorg-x11-drv-nvidia-kmodsrc-495.44-4.fc35.x86_64
      xorg-x11-drv-nvidia-libs-495.44-4.fc35.x86_64
      akmod-nvidia-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-495.44-4.fc35.x86_64
      nvidia-settings-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-cuda-libs-495.44-4.fc35.x86_64
      nvidia-persistenced-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-cuda-495.44-4.fc35.x86_64
[ ! ] A total of 8 driver packages were detected
[ ★ ] INSTALLING VIDEO ACCELERATION SUPPORT...
.....
.....
.....
[ ✓ ] Video acceleration were successfully installed
[ ✗ ] Leaving installer

Installing Vulkan support software

$ sudo nvautoinstall vulkan
[ # ] NVIDIA AUTOINSTALLER FOR FEDORA LINUX
[ ★ ] CHECKING SUPERUSER PERMISSIONS...
[ ✓ ] Superuser privilege acquired
[ ★ ] CHECKING AVAILABILITY OF RPM FUSION NVIDIA REPOSITORY...
[ ! ] RPM Fusion repository for Proprietary NVIDIA Driver was detected
[ ★ ] ATTEMPTING CONNECTION TO RPM FUSION SERVERS...
[ ✓ ] Connection to RPM Fusion servers was established
[ ★ ] LOOKING FOR EXISTING DRIVER PACKAGES...
      xorg-x11-drv-nvidia-kmodsrc-495.44-4.fc35.x86_64
      xorg-x11-drv-nvidia-libs-495.44-4.fc35.x86_64
      akmod-nvidia-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-495.44-4.fc35.x86_64
      nvidia-settings-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-cuda-libs-495.44-4.fc35.x86_64
      nvidia-persistenced-495.44-1.fc35.x86_64
      xorg-x11-drv-nvidia-cuda-495.44-4.fc35.x86_64
[ ! ] A total of 8 driver packages were detected
[ ★ ] INSTALLING VULKAN RENDERER SUPPORT...
.....
.....
.....
[ ✓ ] Vulkan renderer support were successfully installed
[ ✗ ] Leaving installer