🗒️Linux系统下卸载安装Nvidia相关内容
00 分钟
2024-7-10
2024-9-13
type
status
date
slug
summary
password
tags
category
icon

# 1、卸载Nvidia驱动

没有驱动则跳过这一步
 

2、重装驱动

1、下载驱动安装程序

官网查找对应GPU型号的驱动并下载
Nvidia驱动查询网站:https://www.nvidia.cn/drivers/lookup/

2、安装显卡驱动

安装过程中的选项:
The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续。 Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? 选择 No 继续。 问题没记住,选项是:install without signing 问题大概是:Nvidia's 32-bit compatibility libraries? 选择 No 继续。 Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 选择 Yes

3、配置环境变量

打开~.bashrc,添加一下内容
保存退出后,执行命令 source ~/.bashrc

4、验证

5、可能遇到的问题

1、“subprocess installed post-installation script returned error exit status 10”报错

2、安装 NVIDIA 显卡驱动时报错:An NVIDIA kernel module ‘nvidia-drm‘ appears to already be load

1、原因:

  • 因为安装的是 Ubuntu图形化版本,之前也安装了 NVIDIA 驱动和 CUDA
  • 系统加在图形化界面后,就会自动加载运行 NVIDIA 相关模块(如:nvidia-drm、nvidia-modeset 等)

2、解决办法:

  • 启动 Ubuntu 系统时不让系统加载图形化界面
  • 在终端命令模式下卸载 NVIDIA 驱动,再重装新的驱动