我刚刚在我的 2021 Acer Nitro 5 上安装了 Ubuntu 22.04.1 LTS。问题是 Nvidia gpu 不工作。
我通过“附加驱动程序”面板安装了驱动程序,并选择了非 Nouveau 版本(实际上我尝试了所有版本,包括从 475 到 525 的开放内核和服务器);实际上我正在运行nvidia-driver-525 (proprietary)
如果我打开 nvidia-smi,我会出现以下错误NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
。
与 nvidia-settings 相同:ERROR: NVIDIA driver is not loaded
奇怪的是,我在另一个驱动器上安装了 Ubuntu 22.04,并且 Nvidia 运行正常,但现在当我重新安装它时,它却不工作了。
我也禁用了安全启动,并尝试使用最新的内核头重新安装;我也已经检查了所有的解决方案,但对我来说不起作用。
GPU 是 GTX 1650 Ti Mobile。CPU:i5-10300H
我在这里先向您的帮助表示感谢
输出lspci -k | grep -EA3 'VGA|3D|Display'
:
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05)
Subsystem: Acer Incorporated [ALI] CometLake-H GT2 [UHD Graphics]
Kernel driver in use: i915
Kernel modules: i915
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] (rev a1)
Subsystem: Acer Incorporated [ALI] TU117M [GeForce GTX 1650 Ti Mobile]
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation Device 10fa (rev a1)
输出sudo modprobe nvidia
:
modprobe: ERROR: ../libkmod/libkmod-module.c:838 kmod_module_insert_module() could not find module by name='off'
modprobe: ERROR: could not insert 'off': Unknown symbol in module, or unknown parameter (see dmesg)
输出grep nvidia /lib/modprobe.d/*
:
/lib/modprobe.d/blacklist-nvidia.conf:# This file was generated by nvidia-prime
/lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia
/lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia-drm
/lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia-modeset
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia off
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia-drm off
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia-modeset off
/lib/modprobe.d/nvidia-runtimepm.conf:options nvidia "NVreg_DynamicPowerManagement=0x02"
输出grep nvidia /etc/modprobe.d/*
:
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb
/etc/modprobe.d/nvidia-graphics-drivers-kms.conf:# This file was generated by nvidia-driver-525
/etc/modprobe.d/nvidia-graphics-drivers-kms.conf:options nvidia-drm modeset=1
输出cat /etc/default/grub
:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT="0"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
答案1
您已将nvidia
模块列入黑名单/lib/modprobe.d/blacklist-nvidia.conf
。
该文件现在未被使用,可能是由从 PPA 安装的某些软件添加的。
删除此文件
sudo rm /lib/modprobe.d/blacklist-nvidia.conf
然后重新启动。