Debian 13 自带了 NVIDIA 550版本驱动,支持自GTX 700系列至RTX 4000系列。其中,cuda版本为12.4。

首次安装

首先,确保更新源sources.list中包含mainnon-freenon-free-firmware

其次,安装headers为显卡驱动提供接口

sudo apt install linux-headers-amd64

然后,安装英伟达驱动和私有固件

sudo apt install nvidia-driver firmware-misc-nonfree

此时,重启系统,以便系统启动此驱动,输入nvidia-smi看到如下内容,即显卡驱动安装完成。

2025-08-24T09:17:13.png

最后,安装cuda/nvcc即可

sudo apt install nvidia-cuda-toolkit

等待安装完成后,输入nvcc --version,如果能看到如下输入,则说明cuda/nvcc可以正常工作了。

2025-08-24T09:18:39.png

系统更新后NVIDIA显卡驱动丢失的解决方法

系统更新之后,内核更新了,但是NVIDIA 的 DKMS 内核模块没有为新的内核构建驱动,导致出现NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.问题,解决方法也很简单,直接使用DKMS重建即可:

uname -r
sudo apt update
sudo apt install -y linux-headers-$(uname -r)
sudo apt install -y dkms build-essential
sudo dpkg-reconfigure nvidia-kernel-dkms

标签: linux, nvidia

添加新评论