张小伟 發表於 2020-8-21 19:10:00

How to install the NVIDIA drivers on Fedora 32

<p>https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-fedora-32</p>
<p>&nbsp;</p>
<p>The NVIDIA Driver is a program needed for your NVIDIA Graphics GPU to function with better performance. It communicates between your Linux operating system, in this case Fedora 32, and your hardware, the NVIDIA Graphics GPU. <br><br>The NVIDIA drivers can be installed by using the <code>bash</code> command after stopping the GUI and disabling the <code>nouveau</code> driver by modifying the GRUB boot menu.
<br><br>To install Nvidia driver on other Linux distributions, follow our Nvidia Linux Driver guide.
<br><br>
<strong>In this NVIDIA Drivers installation guide you will learn:</strong></p>
<ul>
<li>How to install NVIDIA graphic driver automatically using RPM Fusion
and Manually using the official NVIDIA driver from nvidia.com.</li>
<li>How to identify your NVIDIA graphic card model on your operating system.</li>
<li>Where to download the NVIDIA driver package for Fedora 32.</li>
<li>How to install prerequisites for a successful Nvidia Driver compilation and installation on Fedora 32.</li>
<li>How to disable the <code>nouveau</code> driver.</li>
<li>How to successfully install NVIDIA Drivers on your Fedora 32 Linux operating system.</li>

</ul>
<div class="uk-margin">
<div class="uk-thumbnail uk-thumbnail-expand"> <img src="https://linuxconfig.org/images/00-how-to-install-the-nvidia-drivers-on-fedora-32.png">
<div class="uk-thumbnail-caption">How to install the NVIDIA drivers on Fedora 32</div>

</div>

</div>
<h2>Software Requirements and Conventions Used</h2>
<table class="uk-table uk-table-striped uk-table-condensed"><caption>Software Requirements and Linux Command Line Conventions</caption>
<thead>
<tr><th>Criteria</th><th>Requirements</th>
</tr>


</thead>
<tbody>
<tr>
<td class="uk-text-primary uk-text-bold">Operating System</td>
<td>Fedora 32</td>


</tr>
<tr>
<td class="uk-text-primary uk-text-bold">Software</td>
<td>Existing Desktop installation such as GNOME.</td>


</tr>
<tr>
<td class="uk-text-primary uk-text-bold">Other</td>
<td>Privileged access to your Linux system as root or via the <code>sudo</code> command.</td>


</tr>
<tr>
<td class="uk-text-primary uk-text-bold">Conventions</td>
<td>
<strong>#</strong> - requires given linux commands to be executed with root privileges either directly as a root user or by use of <code>sudo</code> command<br>
<strong>$</strong> - requires given linux commands to be executed as a regular non-privileged user
</td>


</tr>

</tbody>


</table>
<h2>How to install the NVIDIA drivers on Fedora 32 Workstation step by step instructions</h2>
<h3>Install Nvidia Driver using RPMFusion</h3>
<p>

Installing the Nvidia driver on Fedora Linux using RPM Fusion is the
easiest and recommended way since you do not have to deal with driver
re-compiling every-time there is a new kernel update. <br><br></p>
<ol class="steps">
<li>Open up the terminal and identify your Nvidia graphic card model by executing:
<pre>$ lspci -vnn | grep VGA
01:00.0 VGA compatible controller : NVIDIA Corporation GP106 [<strong>GeForce GTX 1060</strong> 6GB] (rev a1) (prog-if 00 )
</pre>
</li>
<li>Fully update your system.
<pre>$ sudo dnf update
</pre>
<div class="uk-alert uk-alert-warning"><center><strong>ATTENTION</strong><br>Failing to fully update your system may result in a kernel version mismatch producing the <strong>"NVIDIA kernel module missing. Falling back to nouveau."</strong> error message after the nvidia driver installation and system reboot. </center></div>


</li>
<li>Enable RPM fusion:
<pre>$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
$ sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
</pre>
</li>
<li>Lastly install a relevant Nvidia driver package by selecting one of the following options:
<pre>For recent GeForce/Quadro/Tesla execute:
$ sudo dnf install akmod-nvidia
For Legacy GeForce 400/500 execute:
$ sudo dnf install xorg-x11-drv-nvidia-390xx akmod-nvidia-390xx
For Legacy GeForce 8/9/200/300 execute:
$ sudo dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx
</pre>
</li>
<li>All done. Reboot your system:
<pre>$ sudo reboot
</pre>
</li>
</ol>
<div class="uk-margin">
<div class="uk-thumbnail uk-thumbnail-expand"><img src="https://linuxconfig.org/images/01-how-to-install-the-nvidia-drivers-on-fedora-32.png">
<div class="uk-thumbnail-caption">NVIDIA driver on Fedora 32</div>
</div>
</div>
<div class="moduletable">
<div class="custom"><hr>
<div class="uk-grid">
<div class="uk-width-1-1">
<div class="uk-alert uk-alert-alert"><center><em><strong>SUBSCRIBE TO NEWSLETTER</strong><br>Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
</em></center></div>

</div>

</div>
<hr>
<ins class="adsbygoogle" style="display: block; text-align: center; height: 189px; width: 733px" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4906753266448300" data-ad-slot="5703296903" data-adsbygoogle-status="done"><ins id="aswift_0_expand" style="display: inline-table; height: 189px; margin: 0; padding: 0; position: relative; visibility: visible; width: 733px"><ins id="aswift_0_anchor" style="display: block; height: 189px; margin: 0; padding: 0; position: relative; visibility: visible; width: 733px; overflow: hidden"></ins></ins></ins><hr>
</div>


</div>
<h3>Install Nvidia Driver manually</h3>
<ol class="steps"><ol class="steps">In case from some reason the installation of Nvidia Driver using RPM
fusion fails or you simply wish to have the latest Nvidia driver version
which may not be available via RPM fusion channel you might attempt the
Nvidia driver manual install.</ol></ol>
<p><br><br></p>
<ol class="steps"><ol class="steps">
<li>Open up the terminal and identify your Nvidia graphic card model by executing:
<pre>$ lspci -vnn | grep VGA
01:00.0 VGA compatible controller : NVIDIA Corporation GP106 [<strong>GeForce GTX 1060</strong> 6GB] (rev a1) (prog-if 00 )
</pre>
</li>
<li>Download the Nvidia driver package from nvidia.com using search criteria based on your Nvidia card model and the Linux operating system.
<div class="uk-margin">
<div class="uk-thumbnail uk-thumbnail-expand"><img src="https://linuxconfig.org/images/02-how-to-install-the-nvidia-drivers-on-fedora-32.png">
<div class="uk-thumbnail-caption">Download an appropriate Nvidia driver for your VGA card.</div>
</div>
</div>
<div class="uk-alert uk-alert-warning"><center><strong>Linux Long Lived Branch (LLB) vs Linux Short Lived Branch (SLB)</strong><br><br> <strong>Long-Lived Branch</strong>
drivers provide ISV certification and optimal stability and performance
for Unix customers. This driver is most commonly deployed at
enterprises, providing support for the sustained bug fix and security
updates commonly required.<br><br> <strong> Short-Lived Branch drivers</strong>
provide early adopters and bleeding edge developers access to the
latest driver features before they are integrated into the Long-Lived
Branches.<br>REF: nvidia.com</center></div>


Alternatively, if you know what you are doing you can download the driver directly from the Nvidia Linux driver list. Once ready you should end up with a file similar to the one shown below:
<pre>$ ls NVIDIA-Linux-x86_64-*
NVIDIA-Linux-x86_64-430.50.run
</pre>
</li>
<li>Next, install package prerequisites for a successful Nvidia driver compilation and installation.
<pre>$ sudo dnf groupinstall "Development Tools"
$ sudo dnf install libglvnd-devel
</pre>
</li>
<li>Permanently disable the <code>nouveau</code> driver by modifying the GRUB boot menu:
<pre>$ sudo grub2-editenv - set "$(sudo grub2-editenv - list | grep kernelopts) nouveau.modeset=0"
</pre>
</li>
<li>Reboot your Fedora 32 Desktop:<br>
<div class="uk-alert uk-alert-danger"><center><strong>WARNING</strong><br>Depending on your Nvidia VGA model your system
might misbehave. At this stage be ready to get your hands dirty. After
the reboot you may end up without GUI at all. Be sure that you have the SSH Server enabledon your system to be able login remotely or use <code>CTRL+ALT+F2</code> to switch TTY console and continue with the installation. </center></div>
<pre>$ sudo reboot
</pre>
</li>
<li>The Nvidia drivers must be installed while the Xorg server is stopped. Switch to the text mode by:
<pre>$ sudosystemctl isolate multi-user.target
</pre>
</li>
<li>Install the Nvidia driver by executing the following command via TTY console or remote SSH login:
<pre>$ sudo bash NVIDIA-Linux-x86_64-*
</pre>
When prompted answer <code>YES</code> to installation of NVIDIA's 32-bit compatibility libraries and automatic update of your X configuration file.
<div class="uk-alert uk-alert-success"><center><strong>NOTE</strong><br><code>ERROR: Unable to find the kernel source tree for the currently running kernel</code><br>In case you receive the above error message during the execution of the below command, follow the kernel source instructions on how to install kernel source on CentOS / RHEL Linux system.</center></div>


</li>
<li>Reboot your system one more time.<br>
<pre>$ sudo reboot</pre>
All done. The Nvidia driver should now be installed on your Fedora 31 Desktop. Reboot your system now, login and run <code>nvidia-settings</code> to further configure your Nvidia graphic card settings.</li>
</ol></ol>
<div class="uk-margin">
<div class="uk-thumbnail uk-thumbnail-expand"><img src="https://linuxconfig.org/images/03-how-to-install-the-nvidia-drivers-on-fedora-32.png">
<div class="uk-thumbnail-caption">Installed Nvidia drivers on Fedora 32 Linux GNOME Workstation running graphic card benchmark.</div>
</div>
</div>
<div class="moduletable">
<div class="custom"><hr><ins class="adsbygoogle" style="display: block; text-align: center; height: 189px; width: 733px" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4906753266448300" data-ad-slot="5703296903" data-adsbygoogle-status="done"><ins id="aswift_1_expand" style="display: inline-table; height: 189px; margin: 0; padding: 0; position: relative; visibility: visible; width: 733px"><ins id="aswift_1_anchor" style="display: block; height: 189px; margin: 0; padding: 0; position: relative; visibility: visible; width: 733px; overflow: hidden"></ins></ins></ins><hr></div>
</div>
<h2>Troubleshooting</h2>
<p>GDM on Xorg server does not start after user login and user ends up with black screen. The Xorg log contains the following or similar error messages:</p>
<pre> (II) systemd-logind: got pause for 13:68
(II) systemd-logind: got resume for 13:64
(II) NVIDIA(0): Setting mode "DFP-1:nvidia-auto-select"
(II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
(II) NVIDIA(0):   may not be running or the "AcpidSocketPath" X
(II) NVIDIA(0):   configuration option may not be set correctly.When the
(II) NVIDIA(0):   ACPI event daemon is available, the NVIDIA X driver will
(II) NVIDIA(0):   try to use it to receive ACPI event notifications.For
(II) NVIDIA(0):   details, please see the "ConnectToAcpid" and
(II) NVIDIA(0):   "AcpidSocketPath" X configuration options in Appendix B: X
(II) NVIDIA(0):   Config Options in the README.
couldn't enable device 8
(II) systemd-logind: got resume for 13:66
couldn't enable device 6
(II) systemd-logind: got resume for 13:65
couldn't enable device 7
(II) systemd-logind: got resume for 13:72
couldn't enable device 14
couldn't enable device 17
(II) systemd-logind: got resume for 13:71
couldn't enable device 13
(II) systemd-logind: got resume for 13:67
couldn't enable device 9
(II) systemd-logind: got resume for 13:73
couldn't enable device 15
(II) systemd-logind: got resume for 13:69
couldn't enable device 11
couldn't enable device 16
(II) systemd-logind: got resume for 13:70
couldn't enable device 12
(II) systemd-logind: got resume for 13:68
couldn't enable device 10
</pre>
<p>Try restart the systemd's <code>systemd-logind</code> service:</p>
<pre>$ sudo systemctl restart systemd-logind
</pre><br><br>
来源:https://www.cnblogs.com/ztguang/p/13542908.html
頁: [1]
查看完整版本: How to install the NVIDIA drivers on Fedora 32