Fedora 39 で dnf update --refresh を使用して NVIDIA ドライバーを更新しようとすると、多くのエラーが発生します。

Fedora 39 で dnf update --refresh を使用して NVIDIA ドライバーを更新しようとすると、多くのエラーが発生します。

それで、1、2 週間ほど前にカーネルをアップデートしようとしたところ、偶然にも 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 の Vector Addition サンプルを実行しようとしたところ、次のエラーが発生しました。

Failed to allocate device vector A (error code system has unsupported display driver / cuda driver combination)!

独自のベクトル出力 CUDA プログラムを実行しようとすると、0 が出力されるだけです。言うまでもなく、CUDA は動作していません。CUDA ツールキットをチェックし、再インストールもしたので、問題はないはずです。私の知る限り、この問題を解決するために何をすべきか、まったくわかっていないかもしれません。最終的な目標は、CUDA コードを再び動作させることです。

試したこと:

  • CUDA ツールキットの再インストール
  • sudo dnf 更新 --refresh
  • sudo dnf update --refresh --best --allowerasing
  • NVIDIAカーネルモジュールに署名する(どこだったかは覚えていないが、どこかで試してみるように言われたので、それに従った。このガイド
  • ドライバーを完全に再インストールする(このガイド
  • 古いカーネルに戻す (これはしばらくは機能しましたが、結局同じように機能しなくなりました。また、問題を解決できるのであれば、古いカーネルに固執したくないです)

これらはほとんど効果がなかった

答え1

オプション1


一部のパッケージに満たされていない依存関係がある場合、追加のオプションを指定して再度実行するまでアップグレードは続行されません--allowerasingこれは、更新されたリポジトリがまだ公開されていないサードパーティのリポジトリからインストールされたパッケージでよく発生します。出力を注意深く調べ、どのパッケージが削除されるかを調べてください。システムの機能に必須のパッケージはありませんが、生産性にとって重要なパッケージもあるかもしれません。

  • 依存関係が満たされていない場合は、コマンドラインに --best オプションを追加すると、詳細を確認できることがあります。
  • 再度実行する前に一部のパッケージを手動で削除/インストールする場合はdnf system-upgrade download、dnf コマンドライン オプションを使用してこれらの操作を実行することをお勧めします--setopt=keepcache=1。そうしないと、操作後にパッケージ キャッシュ全体が削除され、すべてのパッケージをもう一度ダウンロードする必要があります。

https://fedoraproject.org/wiki/DNF_system_upgrade

ソース

オプション2


sudo dnf クリーン dbcache

リポジトリ メタデータから生成されたキャッシュ ファイルを削除します。これにより、DNF は次回実行時にキャッシュ ファイルを再生成するようになります。sudo dnf clean expire-cache

リポジトリのメタデータを期限切れとしてマークします。DNF は、各リポジトリが次回使用されるときにキャッシュを再検証します。sudo dnf clean metadata

リポジトリ メタデータを削除します。これらは、DNF がパッケージのリモート可用性を判断するために使用するファイルです。このオプションを使用すると、DNF は次回実行時にすべてのメタデータをダウンロードします。

sudo dnf --refresh インストールnvidiaドライバー

ソース

関連情報