
大約一兩週前,我嘗試更新內核,但不知何故無意中破壞了我的 NVIDIA 驅動程式。每次啟動時我都會收到“NVIDIA 內核模組損壞。恢復到 nouveau”訊息或類似的內容。查了一下,多個消息來源告訴我 sudo dnf update --refresh,但這樣做給了我:
Problem 1: package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
- cannot install the best update candidate for package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 2: package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
- cannot install the best update candidate for package akmod-nvidia-3:535.129.03-1.fc39.x86_64
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 3: package nvidia-kmod-common-3:550.54.15-1.fc39.noarch from cuda-fedora39-x86_64 requires nvidia-kmod = 3:550.54.15, but none of the providers can be installed
- package nvidia-driver-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 requires nvidia-kmod-common = 3:550.54.15, but none of the providers can be installed
- package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64 from @System conflicts with kmod-nvidia-latest-dkms provided by kmod-nvidia-latest-dkms-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64
- cannot install the best update candidate for package xorg-x11-drv-nvidia-3:550.54.14-1.fc39.x86_64
- cannot install the best update candidate for package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64
- package kmod-nvidia-open-dkms-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
Problem 4: package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64 from @System requires xorg-x11-drv-nvidia(x86-64) = 3:550.54.14, but none of the providers can be installed
- package xorg-x11-drv-nvidia-3:550.54.14-1.fc39.x86_64 from @System requires nvidia-modprobe(x86-64) = 3:550.54.14, but none of the providers can be installed
- problem with installed package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
- cannot install both nvidia-modprobe-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-modprobe-3:550.54.14-1.fc39.x86_64 from @System
- cannot install both nvidia-modprobe-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-modprobe-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64
- package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
- package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
- cannot install the best update candidate for package nvidia-modprobe-3:550.54.14-1.fc39.x86_64
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 5: problem with installed package akmod-nvidia-3:535.129.03-1.fc39.x86_64
- package akmod-nvidia-3:535.129.03-1.fc39.x86_64 from @System requires xorg-x11-drv-nvidia-kmodsrc = 3:535.129.03, but none of the providers can be installed
- package akmod-nvidia-3:535.129.03-1.fc39.x86_64 from rpmfusion-nonfree requires xorg-x11-drv-nvidia-kmodsrc = 3:535.129.03, but none of the providers can be installed
- cannot install both xorg-x11-drv-nvidia-kmodsrc-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver and xorg-x11-drv-nvidia-kmodsrc-3:535.129.03-2.fc39.x86_64 from @System
- cannot install both xorg-x11-drv-nvidia-kmodsrc-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver and xorg-x11-drv-nvidia-kmodsrc-3:535.129.03-2.fc39.x86_64 from rpmfusion-nonfree
- package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
- package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
- cannot install the best update candidate for package xorg-x11-drv-nvidia-kmodsrc-3:535.129.03-2.fc39.x86_64
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 6: problem with installed package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64
- package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64 from @System requires nvidia-kmod-common = 3:550.54.14, but none of the providers can be installed
- package kmod-nvidia-open-dkms-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64 requires nvidia-kmod-common = 3:550.54.14, but none of the providers can be installed
- package nvidia-kmod-common-3:550.54.14-1.fc39.noarch from cuda-fedora39-x86_64 requires nvidia-driver = 3:550.54.14, but none of the providers can be installed
- cannot install both nvidia-driver-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-driver-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64
- package xorg-x11-drv-nvidia-3:550.54.14-1.fc39.x86_64 from @System requires nvidia-settings(x86-64) = 3:550.54.14, but none of the providers can be installed
- package nvidia-settings-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 requires nvidia-driver(x86-64) = 3:550.54.15, but none of the providers can be installed
- cannot install both nvidia-settings-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-settings-3:550.54.14-1.fc39.x86_64 from @System
- cannot install both nvidia-settings-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-settings-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64
- cannot install the best update candidate for package nvidia-settings-3:550.54.14-1.fc39.x86_64
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
kmod-nvidia-latest-dkms x86_64 3:550.54.15-1.fc39 cuda-fedora39-x86_64 40 M
nvidia-driver x86_64 3:550.54.14-1.fc39 cuda-fedora39-x86_64 126 M
nvidia-driver x86_64 3:550.54.15-1.fc39 cuda-fedora39-x86_64 126 M
nvidia-modprobe x86_64 3:550.54.15-1.fc39 cuda-fedora39-x86_64 30 k
nvidia-settings x86_64 3:550.54.15-1.fc39 cuda-fedora39-x86_64 822 k
xorg-x11-drv-nvidia-kmodsrc x86_64 3:550.67-1.fc39 rpmfusion-nonfree-nvidia-driver 44 M
Skipping packages with broken dependencies:
akmod-nvidia x86_64 3:550.67-1.fc39 rpmfusion-nonfree-updates 40 k
nvidia-kmod-common noarch 3:550.54.14-1.fc39 cuda-fedora39-x86_64 12 k
nvidia-kmod-common noarch 3:550.54.15-1.fc39 cuda-fedora39-x86_64 12 k
xorg-x11-drv-nvidia-power x86_64 3:550.67-1.fc39 rpmfusion-nonfree-nvidia-driver 103 k
Transaction Summary
==============================================================================================================================================================================================================
Skip 10 Packages
Nothing to do.
Complete!
按照它所說的去做並嘗試添加 --best --allowerasing
Problem 1: cannot install the best update candidate for package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
- problem with installed package xorg-x11-drv-nvidia-power-3:550.54.14-1.fc39.x86_64
- package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
- package xorg-x11-drv-nvidia-power-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:550.67, but none of the providers can be installed
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 2: problem with installed package akmod-nvidia-3:535.129.03-1.fc39.x86_64
- cannot install the best update candidate for package akmod-nvidia-3:535.129.03-1.fc39.x86_64
- package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
- package akmod-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:550.67, but none of the providers can be installed
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-nvidia-driver is filtered out by modular filtering
- package xorg-x11-drv-nvidia-3:550.67-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages)
做這一切是因為自從核心崩潰後,我就無法運行任何 CUDA 程式碼。我嘗試運行 NVIDIA 的向量加法範例並收到此錯誤:
Failed to allocate device vector A (error code system has unsupported display driver / cuda driver combination)!
如果我嘗試運行我自己的向量輸出 CUDA 程序,它只會輸出 0。我檢查了我的 CUDA 工具包,甚至重新安裝了它,所以應該沒問題。據我所知,我可能根本不知道應該採取什麼措施來解決這個問題。最終目標是讓我的 CUDA 程式碼再次運行。
我嘗試過的事情:
- 重新安裝 CUDA 工具包
- 須藤 dnf 更新 --刷新
- sudo dnf update --refresh --best --allowerasing
- 簽署NVIDIA核心模組(不記得在哪裡,但有地方說可以嘗試一下,我跟著本指南)
- 完全重新安裝驅動程式(透過本指南)
- 恢復到較舊的內核(這工作了一段時間,但最終也以同樣的方式崩潰了,而且如果我能解決這個問題,我寧願不被困在較舊的內核上)
幾乎所有這些都沒有效果
答案1
選項1
如果您的某些軟體包具有不滿足的依賴性,則升級將拒絕繼續,直到您使用額外
--allowerasing
選項再次運行它。從第三方儲存庫安裝的軟體包經常會發生這種情況,而這些第三方儲存庫的更新儲存庫尚未發布。請仔細研究輸出並檢查哪些軟體包將被刪除。它們對於系統功能來說都不是必需的,但其中一些可能對您的工作效率很重要。
- 如果依賴關係不滿足,如果在命令列中新增 --best 選項,有時可以看到更多詳細資訊。
- 如果您想在
dnf system-upgrade download
再次運行之前手動刪除/安裝某些軟體包,建議使用--setopt=keepcache=1
dnf 命令列選項執行這些操作。否則,操作後整個套件快取將被刪除,您需要再次下載所有套件。
https://fedoraproject.org/wiki/DNF_system_upgrade
選項2
sudo dnf 清理資料庫緩存
刪除從儲存庫元資料產生的快取檔案。這會強制 DNF 在下次執行時重新產生快取檔案。 sudo dnf clean 過期緩存
將儲存庫元資料標記為已過期。 DNF 將在下次使用每個儲存庫時重新驗證快取。 sudo dnf 清理元數據
刪除儲存庫元資料。這些是 DNF 用於確定軟體包的遠端可用性的檔案。使用此選項將使 DNF 在下次執行時下載所有元資料。
sudo dnf --刷新安裝英偉達驅動程式