解决 NVIDIA 显卡驱动问题
你的系统检测到了 NVIDIA 显卡,但它目前没有被声明,也就是说可能没有正确安装驱动程序。你需要安装 NVIDIA 驱动程序来激活这块显卡。以下是安装步骤:
步骤 1:添加 NVIDIA 驱动 PPA
首先,确保你的系统软件包是最新的:
sudo apt update
sudo apt upgrade
然后,添加 NVIDIA 驱动程序的 PPA:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
步骤 2:安装 NVIDIA 驱动程序
查找并安装推荐的驱动程序:
ubuntu-drivers devices
输出示例:
==/sys/devices/pci0000:c9/0000:c9:02.0/0000:ca:00.0==
modalias : pci:v000010DEd000020F5sv000010DEsd00001799bc03sc02i00
vendor : NVIDIA Corporation
driver : nvidia-driver-545- distro non-free
driver : nvidia-driver-535- distro non-free recommended
driver : nvidia-driver-535-open - distro non-free
driver : nvidia-driver-535-server-open - distro non-free
driver : nvidia-driver-545-open - distro non-free
driver : nvidia-driver-535-server - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
根据推荐的驱动安装,例如上面的推荐是
driver : nvidia-driver-535- distro non-free recommended
安装
sudo apt install nvidia-driver-535
步骤 3:重启系统
安装完成后,重启系统以使驱动生效
sudo reboot
步骤 4:验证驱动安装
重启后,使用 nvidia-smi 命令检查 NVIDIA 驱动是否正确安装并生效:
(base) jiahong@GPUsvr01:~$ nvidia-smi
Fri Jul 2614:02:182024+---------------------------------------------------------------------------------------+| NVIDIA-SMI 535.183.01 Driver Version:535.183.01 CUDA Version:12.2||-----------------------------------------+----------------------+----------------------+| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC || Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M.|||| MIG M.||=========================================+======================+======================||0 NVIDIA A800 80GB PCIe Off |00000000:CA:00.0 Off |0|| N/A 57C P0 81W /300W |34730MiB /81920MiB |2% Default |||| Disabled |+-----------------------------------------+----------------------+----------------------++---------------------------------------------------------------------------------------+| Processes:|| GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=======================================================================================||0 N/A N/A 86880 C python 34718MiB |+---------------------------------------------------------------------------------------+
版权归原作者 程序之巅 所有, 如有侵权,请联系我们删除。