Debian 12 Bookworm LinuxにNvidiaドライバーをインストールする方法
この記事では、標準のDebianリポジトリからDebian 12「Bookworm」にNvidiaドライバーをインストールする方法を学びます。何らかの理由で標準のDebianリポジトリからNvidiaドライバーのインストールが失敗した場合や、より最新のNvidiaドライバーを希望する場合、このチュートリアルではNvidia.comの公式サイトから直接Nvidiaドライバーをインストールする方法も案内します。
他のLinuxディストリビューションにNvidiaドライバーをインストールするには、Nvidia Linux Driverガイドに従ってください。
このチュートリアルでは学びます:
- NVIDIAカードのモデル番号を検出する方法
- 標準のDebianリポジトリからNvidiaドライバーをインストールする方法
- 公式のNvidiaパッケージからNvidiaドライバーをインストールする方法
- nouveauドライバーを無効にする方法
- Nvidiaドライバーの前提条件をインストールする方法
ソフトウェア要件および使用される規約
Debianリポジトリを使用してNVIDIAドライバーをインストールする手順
non-freeおよびcontribリポジトリを有効にします。管理者ユーザーとして&47;etc&47;apt&47;sources.listを開き、non-freeリポジトリを追加します。例えば、リポジトリ定義を変更します:FROM: deb http://ftp.au.debian.org/debian/ buster main TO: deb-src http://ftp.au.debian.org/debian/ buster main non-free contrib準備ができたら、以下のコマンドを使用してリポジトリのインデックスファイルを更新します。
apt update-
以下のコマンドを実行して
nvidia-detect</code>ユーティリティをインストールしてください:apt -y install nvidia-detect
Nvidiaカードのモデルと推奨ドライバーを検出します。そのためには、上記にインストールした
nvidia-detect</code>コマンドを実行します。例えば:nvidia-detect Detected NVIDIA GPUs: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA102 [GeForce RTX 3080] [10de:2206] (rev a1) Checking card: NVIDIA Corporation GA102 [GeForce RTX 3080] (rev a1) Your card is supported by all driver versions. Your card is also supported by the Tesla drivers series. Your card is also supported by the Tesla 470 drivers series. It is recommended to install the nvidia-driver package.前のステップで推奨されたドライバーをインストールしてください:
apt install nvidia-driverすべて完了しました。Debian 12 Bookworm Linuxボックスを再起動してください:
systemctl reboot
公式のnvidia.comパッケージを使用してNVIDIAドライバーをインストールする手順
公式のNvidia.comウェブサイトから推奨されるNvidiaソースパッケージをダウンロードします。前のステップで推奨されたドライバ番号に一致するパッケージ名を検索してください。
ls NVIDIA-Linux-x86_64-535.104.05.run NVIDIA-Linux-x86_64-535.104.05.runNvidiaドライバのコンパイルの前提条件をインストールします:
apt -y install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config次に、デフォルトの
nouveauドライバーを無効にします:echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf update-initramfs -uマルチユーザーランレベルに再起動します。これにより、再起動後にGUIユーザーが無効になります。
systemctl set-default multi-user.target systemctl rebootターミナルまたはTTYを介してルートユーザーとしてログインし、以下のコマンドを実行してNvidiaドライバをインストールします:注意</b>
ダウンロードしたドライバのバージョンによって、以下のコマンドは異なる場合があります。以前にダウンロードしたドライバファイル名に合わせて以下のコマンドを修正してください。bash NVIDIA-Linux-x86_64-535.104.05.runインストール中に、次の一連の質問をされることがあります。
The CC version check failed: The kernel was built with gcc version 8.2.0 (Debian 8.2.0-14), but the current compiler version is cc (Debian 8.3.0-2) 8.3.0. This may lead to subtle problems; if you are not certain whether the mismatched compiler will be compatible with your kernel, you may wish to abort installation, set the CC environment variable to the name of the compiler used to compile your kernel, and restart installation. Ignore CC version check Abort installation Install NVIDIA's 32-bit compatibility libraries? Yes No An incomplete installation of libglvnd was found. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries. Don't install libglvnd files Install and overwrite existing filesort installation. Abort installation. Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. Yes NoシステムをGUIで起動できるようにする:
systemctl set-default graphical.targetすべて完了しました。Debian 12 Bookworm Linuxボックスを再起動してください:
systemctl reboot
結論
この記事では、Debian 12 "Bookworm" にNvidiaグラフィックドライバーを正常にインストールするための包括的なステップを説明しました。標準のDebianリポジトリを選択するか、Nvidiaの公式ウェブサイトからの手動インストールを選んだかに関わらず、現在お使いのシステムには機能するNvidiaグラフィックドライバーがインストールされているはずです。グラフィックドライバーが最新であることを確認することで、Debianシステムの性能と安定性を向上させています。最適なコンピューティング体験を維持するために、定期的にドライバーの更新を確認することを忘れないでください。

