LoginSignup
7

More than 5 years have passed since last update.

Ubuntu17.10にNVIDIAドライバをインストールしてみた。

Last updated at Posted at 2018-11-16

素人のメモです。

1. 環境

    ・Ubuntu : 17.10
    ・グラフィックボード : GeForce GTX 1080
    ・ドライバ : NVIDIA-Linux-x86_64-410.73.run

2. NVIDIAドライバのインストール方法

以下のコマンドはドライバがインストールされていない場合は何も表示されません。
メモ程度に残しておきます。

GPUの種類の確認

~$ lspci | grep -i nvidia

NVIDIA driver version の確認

~$ cat /proc/driver/nvidia/version

GPUサマリ

~$ nvidia-smi

1 . ドライバのインストール

以下のサイトからダウンロードしてください。
ダウンロードページ

私の場合だと、NVIDIA-Linux-x86_64-410.73.runになります。

2. コンソールモードに入る

Ctrl + Alt + F1

F1を押しても入れない場合は、F2~F5あたりで試してみてください。

3. ユーザー名、パスワードを入力しログインする

以下のコマンドを入力し、実行権限を付加する

~$ sudo chmod 755 NVIDIA-Linux-x86_64-410.73.run

4. GUIサービスの停止

~$ sudo /etc/init.d/gdm3 stop

ちなみにGUIサービスの再開は stop -> startに置き換えてください。

5. ドライバの実行

$ sudo ./NVIDIA-Linux-x86_64-410.73.run 

これで実行できるはずだが、上手くいきませんでした。

そこで

ERROR: You appear to be running an X server; please exit X before          installing.  For further details, please see the section INSTALLING THE NVIDIA DRIVER in the README available on the Linux driver download page at www.nvidia.com.

のようなエラーが発生しました。
X server が動いているからインストールできないと。

対処法としては、

~$ ps ax | grep gdm

をタイプし、プロセスを停止させてください。

~$ sudo kill <PID>

これでできると思いましたが新たなエラーが...

ERROR: The Nouveau kernel driver is currently in use by your system.  This
         driver is incompatible with the NVIDIA driver, and must be disabled
         before proceeding.  Please consult the NVIDIA driver README and your
         Linux distribution's documentation for details on how to correctly
         disable the Nouveau kernel driver.

既存のドライバが入っているようなので、削除します。

こちらの対処法は、
/etc/modprobe.d/blacklist-nouveau.conf
に以下の内容を記載してください。

blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0

書き込んだら

~$ sudo update-initramfs -u
~$ sudo reboot

を実行してみてください。

インストール途中で

 error: Unable to find the development tool gcc in your path;. . .  
 error: Unable to find the development tool make in your path; . . .

のようなエラーが出てきますが

~$ sudo apt install gcc
~$ sudo apt install make

を実行させれば問題ないです。

これで上手くインストールできると思います。

これとは別にCUDAとcuDNNのインストールも後ほどアップロードしたいと思います。

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
7