$ nvidia-detect
Detected NVIDIA GPUs:
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106 [GeForce GTX 6xx] [10de:11c0] (rev a1)
04:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU102 [GeForce RTX 2xxx Ti Rev. A] [10de:1e07] (rev a1)
Checking card: NVIDIA Corporation GK106 [GeForce GTX 6xx] (rev a1)
Your card is supported by the Tesla 470 drivers series.
It is recommended to install the
nvidia-tesla-470-driver
package.
Checking card: NVIDIA Corporation TU102 [GeForce RTX 2xxx Ti Rev. A] (rev a1)
Your card is supported by the Tesla 470 drivers series.
It is recommended to install the
nvidia-tesla-470-driver
package.
配置Debain源
$ sudo sh -c 'echo deb http://ftp.cn.debian.org/debian bookworm-backports main contrib non-free > /etc/apt/sources.list.d/nvidia-driver-debain.list'
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131
$ sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/
$ sudo deepin-immutable-writable enable
This operation will set the system directory to read and write permissions.
And the modification operations to these directories may be discarded or retained depending on the configuration file.
Please use with caution.
Do you want to continue? [Y/n]
Writable layer has been enabled, please reboot to take effect
$ sudo reboot
Broadcast message from root@localhost on pts/1 (Thu 2025-11-13 00:37:23 CST):
The system will reboot now!
$ sudo update-glx --config nvidia
有 2 个候选项可用于替换 nvidia (提供 /usr/lib/nvidia/nvidia)。
选择 路径 优先级 状态
------------------------------------------------------------
* 0 /usr/lib/nvidia/current 580 自动模式
1 /usr/lib/nvidia/current 580 手动模式
2 /usr/lib/nvidia/tesla-470 470 手动模式
要维持当前值[*]请按<回车键>,或者键入选择的编号:2
update-alternatives: 使用 /usr/lib/nvidia/tesla-470 来在手动模式中提供 /usr/lib/nvidia/nvidia (nvidia)
正在处理用于 glx-alternative-nvidia (1.2.1) 的触发器 ...
正在处理用于 update-glx (1.2.1) 的触发器 ...
正在处理用于 glx-alternative-nvidia (1.2.1) 的触发器 ...
正在处理用于 libc-bin (2.38-6deepin17) 的触发器 ...
正在处理用于 initramfs-tools (0.142-0deepin8) 的触发器 ...
update-initramfs: Generating /boot/initrd.img-6.12.43-amd64-desktop-rolling
setupcon is missing. Please install the 'console-setup' package.
I: The initramfs will attempt to resume from /dev/dm-1
I: (/dev/mapper/vg1762190879-SWAP)
I: Set the RESUME variable to override this.
live-boot: core filesystems devices utils udev blockdev dns.
lyx@lyx-PC:~$ nvidia-smi
Failed to initialize NVML: Driver/library version mismatch
$ #重启前的验证
$ nvidia-smi
Failed to initialize NVML: Driver/library version mismatch
$ type nvidia-smi
nvidia-smi 已被录入哈希表 (/usr/bin/nvidia-smi)
$ ll /usr/bin/nvidia-smi
lrwxrwxrwx 3 root root 36 11月 4日 11:37 /usr/bin/nvidia-smi -> /etc/alternatives/nvidia--nvidia-smi
$ ll /etc/alternatives/nvidia--nvidia-smi
lrwxrwxrwx 1 root root 36 11月13日 00:40 /etc/alternatives/nvidia--nvidia-smi -> /usr/lib/nvidia/tesla-470/nvidia-smi
$ sudo reboot
Broadcast message from root@lyx-PC on pts/1 (Thu 2025-11-13 00:42:50 CST):
The system will reboot now!
$ #驱动有效性验证
$ nvidia-smi
Thu Nov 13 00:44:49 2025
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.256.02 Driver Version: 470.256.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| 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 GeForce ... Off | 00000000:03:00.0 N/A | N/A |
| 41% 30C P5 N/A / N/A | 6MiB / 2000MiB | N/A Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 NVIDIA GeForce ... Off | 00000000:04:00.0 On | N/A |
| 39% 49C P0 69W / 300W | 102MiB / 22191MiB | 7% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 1 N/A N/A 2408 G /usr/lib/xorg/Xorg 70MiB |
| 1 N/A N/A 4204 G /usr/bin/kwin_x11 8MiB |
| 1 N/A N/A 4211 G ...gnu/libexec/kglobalacceld 2MiB |
| 1 N/A N/A 4864 G /usr/bin/dde-shell 12MiB |
| 1 N/A N/A 4996 G /usr/bin/uos-ai-assistant 3MiB |
+-----------------------------------------------------------------------------+
$ sudo deepin-immutable-writable disable
This operation will discard the data modified during the entire service opening period.
Please use with caution.
Do you want to continue? [Y/n]
Writable layer has been disabled, please reboot to take effect
$ sudo reboot
Broadcast message from root@lyx-PC on pts/1 (Thu 2025-11-13 00:45:46 CST):
The system will reboot now!
背景:
在装系统时,默认使用的是RTX 2000显卡,默认自动装的是580驱动;近期因需要,翻出以前的GTX 600显卡,但发现580驱动已经不支持该显卡,经过查询,发现470驱动同时支持这两款型号。
操作步骤:
至此,驱动就算装完了,两个显卡就能同时工作了。
PS:
很恶心的一点就是,执行
update-alternatives动作,居然需要关闭磐石系统。。。技术上确实需要这样干,但逻辑上就感觉很别扭。。。