21
17

More than 3 years have passed since last update.

Ubuntu 18.04にNVIDIAドライバを入れようとしてハマった(原因はUEFIセキュアブート)

Last updated at Posted at 2018-11-14

ハマったところ

nvidia-smiが失敗する。ドライバのインストールには成功しているはずなのに。

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.
$ dpkg -l | grep nvidia
ii  libnvidia-cfg1-390:amd64                   390.87-0ubuntu0~gpu18.04.1                  amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-390                       390.77-0ubuntu0.18.04.1                     all          Shared files used by the NVIDIA libraries
...
ii  nvidia-390                                 390.87-0ubuntu0~gpu18.04.1                  amd64        Transitional package for nvidia-driver-390
...

lsmodでも無反応。

$ lsmod | grep -i nvidia

加えて、無効にしておいたはずのnouveauが復活している。

環境

  • Ubuntu 18.04.1 LTS
    • kernel: 4.15.0-39-generic
  • GeForce GTX 1070

解決法

BIOS(UEFI)でセキュアブートを無効化する

:warning: Windowsとのデュアルブートの場合:Windowsが起動しなくなる可能性があるようなので、その他の解決法(署名なしドライバを読み込めるように設定を変える、など)を試してみてください。 -> 参考になる記事

  • BIOS(UEFI)画面を開く
    • 筆者の環境では起動時にF2DELキーを押す
  • Advanced Mode(F7)-> Boot -> Secure Boot -> OS Typeで、OS TypeをWindows UEFI modeからOther OSに変更する

  • 設定を保存して終了

これで解決しました。

原因

こちらの情報によると、Ubuntu kernel 4.4.0-20以降はUEFIセキュアブートが有効になっている場合に署名なしのドライバをロードしなくなったとのこと。

Since Ubuntu kernel 4.4.0-20 the EFI_SECURE_BOOT_SIG_ENFORCE kernel config has been enabled. That prevents from loading unsigned third party modules if UEFI Secure Boot is enabled.

The easiest way to fix this issue is to disable Secure Boot in UEFI (BIOS) settings.

参考

21
17
1

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
21
17