ubuntu 22.04 上 nvidia 驱动程序 535 的问题

ubuntu 22.04 上 nvidia 驱动程序 535 的问题

最近我遇到了 NVidia 的问题。我不知道为什么它没有完全更新并返回错误。这是我的控制台日志。

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nvidia-dkms-535 (535.154.05-0ubuntu0.22.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Removing old nvidia-535.154.05 DKMS files...
Deleting module nvidia-535.154.05 completely from the DKMS tree.
Loading new nvidia-535.154.05 DKMS files...
Building for 6.5.0-14-generic
Building for architecture x86_64
Building initial module for 6.5.0-14-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel-source-535.0.crash'
Error! Bad return status for module build on kernel: 6.5.0-14-generic (x86_64)
Consult /var/lib/dkms/nvidia/535.154.05/build/make.log for more information.
dpkg: error processing package nvidia-dkms-535 (--configure):
 installed nvidia-dkms-535 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-535:
 nvidia-driver-535 depends on nvidia-dkms-535 (<= 535.154.05-1); however:
  Package nvidia-dkms-535 is not configured yet.
 nvidia-driver-535 depends on nvidia-dkms-535 (>= 535.154.05); however:
  Package nvidia-dkms-535 is not configured yet.

dpkg: error processing package nvidia-driver-535 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for initramfs-tools (0.140ubuntu13.4) ...
update-initramfs: Generating /boot/initrd.img-6.5.0-14-generic
I: The initramfs will attempt to resume from /dev/sda9
I: (UUID=7eaa7918-b4c0-43cf-b6b3-2f0a0fbcf343)
I: Set the RESUME variable to override this.
Errors were encountered while processing:
 nvidia-dkms-535
 nvidia-driver-535
E: Sub-process /usr/bin/dpkg returned an error code (1)

我应该怎么办?以前没有这样的更新问题。

答案1

构建 nvidia 驱动程序和内核 6.5 时出现一个普遍问题(2 周前出现),而切换到 6.2 则没问题。唯一的解决方案是恢复到较旧的 6.2 内核(恢复 6.5 更新)。 https://forums.developer.nvidia.com/t/ubuntu-22-04-no-display-after-nvidia-driver-installed/278855 我也遇到同样的问题,等待官方修复。

答案2

请尝试此补丁。

来自 git 另存为

/usr/src/nvidia-535.154.05/patches/buildfix_kernel_6.5.patch

然后

sudo dpkg-reconfigure nvidia-dkms-535 

这使我能够针对 kerneltree-6.5 构建 nvidia

nvidia/535.154.05, 5.15.0-92-generic, x86_64: installed
nvidia/535.154.05, 6.5.0-15-generic, x86_64: installed
virtualbox/6.1.48, 5.15.0-92-generic, x86_64: installed
virtualbox/6.1.48, 6.5.0-15-generic, x86_64: installed

相关内容