Ubuntu 20.04:卸载 nvidia-drm 和 nvidia-modeset 后出现 NVIDIA 驱动程序更新问题

Ubuntu 20.04:卸载 nvidia-drm 和 nvidia-modeset 后出现 NVIDIA 驱动程序更新问题

正如标题所述,我在更新 GPU 驱动程序时遇到了问题,在图形模式下使用 Ubuntu 时屏幕保持黑屏。事情的经过如下:

我无法使用 Ubuntu 的更新管理器更新我的 GPU 的驱动程序(它告诉我驱动程序是手动安装的,因此应该手动更新,即使我从未碰过它们)所以我决定手动执行:我在 NVIDIA 的网站上下载了驱动程序安装程序并执行了它。

sudo sh ./NVIDIA-Linux-x86_64-450.80.02.run

我按照帖子顶部答案的指示进行操作(https://unix.stackexchange.com/questions/440840/how-to-unload-kernel-module-nvidia-drm) 并进入纯文本模式 (CTRL+ALT+F2) 来卸载内核模块nvidia-drmnvidia-modeset安装程序告诉我加载了错误消息:

ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your kernel.  This may be because it is in use (for example, by an X server, a CUDA program, or 
         the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading.  Please be sure to exit any programs    
         that may be using the GPU(s) before attempting to upgrade your driver.  If no GPU-based programs are running, you know that your kernel supports module unloading,   
         and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to     
         reboot your computer.

ERROR: An NVIDIA kernel module 'nvidia-modeset' appears to already be loaded in your kernel.  This may be because it is in use (for example, by an X server, a CUDA program, or 
         the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading.  Please be sure to exit any programs    
         that may be using the GPU(s) before attempting to upgrade your driver.  If no GPU-based programs are running, you know that your kernel supports module unloading,   
         and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to     
         reboot your computer.

然后安装程序提示我安装了以前版本的驱动程序,应该将其删除,我按照安装程序提示的命令进行了删除:

apt-get remove --purge nvidia-455
apt-get autoremove

然后我就可以执行安装程序了,它显示:

WARNING: Unable to find suitable destination to install 32-bit compatibility libraries. Your system may not be set up for 32-bit compatibility. 32-bit compatibility files will not be installed; if you wish to install them, re-run the installation and set a valid directory with the --compat32-libdr option.

我选择不去关心它,而是重新启动图形界面

systemctl start graphical.target

但屏幕突然变黑了。我想我做错了什么,所以我决定删除我刚刚安装的驱动程序:

apt-get purge nvidia*
apt-get autoremove

并使用重新安装以前的驱动程序sudo apt-get install nvidia-455,但这并没有解决我的问题。

我的 GRUB 设置为quiet splash nomodeset

现在,当我启动 Ubuntu 时,屏幕永远是黑色的。不过,我可以转到文本控制台 (CTRL+ALT+F2) 并从那里执行所有不使用 GPU 的操作,但缺少图形界面是无法实现的。我该如何解决我的问题?

提前致谢 !

相关内容