首頁 > 軟體

Fedora 24 如何安裝 Nvidia 顯示卡驅動

2020-06-16 17:38:37

關於 Nvidia 驅動,我們就不再過多贅述了,本文教大家如何在 Fedora 24 上安裝 Nvidia 顯示卡驅動。

首先我們需要安裝 kernel-devel 和 kernel-headers,如下命令:

[root@localhost ~]# dnf install kernel-devel kernel-headers
Last metadata expiration check: 0:53:22 ago on Tue Jun 28 09:45:14 2016.
Dependencies resolved.
=========================================================================
Package              Arch       Version            Repository     Size
=========================================================================
Installing:
kernel-devel         x86_64     4.5.7-300.fc24     updates         10 M
kernel-headers       x86_64     4.5.7-300.fc24     updates        1.0 M
Transaction Summary
=========================================================================
Install  2 Packages
Total download size: 11 M
Installed size: 42 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): kernel-headers-4.5.7-300.fc24.x86_64.rpm  84 kB/s | 1.0 MB   00:12
(2/2): kernel-devel-4.5.7-300.fc24.x86_64.rpm   191 kB/s |  10 MB   00:55
-------------------------------------------------------------------------
Total                                           202 kB/s |  11 MB   00:57
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing  : kernel-headers-4.5.7-300.fc24.x86_64                 1/2
Installing  : kernel-devel-4.5.7-300.fc24.x86_64                   2/2
Verifying   : kernel-devel-4.5.7-300.fc24.x86_64                   1/2
Verifying   : kernel-headers-4.5.7-300.fc24.x86_64                 2/2
Installed:
kernel-devel.x86_64 4.5.7-300.fc24    kernel-headers.x86_64 4.5.7-300.fc24
Complete!

安裝 gcc, dkms 和 acpid,命令如下:

[root@localhost ~]#dnf install gcc dkms acpid

官方網站下載驅動檔案包,  NVIDIA-Linux-x86_64-367.27.run:

[root@localhost ~]# wget http://in.download.nvidia.com/XFree86/Linux-x86_64/367.27/NVIDIA-Linux-x86_64-367.27.run
--2016-06-28 10:19:16--  http://in.download.nvidia.com/XFree86/Linux-x86_64/367.27/NVIDIA-Linux-x86_64-367.27.run
Resolving in.download.nvidia.com (in.download.nvidia.com)... 117.239.240.42, 117.239.240.32
Connecting to in.download.nvidia.com (in.download.nvidia.com)|117.239.240.42|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 76945324 (73M) [application/octet-stream]
Saving to: ‘NVIDIA-Linux-x86_64-367.27.run’
NVIDIA-Linux-x86_64 100%[===================>]  73.38M  1.16MB/s    in 91s
2016-06-28 10:20:49 (825 KB/s) - ‘NVIDIA-Linux-x86_64-367.27.run’ saved [76945324/76945324]

修改 NVIDIA-Linux-x86_64-367.27.run 許可權並安裝:

[root@localhost ~]#chmod +x NVIDIA-Linux-x86_64-367.27.run 

關閉 X-server 顯示卡驅動並修改驅動連結:

[root@localhost ~]#rm /etc/systemd/system/default.target
rm: remove symbolic link '/etc/systemd/system/default.target'? y
[root@localhost ~]#ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

在上面的命令中,我們使用第一個命令來刪除預設的執行級別,並在下一個命令中,我們改變了執行級別為多使用者(這是等於執行3級(多使用者與文字模式))。

Blacklist nouveau at Boot Time and Post Boot

我們將建立一個檔案disable-noveau.conf在/etc/modprobe.d/目錄如下:

[root@localhost ~]#echo 'blacklist nouveau' >> /etc/modprobe.d/disable-nouveau.conf
[root@localhost ~]#echo 'nouveau modeset=0' >> /etc/modprobe.d/disable-nouveau.conf

編輯 /boot/grub2/grub.cfg 檔案:

linux16 /vmlinuz-4.5.7-300.fc24.x86_64+debug root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet LANG=en_US.UTF-

在rdblacklist=nouveau 按照下面內容新增:

linux16 /vmlinuz-4.5.7-300.fc24.x86_64+debug root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rdblacklist=nouveau rhgb quiet LANG=en_US.UTF-8

重新啟動系統:

[root@localhost ~]#reboot

使用 root 賬戶登入系統:

如下圖,安裝驅動:

選擇 Accept:

選擇“yes”:

選擇“yes”:

成功安裝後,修改預設:

[root@localhost ~]#rm /etc/systemd/system/default.target
[root@localhost ~]#ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

設定:

Ubuntu 16.04安裝Nvidia驅動解決筆電發熱風扇狂轉等問題  http://www.linuxidc.com/Linux/2016-05/131553.htm

Ubuntu 14.04 安裝 Nvidia 私有驅動並進行雙顯示卡切換  http://www.linuxidc.com/Linux/2015-04/116450.htm

Ubuntu 12.04 系統下安裝Nvida 官方顯示卡驅動教學  http://www.linuxidc.com/Linux/2012-09/71206.htm

Ubuntu 使用者安裝顯示卡驅動 Nvidia Driver 334.21 http://www.linuxidc.com/Linux/2014-03/98097.htm

如何在Ubuntu 13.10中安裝最新版的NVIDIA 331.20驅動 http://www.linuxidc.com/Linux/2013-11/93018.htm

Linux 怎樣安裝 Nvidia 337.12 Beta 顯示卡驅動 http://www.linuxidc.com/Linux/2014-04/99864.htm

Ubuntu使用者怎樣安裝Nvidia最新顯示卡驅動 http://www.linuxidc.com/Linux/2014-05/101288.htm


IT145.com E-mail:sddin#qq.com