CentOS8下安裝Geforce GTX 650驅動


第一步:查看顯卡類型

[root@localhost ~]# lshw -numeric -C display

顯示顯卡類型:product: GK107 [GeForce GTX 650] [10DE:FC6]

顯示驅動是nouveau:configuration: driver=nouveau latency=0

Nouveau是第三方為NVIDIA顯卡開發的一個開源3D驅動,沒有得到NVIDIA的認可與支持。

 

 

 

第二步:到nvidia官網下載對應驅動 https://www.nvidia.com/Download/index.aspx#

NVIDIA-Linux-x86_64-440.44.run

 

第三步:安裝驅動所依賴的軟件包

# yum groupinstall "Development Tools"
# yum install kernel-devel epel-release
# yum install dkms

 

第四步:禁用nouveau,通過修改配置 /etc/default/grub

[root@localhost ~]# vi /etc/default/grub

原來的設置

1 GRUB_TIMEOUT=5
2 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
3 GRUB_DEFAULT=saved
4 GRUB_DISABLE_SUBMENU=true
5 GRUB_TERMINAL_OUTPUT="console"
6 GRUB_CMDLINE_LINUX="crashkernel=auto resume=/dev/mapper/cl-swap rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet"
7 GRUB_DISABLE_RECOVERY="true"
8 GRUB_ENABLE_BLSCFG=true
View Code

新的設置

1 GRUB_TIMEOUT=5
2 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
3 GRUB_DEFAULT=saved
4 GRUB_DISABLE_SUBMENU=true
5 GRUB_TERMINAL_OUTPUT="console"
6 GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet nouveau.modeset=0"
7 GRUB_DISABLE_RECOVERY="true"
8 GRUB_ENABLE_BLSCFG=true
View Code

執行

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

grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
使配置生效
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done
[root@localhost ~]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done

 

第五步:重啟centos,確認配置生效,nouveau不再使用

[root@localhost ~]# lshw -numeric -C display
  *-display UNCLAIMED
       description: VGA compatible controller
       product: GK107 [GeForce GTX 650] [10DE:FC6]
       vendor: NVIDIA Corporation [10DE]
       physical id: 0
       bus info: pci@0000:02:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:fa000000-faffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff

 

第六步:安裝Nvidia驅動時,必須停止Xorg服務,轉成text模式

[root@localhost ~]# systemctl isolate multi-user.target

 

第七步:安裝,運行命令:bash NVIDIA-Linux-x86_64-440.44.run,一路yes

[root@localhost ~]# ls
公共 視頻 文檔 音樂 anaconda-ks.cfg eye.txt hello index.php learning_log NVIDIA-Linux-x86_64-440.44.run
模板 圖片 下載 桌面 a.out git hello.c initial-setup-ks.cfg mysql80-community-release-el8-1.noarch.rpm scikit_learn_data
[root@localhost ~]# bash NVIDIA-Linux-x86_64-440.44.run
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 440.44........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
[root@localhost ~]#

 

第八步:重啟后,進入終端運行:nvidia-settings

進入 NVIDIA X Server Settings

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM