飞牛os安装 NVIDIA 390驱动记录
参考:https://blog.csdn.net/greenery/article/details/145741804
问题:老显卡 820M 新驱动不支持
我的显卡是:Nvidia GF117M [GeForce 610M/710M/810M/820M/GT 620M/625M/630M/720M] WINDOWS显示 GeForce 820M
飞牛自带 nvidia-560 驱动
飞牛默认安装 nvidia-560版本并不支持该型号,nvidia-smi 提示失败
debian 自动安装
官方仓库直接安装,是535版本还是无法使用
手动官网下载.run文件安装
下载390版本的.run文件安装 ,提示编译内核错误
ERROR: An error occurred while performing the step: "Building kernel modules". See /var/log/nvidia-installer.log for details.
具体信息如下:
转机
发现一个csdn文档,和我遇到相同的问题,参考安装:https://blog.csdn.net/greenery/article/details/145741804
卸载之前的安装包
dpkg -l | grep nvidia
apt purge nvidia-* libnvidia-eglcore libnvidia-glcore libegl1 libegl-mesa0 xserver-xorg-core xserver-xorg-video-nvidia
发现问题,卸载时报错:
The following packages have unmet dependencies: libegl-nvidia0 : Depends: libnvidia-egl-wayland1 but it is not installed nvidia-egl-icd : Depends: nvidia-egl-common but it is not installed nvidia-kernel-support : Depends: nvidia-modprobe (>= 535) but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
原因是安装的时候就没安装成功导致包卡住,sudo apt --fix-broken install 也无法正常运行,
强制移除 nvidia-driver-lib-trim(如果仍然卡住),终于恢复正常了
sudo dpkg --remove --force-remove-reinstreq nvidia-driver-lib-trim
清理然后重新安装驱动
sudo apt clean # 清理缓存
sudo apt autoremove # 移除无用包
sudo apt update # 更新软件源
sudo apt upgrade # 升级所有包
sudo apt install nvidia-legacy-390xx-driver # 重新安装驱动驱动依旧安装失败,提示包有问题
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libc6 : Breaks: locales (< 2.41) but 2.36-9+deb12u10 is to be installed
E: Unable to correct problems, you have held broken packages.更新libc6报错
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
docker-ce-rootless-extras : Depends: dbus-user-session but it is not going to be installed
libavdevice59 : Depends: libgl1 but it is not going to be installed
Depends: libjack-jackd2-0 (>= 1.9.10+20150825) but it is not going to be installed or
libjack-0.125
xserver-xorg-core : Depends: libegl1 but it is not installable
Depends: libc6 (>= 2.38) but 2.36-9+deb12u10 is to be installed
Depends: libgl1 but it is not going to be installed
Recommends: default-logind or
logind
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held package检查是否有被锁定的包(hold 状态)
containerd.io hold
docker-buildx-plugin hold
docker-ce hold
docker-ce-cli hold
docker-ce-rootless-extras hold
ffmpeg hold
libavcodec59:amd64 hold
libavdevice59:amd64 hold
libavfilter8:amd64 hold
libavformat59:amd64 hold
libavutil57:amd64 hold
libc-bin hold
libc-l10n hold
libdav1d6:amd64 hold
libfreetype6:amd64 hold
libgdk-pixbuf-2.0-0:amd64 hold
libgdk-pixbuf2.0-bin hold
libgdk-pixbuf2.0-common hold
libswresample4:amd64 hold
libswscale6:amd64 hold
libvpx7:amd64 hold
samba-ad-provision hold
samba-common hold
samba-common-bin hold
samba-dsdb-modules:amd64 hold
samba-libs:amd64 hold
samba-vfs-modules:amd64 hold解除两个libc锁定 ,然后再更新
sudo apt-mark unhold libc-l10n
sudo apt-mark unhold libc-bin
sudo apt install libc6突然发现文中遇到了同样的问题只是在不同的步骤,没注意~~~~~
升级系统失败
遇到了 libc6 依赖冲突
The following packages have unmet dependencies: libc6 : Breaks: locales (< 2.40) but 2.36-9+deb12u9 is to be installed
1
解决方法
仓库 source.list 不能只是 sid 库,全部都要打开,执行下面命令升级
apt install --only-upgrade xserver-xorg-core locales libc6 libc-l10n
安装 nvidia-legacy-390xx-driver,更新仓库,添加 sid 库
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ sid main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list
apt update
apt install nvidia-legacy-390xx-driver
检查安装情况
dpkg 结果如下,还有部分版本是550
firmware-nvidia-gsp 550.144.03-1 amd64 NVIDIA GSP firmware
ii glx-alternative-nvidia 1.2.2 amd64 allows the selection of NVIDIA as GLX provider
ii libegl-nvidia-legacy-390xx0:amd64 390.157-12 amd64 NVIDIA binary EGL library (390xx legacy version)
ii libgl1-nvidia-legacy-390xx-glvnd-glx:amd64 390.157-12 amd64 NVIDIA binary OpenGL/GLX library (GLVND variant) (390xx legacy version)
ii libgles-nvidia-legacy-390xx1:amd64 390.157-12 amd64 NVIDIA binary OpenGL|ES 1.x library (390xx legacy version)
ii libgles-nvidia-legacy-390xx2:amd64 390.157-12 amd64 NVIDIA binary OpenGL|ES 2.x library (390xx legacy version)
ii libglx-nvidia-legacy-390xx0:amd64 390.157-12 amd64 NVIDIA binary GLX library (390xx legacy version)
ii libnvidia-allocator1:amd64 550.144.03-1 amd64 NVIDIA allocator runtime library
ii libnvidia-egl-wayland1:amd64 1:1.1.10-1 amd64 Wayland EGL External Platform library -- shared library
ii libnvidia-glvkspirv:amd64 550.144.03-1 amd64 NVIDIA binary Vulkan Spir-V compiler library
ii libnvidia-legacy-390xx-cfg1:amd64 390.157-12 amd64 NVIDIA binary OpenGL/GLX configuration library (390xx legacy version)
ii libnvidia-legacy-390xx-cuda1:amd64 390.157-12 amd64 NVIDIA CUDA Driver Library (390xx legacy version)
ii libnvidia-legacy-390xx-eglcore:amd64 390.157-12 amd64 NVIDIA binary EGL core libraries (390xx legacy version)
ii libnvidia-legacy-390xx-encode1:amd64 390.157-12 amd64 NVENC Video Encoding runtime library (390xx legacy version)
ii libnvidia-legacy-390xx-fatbinaryloader:amd64 390.157-12 amd64 NVIDIA FAT binary loader (390xx legacy version)
ii libnvidia-legacy-390xx-glcore:amd64 390.157-12 amd64 NVIDIA binary OpenGL/GLX core libraries (390xx legacy version)
ii libnvidia-legacy-390xx-ml1:amd64 390.157-12 amd64 NVIDIA Management Library (NVML) runtime library (390xx legacy version)
ii libnvidia-legacy-390xx-nvcuvid1:amd64 390.157-12 amd64 NVIDIA CUDA Video Decoder runtime library (390xx legacy version)
ii libnvidia-legacy-390xx-ptxjitcompiler1:amd64 390.157-12 amd64 NVIDIA PTX JIT Compiler library (390xx legacy version)
ii libnvidia-ptxjitcompiler1:amd64 550.144.03-1 amd64 NVIDIA PTX JIT Compiler library
ii libnvidia-rtcore:amd64 550.144.03-1 amd64 NVIDIA binary Vulkan ray tracing (rtcore) library
ii nvidia-egl-common 550.144.03-1 amd64 NVIDIA binary EGL driver - common files
ii nvidia-installer-cleanup 20240109+1 amd64 cleanup after driver installation with the nvidia-installer
ii nvidia-kernel-common 20240109+1 amd64 NVIDIA binary kernel module support files
ii nvidia-legacy-390xx-alternative 390.157-12 amd64 allows the selection of NVIDIA as GLX provider (390xx legacy version)
ii nvidia-legacy-390xx-driver 390.157-12 amd64 NVIDIA metapackage (390xx legacy version)
ii nvidia-legacy-390xx-driver-bin 390.157-12 amd64 NVIDIA driver support binaries (390xx legacy version)
ii nvidia-legacy-390xx-driver-libs:amd64 390.157-12 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries) (390xx legacy version)
ii nvidia-legacy-390xx-egl-icd:amd64 390.157-12 amd64 NVIDIA EGL installable client driver (ICD)
ii nvidia-legacy-390xx-kernel-dkms 390.157-12 amd64 NVIDIA binary kernel module DKMS source (390xx legacy version)
ii nvidia-legacy-390xx-kernel-support 390.157-12 amd64 NVIDIA binary kernel module support files (390xx legacy version)
ii nvidia-legacy-390xx-smi 390.157-12 amd64 NVIDIA System Management Interface (390xx legacy version)
ii nvidia-legacy-390xx-vdpau-driver:amd64 390.157-12 amd64 Video Decode and Presentation API for Unix - NVIDIA driver (390xx legacy)
ii nvidia-legacy-390xx-vulkan-icd:amd64 390.157-12 amd64 NVIDIA Vulkan installable client driver (ICD) (390xx legacy version)
ii nvidia-modprobe 570.133.07-1 amd64 utility to load NVIDIA kernel modules and create device nodes
ii nvidia-persistenced 550.163.01-1 amd64 daemon to maintain persistent software state in the NVIDIA driver
ii nvidia-settings-legacy-390xx 390.157-1+b1 amd64 tool for configuring the NVIDIA graphics driver (390xx legacy version)
ii nvidia-support 20240109+1 amd64 NVIDIA binary graphics driver support files
ii nvidia-vulkan-common 550.144.03-1 amd64 NVIDIA Vulkan driver - common files
ii xserver-xorg-video-nvidia-legacy-390xx 390.157-12 amd64 NVIDIA binary Xorg driver (390xx legacroot@zmj-NASrorrorororootrroroot@rrororrrrNVIDIA msi 正常
root@zmj-NAS:/var/apps/docker-halo# nvidia-smi
Wed Jun 4 23:41:55 2025
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.157 Driver Version: 390.157 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce 820M Off | 00000000:08:00.0 N/A | N/A |
| N/A 48C P0 N/A / N/A | 0MiB / 1985MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+