[問題與解決辦法] NVIDIA驅動安裝與切換版本的問題及解法 [論壇 - Ubuntu硬體支援---顯示卡專區]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



[問題與解決辦法] NVIDIA驅動安裝與切換版本的問題及解法
會員三級
註冊日期:
2012/4/26 9:45
所屬群組:
已註冊使用者
等級: 11
HP : 0 / 271
MP : 54 / 8272
EXP: 86
離線
user@computer:~$ sudo apt install nvidia-driver-495
正在讀取套件清單... 完成
...(安裝過程略過)
正在準備解包 .../19-nvidia-driver-495_495.46-0ubuntu0.20.04.1_amd64.deb……
解開 nvidia-driver-495 (495.46-0ubuntu0.20.04.1) 中...
設定 nvidia-kernel-source-495 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-fbc1-495:amd64 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-fbc1-495:i386 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-common-495 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-compute-495:amd64 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-compute-495:i386 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-gl-495:amd64 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-gl-495:i386 (495.46-0ubuntu0.20.04.1) ...
設定 nvidia-kernel-common-495 (495.46-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
設定 libnvidia-cfg1-495:amd64 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-extra-495:amd64 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-decode-495:amd64 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-decode-495:i386 (495.46-0ubuntu0.20.04.1) ...
設定 nvidia-utils-495 (495.46-0ubuntu0.20.04.1) ...
設定 nvidia-dkms-495 (495.46-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Loading new nvidia-495.46 DKMS files...
Building for 5.13.0-27-generic
Building for architecture x86_64
Building initial module for 5.13.0-27-generic
Error! Bad return status for module build on kernel: 5.13.0-27-generic (x86_64)
Consult /var/lib/dkms/nvidia/495.46/build/make.log for more information.
dpkg: error processing package nvidia-dkms-495 (--configure):
installed nvidia-dkms-495 package post-installation script 子進程傳回了 10 錯誤退出狀態碼
設定 nvidia-compute-utils-495 (495.46-0ubuntu0.20.04.1) ...
警告:所指定的家目錄(/nonexistent)無法存取:No such file or directory
增加系統使用者 `nvidia-persistenced' (UID 126) ...
增加新群組 `nvidia-persistenced' (GID 133) ...
正在新增新使用者 `nvidia-persistenced' (UID 126) 到群組 `nvidia-persistenced' ...
不會建立家目錄 `/nonexistent' 。
設定 libnvidia-encode-495:amd64 (495.46-0ubuntu0.20.04.1) ...
設定 libnvidia-encode-495:i386 (495.46-0ubuntu0.20.04.1) ...
設定 xserver-xorg-video-nvidia-495 (495.46-0ubuntu0.20.04.1) ...
dpkg: 因相依問題,無法設定 nvidia-driver-495:
nvidia-driver-495 相依於 nvidia-dkms-495 (<= 495.46-1)﹔然而:
nvidia-dkms-495 套件尚未設定。
nvidia-driver-495 相依於 nvidia-dkms-495 (>= 495.46)﹔然而:
nvidia-dkms-495 套件尚未設定。

dpkg: error processing package nvidia-driver-495 (--configure):
相依問題 - 保留未設定
No apport report written because the error message indicates its a followup error from a previous failure.
執行 libc-bin (2.31-0ubuntu9.2) 的觸發程式……
執行 man-db (2.9.1-1) 的觸發程式……
執行 initramfs-tools (0.136ubuntu6.6) 的觸發程式……
update-initramfs: Generating /boot/initrd.img-5.13.0-27-generic
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/cl-swap)
I: Set the RESUME variable to override this.
處理時發生錯誤:
nvidia-dkms-495
nvidia-driver-495
E: Sub-process /usr/bin/dpkg returned an error code (1)

[查看驅動的編譯日誌]
user@computer:~$ sudo nano /var/lib/dkms/nvidia/470.86/build/make.log
user@computer:~$ sudo nano /var/lib/dkms/nvidia/495.46/build/make.log

[發現裡面有這段錯誤訊息]
ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it.

[上網查解決辦法,查到可能的解決辦法是移除所有舊有沒有在使用的核心]
結果狀況依舊

[查到重新安裝核心]
user@computer:~$ sudo apt install --reinstall linux-headers-$(uname -r)
正在讀取套件清單... 完成
正在重建相依關係
正在讀取狀態資料... 完成
升級 0 個,新安裝 0 個,重新安裝 1 個,移除 0 個,有 0 個未被升級。
2 個沒有完整得安裝或移除。
需要下載 2,532 kB 的套件檔。
此操作完成之後,會多佔用 0 B 的磁碟空間。
下載:1 http://tw.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-headers-5.13.0-27-generic amd64 5.13.0-27.29~20.04.1 [2,532 kB]
取得 2,532 kB 用了 1s (2,283 kB/s)
(讀取資料庫 ... 目前共安裝了 260452 個檔案和目錄。)
正在準備解包 .../linux-headers-5.13.0-27-generic_5.13.0-27.29~20.04.1_amd64.deb……
Unpacking linux-headers-5.13.0-27-generic (5.13.0-27.29~20.04.1) over (5.13.0-27.29~20.04.1) ...
設定 nvidia-dkms-495 (495.46-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Removing old nvidia-495.46 DKMS files...

------------------------------
Deleting module version: 495.46
completely from the DKMS tree.
------------------------------
Done.
Loading new nvidia-495.46 DKMS files...
Building for 5.13.0-27-generic
Building for architecture x86_64
Building initial module for 5.13.0-27-generic
Secure Boot not enabled on this system.
Done.

nvidia.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.13.0-27-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.13.0-27-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.13.0-27-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.13.0-27-generic/updates/dkms/

nvidia-peermem.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.13.0-27-generic/updates/dkms/

depmod....

DKMS: install completed.
設定 linux-headers-5.13.0-27-generic (5.13.0-27.29~20.04.1) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 5.13.0-27-generic
...done.
設定 nvidia-driver-495 (495.46-0ubuntu0.20.04.1) ...
執行 initramfs-tools (0.136ubuntu6.6) 的觸發程式……
update-initramfs: Generating /boot/initrd.img-5.13.0-27-generic
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/cl-swap)
I: Set the RESUME variable to override this.
user@computer:~$

[問題看起來已經消失了]

因為不管是從 470 切換到 490,還是從 490 切換到 470,狀況都是一樣的,所以就不特別在主題標上驅動版號了。

1/29 10:01:43
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.