Fedora linux install nvidia driver

How to Install NVIDIA Drivers on Fedora Linux

You may know that by default Fedora Linux distribution comes with an open-source Nouveau driver, but in case you want to disable it and switch to the proprietary NVIDIA driver, you need to manually set it up.

So, if you’re looking to get rid of the Nouveau driver on Fedora Linux to enhance your gaming or professional user experience and get the most out of your GPU, let me show you how to do it in various ways.

Install NVIDIA Drivers on Fedora Linux

In this article, I’ll be installing the NVIDIA driver on Fedora 37 workstation using both graphical and command line methods. You can follow the same process for other Fedora versions as well.

Before getting to the main topic, let’s see how you can also check installed GPUs and used driver information on your system.

Check GPU Driver Info On Fedora Linux

For checking, we can use the pre-installed lspci Linux utility that lists all devices connected to the system.

Run the following command to check your installed GPU driver only:

Check GPU Driver in Fedora

As you can see, I have Virtio GPU installed on my Fedora as I’m running it on a virtual machine.

You can also check whether the NVIDIA driver is installed on Fedora or not using the below command:

If you don’t get any result, it means NVIDIA drivers are not used on Fedora Linux. After installing, you can run the same command to recheck.

Install NVIDIA Drivers on Fedora Using Graphical

Let’s start with the easiest step for those who prefer hovering the mouse over entering the dark room of the command line.

1. Launch the Software Centre application of Fedora and go to Software Repositories from the top right selection box.

Fedora Software Centre

2. Clicking on Software Repositories will open a window. Inside the window, scroll a bit and turn on “Enable third-party repositories”.

Читайте также:  Linux ssh запуск приложения

Enable Third Party Repositories in Fedora

3. Now close the Software Repository window and switch to the Updates section of the Software Centre app. It will take time to refresh the gnome-software cache.

Refresh Gnome Software Cache

4. Once the refresh is done, close the application, relaunch, and search for “NVIDIA” in Explore section.

Search NVIDIA Drivers

5. Select the NVIDIA Linux Graphics Driver and click on the Install button.

Install NVIDIA Linux Graphics Driver on Fedora

6. Once installation is completed, search for the NVIDIA application in the Application menu. If you see any result i.e. NVIDIA X Server Settings app, it means NVIDIA drivers are running now.

NVIDIA Drivers Settings

In case, you wish to uninstall it, go to Software Centre –> Installed and look for NVIDIA Linux Graphics Driver. Open it and you will be able to manually uninstall it with a click of a button.

Install NVIDIA Drivers on Fedora Using Command Line

Let’s come to the command line method where all you need is to type and run the command inside the terminal. For installing the NVIDIA driver on Fedora using the terminal, we will use RPM Fusion Repositories.

Before anything else, the first thing you should do is update the DNF package repository cache and all existing packages on your Fedora to avoid any further intermittent issues using the following command:

$ sudo dnf makecache $ sudo dnf upgrade --refresh -y

Now let’s add the RPM Fusion free and non-free repositories both on the system to retrieve all required NVIDIA driver packages on Fedora Linux.

To install the RPM Fusion Free repository, execute the following command:

$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

Likewise, to install the RPM Fusion Non-Free repository, execute the following command:

$ sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

As usual, if you install anything, we need to verify whether it is installed or not. So for the RPM Fusion repository what we need to do for confirming it is search for the akmod-nvidia package using the dnf utility.

$ sudo dnf search akmod-nvidia

Search akmod-nvidia Driver

If you are able to see any results that means you are good to go for the next and final step of installing NVIDIA Drivers on Fedora Linux using the terminal.

Читайте также:  Максимальное количество файловых дескрипторов linux

So, run the below command to install the most recent version of the NVIDIA driver:

$ sudo dnf install akmod-nvidia

Install NVIDIA Drivers on Fedora Linux

For Legacy GeForce 400/500 models, you can run:

$ sudo dnf install xorg-x11-drv-nvidia-390xx akmod-nvidia-390xx

For Legacy GeForce 8/9/200/300, you can run:

$ sudo dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx

While installing, if you get any prompt, type Y and press Enter to confirm the installation.

Once installation successfully completes, you also need to reboot your system to make your changes come into effect.

Finally, it’s time to open the NVIDIA X Server Settings app by simply running the following command in the terminal:

NVIDIA X Server Settings

In any scenario, if you wish to remove the NVIDIA driver on Fedora, just execute a single line of script to uninstall the akmod-nvidia package:

$ sudo dnf remove akmod-nvidia
Conclusion

Coming to the end, we learned how to install NVIDIA drivers on Fedora Linux applicable for all recent desktop versions using two methods: graphical way via Software Centre and command line via RPM Fusion repositories.

As per your level of competencies, you can go for any of the two methods as both will help you to install your required NVIDIA drivers.

Источник

How to Install Nvidia Drivers on Fedora Linux

Like most Linux distributions, Fedora does not come with the proprietary Nvidia drivers installed by default.

The default open source Nouveau driver works in most situations, but you may encounter issues like screen tearing with it.

Fedora with Nouveau driver

If you encounter such graphics/video issues, you may want to install the official proprietary Nvidia drivers in Fedora. Let me show you how to do that.

Installing Nvidia drivers in Fedora

I am using Fedora 32 in this tutorial but it should be applicable to other Fedora versions.

Step 1

Before you do anything else, make sure that your system is up-to-date. You can either use the Software Center or use the following command in the terminal:

Step 2

Since Fedora doesn’t ship the Nvidia driver, you need to add the RPMFusion repos to your Fedora system. You can use the following command in the terminal

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

If you are using Firefox, you can also add the RPMFusion repositories from your browser. Go to the Configuration page and scroll down to the “Graphical Setup via Firefox web browser” section. Click the link for the free and then the nonfree repo. This will download the .rpm file, which will eventually install the repository.

Читайте также:  Linux bridge vs open vswitch

RPMFusion Browser Installation

You can double click on the downloaded RPM file to install it.

RPMFusion in the Software Center

Step 3

Now you need to determine what graphics card (or chip) you have in your Linux system. Pull up the terminal and enter the following command:

Video Card Lookup Fedora

Next, you need to look up what driver corresponds to that chip. You can find a list of the Nvidia chips here. You can also use this tool to search for your device.

Note: Keep in mind that there are only three drivers available to install, even though the Nvidia list shows more. The most recent cards are supported by the Nvidia driver. Old devices are supported by the nvidia-390 and nvidia-340 drivers.

Step 4

To install the required driver, enter one of the commands into the terminal. The following command is the one I had to use for my card. Update as appropriate for your system.

sudo dnf install akmod-nvidia sudo dnf install xorg-x11-drv-nvidia-390xx akmod-nvidia-390xx sudo dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx

Nvidia terminal installation

Step 5

To make the changes take effect, reboot your system. It might take longer for your system to reboot because it is injecting the Nvidia driver into the Linux kernel.

Once you log in to your system after reboot, you should have a better visual performance and no screen tearing.

Fedora with Nvidia driver

Bonus Tip:

This is an optional step but it is recommended. When you add the RPMFusion repos, you get access to multimedia packages that are not available in the regular repos.

This command will install packages for applications that use gstreamer:

sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

This command will install packages needed by sound and video packages:

sudo dnf groupupdate sound-and-video

Hopefully, you find this tutorial useful in installing Nvidia drivers on Fedora. What other Fedora tutorials would you like to see on It’s FOSS?

Источник

Оцените статью
Adblock
detector