我的 Ubuntu 18.04 PC 上有一台 GTX 1070。我之前曾尝试使用命令通过运行文件安装 nvidia 驱动程序sudo ./NVIDIA-Linux-x86_64-418.43.run --no-opengl-files --dkms --no-drm
,但未能正确卸载它,所以现在我无法执行--uninstall
此操作。我也无法重新安装运行文件。尝试这样做会给我:
The distribution-provided pre-install script failed! Are you sure you want to continue?
-Continue Installation
ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver
-OK
WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf ...
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details.
在日志文件中:
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Feb 26 08:56:40 2019
installer version: 410.93
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
nvidia-installer command line:
./nvidia-installer
Unable to load: nvidia-installer ncurses v6 user interface
Using: nvidia-installer ncurses user interface
-> Detected 12 CPUs online; setting concurrency level to 12.
-> Installing NVIDIA driver version 410.93.
-> Running distribution scripts
executing: '/usr/lib/nvidia/pre-install'...
-> done.
我似乎也无法使用 apt 安装 nvidia 的驱动程序。尝试安装任何版本并运行后,nvidia-smi
系统提示:NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信。请确保已安装并运行最新的 NVIDIA 驱动程序。
尝试清除 nvidia 时sudo apt-get purge nvidia*
出现错误:
Purging configuration files for nvidia-compute-utils-390 (390.87-0ubuntu0~gpu18.04.2) ...
Processing triggers for initramfs-tools (0.130ubuntu3.6) ...
update-initramfs: Generating /boot/initrd.img-4.18.0-15-generic
W: Possible missing firmware /lib/firmware/nvidia/gv100/sec2/sig.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/sec2/image.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/sec2/desc.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/nvdec/scrubber.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/sw_method_init.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/sw_bundle_init.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/sw_nonctx.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/sw_ctx.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/gpccs_sig.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/gpccs_data.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/gpccs_inst.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/gpccs_bl.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/fecs_sig.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/fecs_data.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/fecs_inst.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/gr/fecs_bl.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/acr/ucode_unload.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/acr/ucode_load.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/acr/unload_bl.bin for module nouveau
W: Possible missing firmware /lib/firmware/nvidia/gv100/acr/bl.bin for module nouveau
如果有人可以指导我修复这个损坏的安装而无需重新安装 Ubuntu,我将不胜感激。
编辑:我已设法“完全”(就日志告诉我的而言)通过重新安装和使用运行文件 --uninstall 来删除运行文件安装。但是我仍然收到所有行“W:可能缺少模块 nouveau 的固件 /lib/firmware/nvidia/gv100/sec2/sig.bin”
答案1
尝试按照以下方式操作:
这将关闭您的图形显示管理器(现在通常是 Gnome),因此如果您在运行它们的机器上按照这些说明进行操作,请记下以下步骤:
sudo telinit 3
这将带您进入一个 tty(带有登录提示的黑屏),现在以超级用户身份登录(输入您帐户的用户名和密码)然后运行:
sudo su -
这会将您提升为 root 权限,现在 cd 到 NVIDIA .run 文件所在的目录:
cd /home/someuser/Download
bash NVIDIA-Linux-x86_64-418.43.run --no-opengl-files --dkms --no-drm
最后,我发现我必须编辑我的 grub 默认设置以避免一些错误:
vim /etc/default/grub
找到以下列内容开头的行:
GRUB_CMDLINE_LINUX_DEFAULT=
添加 nvidia-drm.modeset=1(我相信 quiet 和 splash 是默认值),我的读作:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
现在更新你的 grub:
update-grub
最后,重启