以下内容将介绍如何在Fedora 32 /31 /30 /29 /28系统发行版上安装NVIDIA官方驱动程序并禁用nouveau驱动程序。本文适用于GeForce 6/7/8/9/200/300/400/500/600/700/800/900/10/20系列显卡。
GeForce 20系列卡适用于440.xx nvidia驱动程序
GeForce 600/700/800/900/10系列卡适用于390.xx和440.xx nvidia驱动程序
GeForce 400/500系列卡适用于390.xx nvidia驱动程序
GeForce 8/9/200/300系列卡适用于340.xx nvidia驱动程序NVIDIA GeForce Driver Installation on Fedora Linux 64-bit
由于网上此类介绍资料奇少,资源紧缺特整理此篇,以便后续参考。安装时走过很多弯路,但是最终已经安装NVIDIA驱动成功。
以下内容将介绍如何在Fedora 32 /31 /30 /29 /28系统发行版上安装NVIDIA官方驱动程序并禁用nouveau驱动程序。本文适用于GeForce 6/7/8/9/200/300/400/500/600/700/800/900/10/20系列显卡。
GeForce 20系列卡适用于440.xx nvidia驱动程序
GeForce 600/700/800/900/10系列卡适用于390.xx和440.xx nvidia驱动程序
GeForce 400/500系列卡适用于390.xx nvidia驱动程序
GeForce 8/9/200/300系列卡适用于340.xx nvidia驱动程序
由于网上此类介绍资料奇少,安装时走过很多弯路,但是最终已经安装NVIDIA驱动成功。
建议在安装新的驱动程序前,可先将系统上的重要文件预先备份,以防发生意外事件导致数据丢失。
# 已安装的nvidia驱动
nvidia-installer -v |grep version
#系统发行信息
uname -a
#显卡信息
lspci |grep -E "VGA|3D"
lspci |grep -E "VGA|3D"
01:00.0 3D compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 Rev. A] (rev a1)
信息在支持的NVIDIA GPU产品列表,如果您的卡在390.xx节之前找到,则使用440.xx驱动程序。如果在390.xx和340.xx段之间,则使用390.xx驱动程序。如果在340.xx和304.xx段之间,则使用340.xx驱动程序
如果运行 lspci |grep -E “VGA|3D” 输出如下信息或类似信息,则说明电脑有nvidia显卡,且已经在BIOS或UEFI中启用
01:00.0 VGA compatible controller: nVidia Corporation GF106 [GeForce GT 555M SDDR3] (rev a1)
OR
01:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)
Disable UEFI Secure Boot or Check How to Sign NVIDIA Kernel Module
If you have UEFI Secure Boot enabled,
then you have to disable Secure Boot or sign your NVIDIA kernel module.
Signing the NVIDIA Kernel Module:
http://download.nvidia.com/XFree86/Linux-x86_64/430.40/README/installdriver.html#modulesigning
Install nVidia proprietary drivers on Fedora 32/31/30/29/28 and disable the nouveau driver
Go to http://www.nvidia.com/Download/Find.aspx?lang=en-us and find latest version of installer package.
When you use browser this is normally downloaded /home//Downloads/NVIDIA-Linux-xxxx.run location.
可支持安装的显卡版本
Fedora 32 | Fedora 31 | Fedora 30 | Fedora 29/28 |
---|---|---|---|
440.82 (April 7, 2020) | 440.82 (April 7, 2020) | 440.82 (April 7, 2020) | 440.82 (April 7, 2020) |
390.132 (November 8, 2019) | 390.132 (November 8, 2019) | 390.132 (November 8, 2019) | 390.132 (November 8, 2019) |
340.108 (December 23, 2019) | 340.108 (December 23, 2019) | 340.108 (December 23, 2019) | 340.108 (December 23, 2019) |
[kjw@localhost ~]$ uname -a
Linux localhost 5.6.14-300.fc32.x86_64 #1 SMP Wed May 20 20:47:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
驱动下载
chmod +x NVIDIA-Linux-*.run
su -
# OR
sudo -i
# OR
sudo su
# OR
su -u root
Make sure that you system is up-to-date and you are running latest kernel
# Fedora 32/31/30/29/28
dnf update
After update reboot your system and boot using latest kernel:
reboot
# Fedora 32/31/30/29/28
dnf install -y kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
创建或编辑文件 /etc/modprobe.d/blacklist.conf
追加内容 ‘blacklist nouveau’
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
编辑 /etc/sysconfig/grub
在文件的‘GRUB_CMDLINE_LINUX=”…”‘末尾追加内容 ‘rd.driver.blacklist=nouveau’
# Example row
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet rd.driver.blacklist=nouveau"
# BIOS
grub2-mkconfig -o /boot/grub2/grub.cfg
# UEFI
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
# Fedora 32/31/30/29/28
dnf remove xorg-x11-drv-nouveau
# Backup old initramfs nouveau image
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
# Create new initramfs image
dracut /boot/initramfs-$(uname -r).img $(uname -r)
Reboot to runlevel 3
Note: You don’t have Desktop/GUI on runlevel 3. Make sure that you have some access to end of guide. (Print it, use lynx/links/w3m, save it to text file).
# 切换启动模式
systemctl set-default multi-user.target
# 重启
reboot
Install nVidia proprietary drivers for GeForce 6/7 & GeForce
8/9/200/300 & GeForce 400/500/600/700/800/900/10/20 series cards
su -
# OR
sudo -i
# OR
sudo su
# OR
su -u root
Following command executes driver install routine. Use full file name command if you have multiple binaries on same directory.
# 方式1
./NVIDIA-Linux-*.run
# OR full path / full file name
# 方式2
/home/kjw.localhost/Downloads/NVIDIA-Linux-x86_64-440.82.run
# 方式3
cd /home/kjw.localhost/Downloads/ #即切换到驱动保存目录
./NVIDIA-Linux-x86_64-390.132-patched-kernel-5.6.run
# 方式4
/驱动保存的路径/NVIDIA-Linux-x86_64-340.108-patched-kernel-5.6.run
All Is Done and Then Reboot Back to Runlevel 5
#All Is Done and Then Reboot Back to Runlevel 5
systemctl set-default graphical.target
reboot
VDPAU/VAAPI support
To enable video acceleration support for your player (Note: you need Geforce 8 or later).
# Fedora 32/31/30/29/28
dnf install vdpauinfo libva-vdpau-driver libva-utils
成功安装之后,可运行以下命令查看已安装信息
nvidia-installer -v |grep version
uname -a
lspci |grep -E "VGA|3D"