LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-22-2020, 01:31 AM   #1
slopsbucket
LQ Newbie
 
Registered: May 2014
Posts: 8

Rep: Reputation: Disabled
[Tutorial] nVidia Drivers, fc31, for newbies.


Installing the proper nVidia drivers for my graphics card in Fedora 31 was simple – once I worked out how.

Finding out how was a complicated nightmare. I read through many tutorials with conflicting instructions, and every single one of them had outdated or misleading information, even Fedora’s own.

For the average schmuck like me all of these tutorials are very confusing, and I tend to blame myself for errors, then it turns out that the tutorials themselves are wrong. I am truly the average mug in the street, I don’t know how to use “grep” or “vi” and I have no intention of learning. I just want to check my emails and play some games, using a graphical interface and a Mouse.

When I install software I use a graphical interface and a mouse because I want to be able to see a list of programs available, compare different versions, and make sure I’m installing the right one. This isn’t always possible but my typing is prone to lots of fat finger errors, using a graphical interface removes the chance of making mistakes.

I don’t use the Gnome desktop for a whole plethora of reasons, many people don’t. So I’ll write these instructions using tools that All Fedora Users have available, not just for some defunct and broken desktop.

So here’s my version of how to get your nVidia card running properly under Fedora 31, with some handy tips for the average user.

Overview:

Some tips for using a terminal.
Remove broken drivers.
Update your system.
Download the proper driver from nVidia.
Install extra components needed by the nVidia driver.
Block (blacklist) the default Nouveau video driver so that it can not load.
Install the proper nVidia driver.
Play a game to check performance.


Some tips for using a terminal.

Many tutorials will tell you to use the “su” command or to “login as root”. Never ever do this. This is the very reason that we have the sudo command, so that you can run commands with root privileges without having to switch user or login as root. Some of our “experts” really aren’t very bright.

Using the mouse you can copy and paste commands from tutorials straight into your Terminal program. Doing this means you’ll get errors much less often. Keyboard shortcuts in the Terminal are different to the rest of the system so CTRL V won’t work, just use the mouse, highlight the command, right click, Copy, right click in the terminal, Paste, hit the Enter key on your keyboard.

The Terminal will remember the last 20 or so commands that you have used, so if you have to repeat a step you can just hit the Up Arrow on your keyboard to recall the last command then hit Enter to enter it. Repeatedly hitting the Up Arrow key will cycle through all the commands you have recently used.

Remove broken drivers.

The nVidia drivers available from the Fedora/RPMfusion repositories do not work. Don’t even try. Some people will tell you that they do work and you didn’t follow instructions properly, that’s just semantics, for the average user They Do Not Work.

If you did try this method open dnfDragora, has an icon like a little gold box. When it finally opens use the search bar to search for nvidia, in the results untick anything nvidia that you may have already installed then hit the Apply button.

Restart your computer when this is finished.


Update your system.

This is one of the few times that using a Terminal is actually much quicker and easier than using the graphical interface. Open your Terminal, then copy and paste the following command into it:

sudo dnf update

Hit the Enter key on your keyboard. It’ll ask you for the administrator’s password, type that in and hit Enter again. It will check how much it needs to download then ask you if this is OK. Type the letter Y for yes and hit Enter.

Restart the computer when this is finished.


Download the proper driver from nVidia.

Click on the following link:

https://www.nvidia.com/Download/index.aspx?lang=en-us

This will take you to nVidia’s download page, fill out the form as accurately as you can to make sure you get the right version of their driver. Save the driver to your hard drive.

When the driver has been downloaded open your file browser, open your Downloads folder, right click on the driver and go to Properties. Under the new window that opens click on the little tab at the top that says Permissions. In that page tick the little box down the bottom that says “Make this file executable”. Close the window when done.

For most people the driver will get saved in your Downloads folder and the rest of this tutorial assumes that this is where you saved it. This tutorial also assumes that this is the Only nVidia driver you have saved in that folder, if you have others in there Cut and Paste them to somewhere else.



Install extra components needed by the nVidia driver.

Simply Copy and Paste the following command into your Terminal:

sudo dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig

and hit the Enter key on your keyboard. It’ll ask you for you administrator’s password, give it and hit Enter again.

Warning: I got stuffed around a lot here. Fedora is very good at creating traps for the average user like you and me. The nVidia driver kept telling me that it couldn’t find kernel headers or development files for kernel 5.5.9 when I knew full well that I had just installed them.

Open dnfDragora, wait for it to finally finish opening, then search for “kernel”. Scroll down the list looking at what’s installed very carefully, and check all the version numbers. I was running kernel 5.5.9 but the headers and development files that got installed were for kernel 5.5.10. That’s why the driver couldn’t find what it needed. Fedora also didn’t supply headers and development files for kernel 5.5.9 and I had to upgrade to kernel 5.5.10 to solve the problem. If you have to do the same make sure you reboot afterwards.



Block (blacklist) the default Nouveau video driver so that it can not load.


To do this we need to edit the grub file in the /etc/default folder. The easiest way to do this is to open your file browser and click on the link in the left hand side for File System or System Files. Or you can edit the address bar at the top of the bowser so that it only contains a / and hit Enter. Open the folder called etc. In there you’ll see a folder called default, right click on that folder and select Open as Root.

It will ask for your administrator’s password, then open a new browser window with full root privileges. There “should” only be 2 files in that folder, grub and useradd. Right click on the grub file and open it with Text Editor. Do Not us Office to edit these types of files, only ever use a very basic text editor.

There’s only 8 lines in that file, the 5th line looks something like this:

GRUB_CMDLINE_LINUX="resume=UUID=853fc5da-90b2-42fc-829b-1fc3032c4258 rhgb quiet"

We need to add another command to that line:

rd.driver.blacklist=nouveau

So that it now looks like this:

GRUB_CMDLINE_LINUX="resume=UUID=853fc5da-90b2-42fc-829b-1fc3032c4258 rhgb quiet rd.driver.blacklist=nouveau"

Save the file and close the file browser windows.

(for all the “experts” out there – rdblacklist has been deprecated, this is how it works now)

Now we need to update our boot menu so that this change gets added to the system, open your Terminal again and Copy and Paste the following command into it:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

and hit the Enter key on your keyboard. It’ll ask you for your administrator’s password, give it and hit Enter again.

Restart your computer.

This time when you restart the computer it will give you warnings about the graphics having no hardware acceleration, and your desktop resolution will be huge and chunky with poor graphics. Don’t panic, this is what’s supposed to happen.


Install the proper nVidia driver.

Warning: we have to drop out of the graphical user interface here and go back to a text only screen to install the nVidia drivers. This means you’ll have no mouse and you’ll have to type commands in by hand on the keyboard. Either print this tutorial out or write the commands on a piece of paper so that you get them right.

It’s also very important to remember that Linux systems are case sensitive, this means that “downloads” and “Downloads” are not the same folder. You do not have a folder called “downloads”.

Type the following command into a Terminal and then hit Enter:

init 3

It’ll ask for your administrator’s password, give it and hit Enter again.

This restarts your computer and drops you back to a text only interface, it wants you to log in. Type your user name and hit Enter. Now it wants your password, type it and hit Enter.

We need to change directories to where we save that nVidia driver, type in the following command and hit Enter:

cd Downloads

The prompt will have changed to show that you are now in the Downloads folder where your driver is. Type the following command and hit Enter. Remember that these commands are case sensitive:

sudo ./NVIDIA*.run

It will want your administrator’s password again. The driver installer program runs in and old text based graphical interface. Where it gives you choices use the arrow keys on the keyboard to select the choice you want the hit the Enter key to accept that choice.

One of the choices is to use DKMS to automatically update your driver every time you install a new kernel, (system updates) I never got this to run. Every time I tried it it failed to find some files and fell over. It’s a shame, but not fatal. It just means every time I do updates I’ll have to run this section of the tutorial again.

Another option offered to you is wether or not you want to also install the 32 bit version of some of the driver files. Yes, you do. Some games require these, especially the old favourites.

When the installer has finished it will drop you back to the command prompt. Use that famous old keyboard combination to restart your computer : CTRL ALT DEL.


Play a game to check performance.

To paraphrase an old song:

We have joy,
We have fun,
Specially now
Our vid card runs....


Cheers,

Andrew

Last edited by slopsbucket; 03-22-2020 at 01:34 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] fc31 sound issue baldur_1 Linux - Hardware 1 01-21-2020 06:41 PM
[SOLVED] Where can I find a newbies guide to XFCE or is XFCE not for newbies? Robert.Thompson Slackware 5 03-07-2011 10:27 AM
Anyone up to posting a multimedia / plugins tutorial for newbies to make Firefox work brjoon1021 Linux - Software 10 01-30-2009 08:59 AM
UNinstalling proprietry mandriva nVidia drivers and installing new nVidia drivers deathman Linux - Hardware 3 11-18-2006 05:10 AM
TUTORIAL - HOW to install the NVIDIA official drivers djh Slackware 11 11-14-2004 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration