0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

LinuxMint21.3にnvidiaのドライバーを入れようとして詰まったときの解決方法

Posted at

久しぶりにPCを設定し直してドライバーを入れようとしたらすんなり入らず数時間ほど詰まったので備忘録を兼ねて。

検証環境

OS: LinuxMint21.3
GPU: NVIDIA GeForce RTX 3060

手順

Nouveau(デフォルトのオープンソースドライバ)の無効化

/etc/modprobe.d/blacklist-nouveau.confに以下を記述したファイルを作成

blacklist nouveau
options nouveau modeset=0

変更を適用して再起動

sudo update-initramfs -u
sudo reboot

ドライバアンインストール

余計なものが入ってたら消す

sudo apt-get purge nvidia* -y && sudo apt-get autoremove -y

ドライバインストール

リポジトリの追加と更新

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update -y
  • ドライバーマネージャーから入れる場合
    image.png
    ドライバを選択して「変更を適用」を押下するとインストールできる。
    インストール中にエラーが発生した場合はドライバをアンインストールして他のものを入れる。
    正常に入れられたら再起動する。

  • コンソールから入れる場合
    インストール可能なドライバを出力

    ubuntu-drivers devices
    

    出力された候補からドライバをインストールして再起動する

    sudo apt install nvidia-driver-XXX -y
    sudo reboot
    

確認

以下のコマンドでインストールできているかを確認する。

nvidia-smi

これでバージョンなどの情報が出力されたならインストールは完了。
ここまではよく見る手順だが、なぜかうまくいかずにドライバを消しては再インストールを繰り返して全滅してしまったので解決法を探ることに。

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver.と出たら…

grubに設定を追加する。
/etc/default/grubを編集してGRUB_CMDLINE_LINUX_DEFAULTに以下のように値を追記する。

GRUB_CMDLINE_LINUX_DEFAULT="pci=realloc=off"

※すでに設定されている値があったら半角スペースでつないで値を追記する。

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=realloc=off"

設定を反映させて再起動

sudo update-grub
sudo reboot

nvidia-smiで情報が出力されるようになってたら今度こそインストール完了。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?