1、安装nvidia显卡驱动
添加显卡安装源
sudo rm -f /etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-* sudo add-apt-repository -y ppa:graphics-drivers sudo sed -i 's/http:\/\/ppa.launchpad.net/https:\/\/launchpad.proxy.ustclug.org/g' /etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-*.list sudo apt update
查看并安装显卡
ubuntu-drivers devices
$ ubuntu-drivers devices == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00001C04sv00001462sd0000328Cbc03sc00i00 vendor : NVIDIA Corporation model : GP106 [GeForce GTX 1060 5GB] driver : nvidia-driver-545 - distro non-free driver : nvidia-driver-390 - distro non-free driver : nvidia-driver-470 - distro non-free driver : nvidia-driver-535 - distro non-free recommended driver : nvidia-driver-450-server - distro non-free driver : nvidia-driver-418-server - distro non-free driver : nvidia-driver-535-server - distro non-free driver : nvidia-driver-470-server - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin
安装推荐的显卡驱动(recommended)
sudo apt install nvidia-driver-535
换成自己的即可
持久化配置
在root用户下面编辑crontab打开显卡持久性模式,添加
@reboot nvidia-smi -pm 1