更新5090显卡后的一系列问题【linux】

更新5090显卡后的一系列问题

【linux版】

问题描述:(时间戳:20250623)更换5090显卡后,由于新旧显卡的驱动版本不一致,使得更换后nvidia-smi就没有输出了。【ubuntu20.04系统】

Step1:

一开始考虑是显卡驱动的问题,所以直接就按照驱动更新的方式来搞了:

参考了这个和这个

2、卸载驱动

sudo apt-get --purge remove nvidia*
1
sudo apt autoremove
1
To remove CUDA Toolkit:

sudo apt-get --purge remove "*cublas*" "cuda*"
1
To remove NVIDIA Drivers:

sudo apt-get --purge remove "*nvidia*"
————————————————

                            版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/wm9028/article/details/110268030
4. 给安装文件赋予执行权限
假设你放在 / 根目录,执行:

cd /
sudo chmod +x NVIDIA-Linux-x86_64-570.144.run
1
2
5. 运行安装程序
执行安装程序:

sudo ./NVIDIA-Linux-x86_64-570.144.run
1
在安装过程中注意以下选项选择:

Register the kernel module with DKMS?
选择 Yes (推荐,方便系统内核更新后自动重建驱动)
Install NVIDIA’s 32-bit compatibility libraries?
选择 Yes (保持兼容性)
Which version do you want to install?
务必选择 MIT Licensed Open-Source Driver(MIT开源版)
(⚠️ 不要选 Proprietary 闭源版,否则容易黑屏!)
————————————————

                            版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
                        
原文链接:https://blog.csdn.net/2301_79870359/article/details/147621720

但是重装之后,电脑甚至就都打不开了,会停在:

aufs aufs_fill_super:918:mount1461 no arg overlayfs: missing 'lowerdir'

Step2

搜索了这个问题,搞了很久,感觉答案中和显卡相关的很少,只有在askubuntu论坛上找到这一个是相关的:

Problem
I guess it was after an update when I have had the same issue. In my case it was related to the Xorg / Nvidia graphics card driver, I guess. How this is connected to the corresponding error message, still is a mystery to me.

Past the passphrase-prompt for the decryption of the drive, I got the same error message.

aufs aufs_fill_super:912:mount[1089]: no arg
overlayfs: missing 'lowerdir'
Booting in verbose mode, I noticed an error somewhat like this where it hang:

Failed to connect to lvmetad.
Falling back to device scanning.
/dev/mapper/ubuntu--vg--root: clean, 500699/15081472 files, 9150222/60315648 blocks
I tried the following without success:

Freeing diskspace
rebuilding / updating initramfs and grub
/etc/lvm/lvm.conf: change use_lvmetad=1 to use_lvmetad=0
Solution:
Booting / login via recovery-mode was still possible so I could make the following changes. If the usual logging-in had not been possible I would have had to make the changes via chroot:

I had to change the driver: X.Org-X-Server to the proprietary NVIDIA driver
Not sure if that was necessary: sudo apt-get install --reinstall linux-image-4.15.0-54-generic (adjust to current version)
res: Failed to connect to lvmetad - Stuck on boot

Info / side-effects:
The driver swap also solved and other odd issue (gnome-shell high cpu) that I was experiencing: My gnome-shell-process constantly was using about 30-50% CPU(!) now it is on 1-2%.

Lastly, the constantly noisy fan:
There may be a way to manually change the fan-speed (http://www.upubuntu.com/2015/05/how-to-controladjust-gpu-fan-speed-for.html) or you can simply use the integrated GPU.

NVIDIA X Server Settings -> PRIME Profiles -> select Intel. (You have to logout and login again for this to take effect).

但是多次进入recovery mode下,试了很多次也还是没解决问题。

最后实在是不知道怎么解决这个问题,又看到了5090可能比较新,也看到了网上一些说5090踩坑的,比如这个

所以想重装个系统试下。

Step3:

重装系统选择了24.04.感觉25还是太新了,担心有些不兼容的地方,到时候调起来更麻烦。

没想到系统这里也踩了个小坑。参考了这个资料

如果安装也有说明
1,下载iso镜像
2,使用balenaEtcher工具创建启动盘,这个官方推荐的工具,所以这次我们就用这个制作启动盘
当然也可以用rufus,ventoy等工具
3,从启动盘启动系统

去ubuntu网站上下载系统,下载下来的文件是ubuntu-24.04.2-desktop-amd64.iso,一开始还被唬住了,怎么下载amd的了,后来发现是不区分的。然后使用官方推荐的balenaEtcher工具,结果创建出来以后u盘启动以后电脑就停在黑屏了。可能是我没有掌握正确的使用方式。

后来我换了rufus以后就正常了。

Step4

重装系统以后,运行nvidia-smi还是输出no device

原因是系统安装时默认安装的显卡驱动还是不适配。这里我先尝试从软件和更新那里找驱动,我分别在附加驱动那一栏里挨个去试了。附加驱动里都是570,这和我网上查的适配驱动的数字是一致的,主要就是分不清到底应该用open kernel还是server driver还是什么。挨个试了一下以后发现,

NVIDIA driver (open kernel) metapackage来自nvidia-driver-570-open(专有)

选择这个点应用更改就可以了。

nvidia-smi就可以输出cuda版本和显卡型号了。

果然重装系统解决99%的问题。

posted @ 2025-06-23 15:46  fourk-ty  阅读(1218)  评论(0)    收藏  举报