查看内核版本:
root@kali:~# uname -a
安装Linux内核头:
root@kali:~# apt install linux-headers-4.14.0-kali3-amd64 linux-headers-4.14.0-kali3-common linux-headers-4.14.0-kali3-all
禁用开源显卡驱动Nouveau:
root@kali:~# echo -e “blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off” > /etc/modprobe.d/blacklist-nouveau.conf
root@kali:~# update-initramfs -u && reboot
确认显卡Nouveau是否禁用:
root@kali:~# lsmod |grep -i nouveau
下载NVIDA官方驱动:
http://www.nvidia.com/Download/index.aspx?lang=en-usKali Linux系统安装NVIDA显卡驱动教程:
赋予权限:
root@kali:~# chmod a+x NVIDIA-Linux-x86_64-384.98.run
查看显卡驱动型号:
root@kali:~# nvidia-xconfig --query-gpu-info | grep 'BusID : ' | cut -d ' ' -f6
修改属性配置文件:
root@kali:~# vi /etc/X11/xorg.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
修改属性文件:
root@kali:~# vi /usr/share/gdm/greeter/autostart/optimus.desktop
[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
修改属性文件:
root@kali:~# vi /etc/xdg/autostart/optimus.desktop
[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
重启系统:
root@kali:~# reboot
注:至此完成NVIDA显卡驱动安装!
网友评论