我最近将笔记本电脑(双启动)从损坏的 20.04 升级到 22.04。它最初运行良好,大约一周后就出现了问题。
最初,操作系统无法识别内置屏幕,因此我认为问题出在图形上。我有一台 HP Victus 16-e0007ni,配备 NVIDIA GeForce RTX 3050 Ti Mobi 和内置 AMD 显卡。以下是可能有帮助的命令的结果。
~$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] (rev a1)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c5)
然后我从软件更新应用程序作为自定义安装的驱动程序. 使用专有 NVIDIA 驱动程序
~$ sudo apt install nvidia-driver-510
~$ reboot
和类似的命令(即 470 等),在测试所有命令之后,发生了同样的事情。
他们修复了笔记本电脑内置显示器无法识别的问题,但是没有一个可以识别我的外接显示器。此外,我尝试了 X.org 驱动程序。第一次启动时它就正常工作了,但是从那时起,我必须先启动到安全模式才能启动它。所以总而言之,我现在改回了,使用
~$ sudo ubuntu-drivers autoinstall
至 nvidia-driver-515。
无论如何,这里有一些可疑的事情:
nvidia-smi 抛出了这个错误。这让我相信加载图形驱动程序时出现了错误。
~$ 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.
这是我的 GPU-Manager 日志文件
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /run/u-d-c-nvidia-was-loaded file
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-515srv
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-515
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-510srv
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-510
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-470srv
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-470
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-450srv
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-418srv
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/kernel/nvidia-390
Looking for nvidia modules in /lib/modules/5.15.0-41-generic/updates/dkms
Found nvidia.ko module in /lib/modules/5.15.0-41-generic/updates/dkms/nvidia.ko
Looking for amdgpu modules in /lib/modules/5.15.0-41-generic/kernel
Looking for amdgpu modules in /lib/modules/5.15.0-41-generic/updates/dkms
Is nvidia loaded? no
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? no
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? yes
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
Vendor/Device Id: 1002:1638
BusID "PCI:6@0:0:0"
Is boot vga? yes
Vendor/Device Id: 10de:25a0
BusID "PCI:1@0:0:0"
Is boot vga? no
Error: can't access /sys/bus/pci/devices/0000:01:00.0/driver
The device is not bound to any driver.
Chassis type: "10"
Laptop detected
/etc/u-d-c-nvidia-runtimepm-override found. Will try runtimepm if the kernel supports it.
Linux 5.15 detected.
Is nvidia runtime pm supported for "0x25a0"? yes
Trying to create new file: /run/nvidia_runtimepm_supported
Checking power status in /proc/driver/nvidia/gpus/0000:01:00.0/power
Error while opening /proc/driver/nvidia/gpus/0000:01:00.0/power
Is nvidia runtime pm enabled for "0x25a0"? no
Error : Failed to open /dev/dri
Error : Failed to open /dev/dri
Error : Failed to open /dev/dri
Error : Failed to open /dev/dri
Does it require offloading? no
last cards number = 2
Has amd? yes
Has intel? no
Has nvidia? yes
How many cards? 2
Loading nvidia with "no" parameters
Has the system changed? No
can't access /run/u-d-c-nvidia-drm-was-loaded file
(#######################################################################################)
...
//There is like 100 lines of this error
...
(#######################################################################################)
can't access /run/u-d-c-nvidia-drm-was-loaded file
can't access /run/u-d-c-nvidia-drm-was-loaded file
Takes 10000ms to wait for nvidia udev rules completed.
AMD IGP detected
NVIDIA hybrid system
can't open /sys/module/nvidia/version
Creating /usr/share/X11/xorg.conf.d/11-nvidia-offload.conf
Removing /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
Setting power control to "auto" in /sys/bus/pci/devices/0000:01:00.0/power/control
Trying to create new file: /lib/modprobe.d/nvidia-runtimepm.conf
Loading nvidia with "no" parameters
我认为安装的驱动程序数量过多可能会导致未来的一些冲突。
~$ dpkg -l | grep nvidia
ii libnvidia-cfg1-515:amd64 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-515 515.48.07-0ubuntu0.22.04.2 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-470:amd64 470.129.06-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-510:amd64 510.73.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-515:amd64 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA libcompute package
ii libnvidia-compute-515:i386 515.48.07-0ubuntu0.22.04.2 i386 NVIDIA libcompute package
ii libnvidia-decode-515:amd64 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-515:i386 515.48.07-0ubuntu0.22.04.2 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-egl-wayland1:amd64 1:1.1.9-1.1 amd64 Wayland EGL External Platform library -- shared library
ii libnvidia-encode-515:amd64 515.48.07-0ubuntu0.22.04.2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-515:i386 515.48.07-0ubuntu0.22.04.2 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-515:amd64 515.48.07-0ubuntu0.22.04.2 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-515:amd64 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-515:amd64 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-515:i386 515.48.07-0ubuntu0.22.04.2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
rc linux-modules-nvidia-515-5.15.0-41-generic 5.15.0-41.44+1 amd64 Linux kernel nvidia modules for version 5.15.0-41
ii linux-objects-nvidia-515-5.15.0-41-generic 5.15.0-41.44+1 amd64 Linux kernel nvidia modules for version 5.15.0-41 (objects)
ii linux-signatures-nvidia-5.15.0-41-generic 5.15.0-41.44+1 amd64 Linux kernel signatures for nvidia modules for version 5.15.0-41-generic
rc nvidia-compute-utils-470 470.129.06-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-510 510.73.05-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
ii nvidia-compute-utils-515 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA compute utilities
rc nvidia-dkms-470 470.129.06-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-510 510.73.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
ii nvidia-dkms-515 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA DKMS package
ii nvidia-driver-515 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA driver metapackage
rc nvidia-kernel-common-470 470.129.06-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-510 510.73.05-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-common-515 515.48.07-0ubuntu0.22.04.2 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-515 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-515 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-515 515.48.07-0ubuntu0.22.04.2 amd64 NVIDIA binary Xorg driver
答案1
我有 ubuntu 22.04,当我将 nvidia 驱动程序从 480 更新到推荐的 515 时也发生了同样的事情(外部显示器没有信号)。
将内核升级到 5.19(而不是当前的 5.15)解决了我的问题。
要更新内核(大部分是从内核更新)
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19.3/amd64/linux-headers-5.19.3-051903-generic_5.19.3-051903.202208211442_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19.3/amd64/linux-headers-5.19.3-051903_5.19.3-051903.202208211442_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19.3/amd64/linux-image-unsigned-5.19.3-051903-generic_5.19.3-051903.202208211442_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19.3/amd64/linux-modules-5.19.3-051903-generic_5.19.3-051903.202208211442_amd64.deb
sudo dpkg -i *.deb
sudo reboot -n
此外我必须对内核进行签名,因为 Windows 具有安全启动的双启动功能,并且 repo 中的内核是不是已签名。确实按照此处的说明进行操作标志核
(这里最后一步有一个 bash 命令用于删除未签名的内核,但我看不懂。为了安全起见,我使用了普通命令rm
)。
马库斯·特维辛