安装 NVIDIA 驱动程序后,Ubuntu 22.04 上出现启动相关问题

安装 NVIDIA 驱动程序后,Ubuntu 22.04 上出现启动相关问题

每次我在 Ubuntu 22.04 上安装 NVIDIA 驱动程序时,都会出现与启动相关的问题,因此,主要的问题是每次我启动时,Ubuntu 都会

(1)启动正常(25% 的时间)

(2)开机时间较长(约2分钟)(占50%的时间)

(3)启动失败(25% 的情况)

当我卸载 NVIDIA 驱动程序时,这种症状消失,所以我很确定它与 NVIDIA 驱动程序有关,但我不知道如何修复它。

对于情况 (2)(启动时间较长),黑屏

'/dev/nvme0n1p6: clean, *** files, *** blocks'

挂很长时间。

这是 systemd-analyze blame 结果

$ systemd-analyze blame
1min 36.254s plymouth-quit-wait.service
1min 32.413s gpu-manager.service
      6.546s NetworkManager-wait-online.service
      1.002s snapd.service
       679ms accounts-daemon.service
       672ms e2scrub_reap.service
       475ms fwupd.service
       397ms dev-nvme0n1p6.device
       351ms snapd.seeded.service
       309ms systemd-oomd.service
       308ms systemd-resolved.service
       275ms systemd-timesyncd.service
       261ms networkd-dispatcher.service
       217ms dev-loop2.device
       217ms dev-loop1.device
       216ms dev-loop3.device
       216ms dev-loop4.device
       213ms dev-loop6.device
       213ms dev-loop5.device
       211ms dev-loop0.device
       211ms dev-loop7.device
       172ms systemd-udev-trigger.service
       144ms upower.service

对于情况 (3)(启动失败),黑屏

'iwlwifi : invalid buffer destination'
'ACPI BIOS Error (bug): could not resolve symbol [\_TZ.ETMD], AE NOT_FOUND'
'ACPI Error: Aborting method \_SB.IETM._OSC due to previos error (AE_NOT_FOUND)'
'Bluetooth: hci0: Malformed MSFT vendor event: 0x02'
'INFO: task plymouthd: *** blocked for more than *** seconds'
'"echo 0 > /prc/sys/kernel/hung_task_timeout_secs" disables this message'
'INFO: task gpu-manager: *** blocked for more than *** seconds' 
'"echo 0 > /prc/sys/kernel/hung_task_timeout_secs" disables this message'

出现此屏幕但无法启动,或者出现黑屏并显示光标但无法启动。这种情况随机发生,确实令人沮丧,我想解决这个问题。我尝试了各种方法,但都没有成功。以下是我尝试过的一些方法

  • 使用“purge、autoremove、apt install”删除并重新安装 NVIDIA 驱动程序
  • 安装不同的驱动程序版本(525、535、545)
  • 尝试启动修复程序
  • 通过修改 /etc/modprobe.d/blacklist.conf 禁用 nouveau
  • 通过修改 /etc/default/grub 进行‘nomodeset’(使情况变得更糟...所有启动都失败....)
  • 尝试了各种内核版本和各种 Ubuntu 版本(我的笔记本电脑是新设备,所以 20.04 在触摸板、wifi 等方面存在问题,因此我主要尝试了 22.04)

然而,它们似乎都无法解决我面临的问题。它不时出现不同的症状,但大多数都与启动有关。我正在使用 Windows 的双启动

我有点迷茫,请帮忙。以下是一些有用的规范

笔记本电脑:联想 Legion Pro 7 16irx8h

$ uname -a
Linux alvin-Legion-Pro-7-16IRX8H 6.5.0-21-generic 
#21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb  9 13:32:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ lspci
00:00.0 Host bridge: Intel Corporation Device a702 (rev 01)
00:01.0 PCI bridge: Intel Corporation Device a70d (rev 01)
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S UHD Graphics (rev 04)
00:04.0 Signal processing controller: Intel Corporation Raptor Lake Dynamic Platform and Thermal Framework Processor Participant (rev 01)
00:06.0 PCI bridge: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Raptor Lake Crashlog and Telemetry (rev 01)
00:14.0 USB controller: Intel Corporation Raptor Lake USB 3.2 Gen 2x2 (20 Gb/s) XHCI Host Controller (rev 11)
00:14.2 RAM memory: Intel Corporation Raptor Lake-S PCH Shared SRAM (rev 11)
00:14.3 Network controller: Intel Corporation Raptor Lake-S PCH CNVi WiFi (rev 11)
00:15.0 Serial bus controller: Intel Corporation Raptor Lake Serial IO I2C Host Controller #0 (rev 11)
00:15.1 Serial bus controller: Intel Corporation Raptor Lake Serial IO I2C Host Controller #1 (rev 11)
00:15.2 Serial bus controller: Intel Corporation Raptor Lake Serial IO I2C Host Controller #2 (rev 11)
00:16.0 Communication controller: Intel Corporation Raptor Lake CSME HECI #1 (rev 11)
00:19.0 Serial bus controller: Intel Corporation Device 7a7c (rev 11)
00:19.1 Serial bus controller: Intel Corporation Device 7a7d (rev 11)
00:1a.0 PCI bridge: Intel Corporation Raptor Lake PCI Express Root Port #25 (rev 11)
00:1b.0 PCI bridge: Intel Corporation Raptor Lake PCI Express Root Port #17 (rev 11)
00:1b.5 PCI bridge: Intel Corporation Device 7a45 (rev 11)
00:1d.0 PCI bridge: Intel Corporation Raptor Lake PCI Express Root Port #9 (rev 11)
00:1f.0 ISA bridge: Intel Corporation Device 7a0c (rev 11)
00:1f.3 Audio device: Intel Corporation Raptor Lake High Definition Audio Controller (rev 11)
00:1f.4 SMBus: Intel Corporation Raptor Lake-S PCH SMBus Controller (rev 11)
00:1f.5 Serial bus controller: Intel Corporation Raptor Lake SPI (flash) Controller (rev 11)
01:00.0 VGA compatible controller: NVIDIA Corporation AD104M [GeForce RTX 4080 Max-Q / Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 22bc (rev a1)
06:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO
07:00.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
08:00.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
08:01.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
08:02.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
08:03.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
09:00.0 USB controller: Intel Corporation Device 1134
3d:00.0 USB controller: Intel Corporation Device 1135
76:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15)

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000027E0sv000017AAsd00003B64bc03sc00i00
vendor   : NVIDIA Corporation
driver   : nvidia-driver-535-open - distro non-free
driver   : nvidia-driver-525 - distro non-free recommended
driver   : nvidia-driver-535-server-open - distro non-free
driver   : nvidia-driver-545 - distro non-free
driver   : nvidia-driver-525-open - distro non-free
driver   : nvidia-driver-545-open - distro non-free
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-525-server - distro non-free
driver   : nvidia-driver-535 - third-party non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

$ nvidia-smi
Mon Feb 26 12:51:30 2024       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05   Driver Version: 525.147.05   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   39C    P3    N/A /  80W |      6MiB / 12282MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2048      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

我是一个新手,如果您建议我应该使用命令行代码尝试一些操作,那就太好了。

提前谢谢你的帮助!

相关内容