web-dev-qa-db-ja.com

Lubuntu 16.04 / 18.04へのNvidiaドライバー304.317のインストールに失敗しました

私はこの投稿に従ってNvidiaドライバー304.317をインストールしようとしました: buntu 18.04にNvidiaドライバーをインストールできません

インストール中に、いくつかのエラーが発生しました:

エラーメッセージ1:

ERROR: Failed to run '/usr/sbin/dkms build -m nvidia -v 304.137 -k 5.0.0-23-generic':
Kernel preparation unnecessary for this kernel. Skipping ...
Building module:
cleaning build area...
make -j2 KERNELRELEASE=5.0.0-23-generic module SYSSRC=/lib/modules/5.0.0-23-generic/build...................(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 304.137 not found
Error! Bad return status for module build on kernel: 5.0.0-23-generic (i686)
Consult /var/lib/dkms/nvidia/304.137/build/make.log for more information.

エラーメッセージ2:

ERROR: Failed to install the kernel module through DKMS.
No kernel module was installed: please try to installing again without DKMS, or check the DKMS logs for more information.

エラーメッセージ3:

ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log for details.
You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

nvidia-installer.log

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sat Aug 10 21:13:58 2019
installer version: 304.137

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

nvidia-installer command line:
    ./nvidia-installer

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 304.137.
-> Running distribution scripts
   executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed!  Continue installation anyway? (Answer: Yes)
-> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: Yes)
-> Installing both new and classic TLS OpenGL libraries.
-> Searching for conflicting X files:
-> done.
-> Searching for conflicting OpenGL files:
-> done.
-> Installing 'NVIDIA Accelerated Graphics Driver for Linux-x86' (304.137):
   executing: '/sbin/ldconfig'...
   executing: '/sbin/depmod -aq'...
   depmod: WARNING: Ignored deprecated option -q
-> done.
-> Driver file installation is complete.
-> Installing DKMS kernel module:
ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 304.137 -k 5.0.0-23-generic`: 
Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j2 KERNELRELEASE=5.0.0-23-generic module SYSSRC=/lib/modules/5.0.0-23-generic/build...................(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 304.137 not found
Error! Bad return status for module build on kernel: 5.0.0-23-generic (i686)
Consult /var/lib/dkms/nvidia/304.137/build/make.log for more information.
-> error.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

make.log

DKMS make.log for nvidia-304.137 for kernel 5.0.0-23-generic (i686)
Sa 10. Aug 21:14:49 CEST 2019
NVIDIA: calling KBUILD...
Makefile:223: ================= WARNING ================
Makefile:224: 'SUBDIRS' will be removed after Linux 5.3
Makefile:225: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:226: ==========================================
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                           \
echo >&2 "  ERROR: Kernel configuration is invalid.";       \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo >&2 ;                          \
/bin/false)
mkdir -p /var/lib/dkms/nvidia/304.137/build/.tmp_versions ; rm -f /var/lib/dkms/nvidia/304.137/build/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/304.137/build
(cat /dev/null;   echo kernel//var/lib/dkms/nvidia/304.137/build/nvidia.ko;) > /var/lib/dkms/nvidia/304.137/build/modules.order
[several compiler calls]
  cc -Wp,-MD,/var/lib/dkms/nvidia/304.137/build/.os-interface.o.d  -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/7/include  -I./Arch/x86/include -I./Arch/x86/include/generated  -I./include -I./Arch/x86/include/uapi -I./Arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include  -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror-implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -I/var/lib/dkms/nvidia/304.137/build -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"304.137\" -Wno-unused-function -Wuninitialized -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -DKBUILD_BASENAME='"os_interface"' -DKBUILD_MODNAME='"nvidia"' -c -o /var/lib/dkms/nvidia/304.137/build/os-interface.o /var/lib/dkms/nvidia/304.137/build/os-interface.c
[several compiler warnings -Wsign-compare]
/var/lib/dkms/nvidia/304.137/build/os-interface.c: In function ‘os_get_current_time’:
/var/lib/dkms/nvidia/304.137/build/os-interface.c:667:5: error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘efi_gettimeofday’? [-Werror=implicit-function-declaration]
     do_gettimeofday(&tm);
     ^~~~~~~~~~~~~~~
     efi_gettimeofday
[several compiler calls]
Makefile:1606: recipe for target '_module_/var/lib/dkms/nvidia/304.137/build' failed
make[2]: *** [_module_/var/lib/dkms/nvidia/304.137/build] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:262: recipe for target 'module' failed
make[1]: *** [module] Error 1
makefile:59: recipe for target 'module' failed
make: *** [module] Error 2

Dkmsなしでドライバをインストールしようとしましたが、同じ問題がありました。 nvidiaのreadmeは私を助けてくれませんでした。助言がありますか?

編集:

16.04(HDDがクラッシュする前にインストールしたもの)をセットアップしましたが、同じ問題があります。 ubuntu-dirivers autoinstallapt-get install nvidia-304を使用してインストールするか、完全に手動でインストールするかは関係ありません。以前のバージョン304.135(実際は304.137)をインストールしようとした場合も同様です。 HDDがクラッシュする前に、バージョン304.134がありましたが(304.135がいくつかの問題を引き起こしたため)、このバージョンはリポジトリに存在しないようです。 nouveauドライバーは(16.04と18.04で)2番目の画面でも正常に動作しますが、パフォーマンスは悲惨です。

更新

Lubuntuバージョン(16.04と18.04)と異なるnvidia-304バージョンの両方でいくつかのテストと試行を行った後、問題は使用されているコンパイラバージョンであるはずだと思います。 -5.0、18.04はgcc-7.4を使用します。努力のせいでプロプライエタリドライバーのインストールをあきらめました。
私の調査中、私はnouveauドライバーがシステムにインストールされたことがないことを認識しました。 ubuntu-drivers autoinstallはnouveauドライバーをインストールしません。 apt-get install xserver-xorg-video-nouveauを使用して手動で(18.04に)インストールしたところ、次のパッケージが削除され、インストール後にシステムが壊れました。

lubuntu-desktop lubuntu-gtk-core lubuntu-gtk-desktop
xserver-xorg-core-hwe-18.04 xserver-xorg-input-all-hwe-18.04
xserver-xorg-input-libinput-hwe-18.04 xserver-xorg-input-synaptics-hwe-18.04
xserver-xorg-video-all-hwe-18.04 xserver-xorg-video-amdgpu-hwe-18.04
xserver-xorg-video-ATI-hwe-18.04 xserver-xorg-video-fbdev-hwe-18.04
xserver-xorg-video-intel-hwe-18.04 xserver-xorg-video-nouveau-hwe-18.04
xserver-xorg-video-qxl-hwe-18.04 xserver-xorg-video-radeon-hwe-18.04
xserver-xorg-video-vesa-hwe-18.04 xserver-xorg-video-vmware-hwe-18.04
2
bestucki

強くお勧めしますubuntu-driversツールの代わりに。安全で、カードに適切なNVIDIAまたはnouveauドライバーをインストールします。

ただし、ターミナルで次のコマンドを実行して、まず現在のNVIDIAドライバーをクリーンアップしてパージする必要があります。

Sudo apt purge nvidia-*

次に、次のようにターミナルでツールを実行できます。

Sudo ubuntu-drivers autoinstall

その後、システムを再起動して変更を有効にします。

お知らせ:

304. *は [〜#〜] nvidia [〜#〜] でサポートされなくなり、新しいカーネルで利用可能なリリースはありませんSudo ubuntu-drivers autoinstallnouveauドライバーをインストールします。このドライバーは、このような古いGPUを十分にサポートしているはずです。

ただし、質問で説明する方法で行う必要があります。 BIOS設定を確認してsecure bootを無効にする必要があるかもしれません。 ソース

代替オプションは、Ubuntu 16.04に戻ることです:

そうすることを選択した場合は、restrictedUbuntuリポジトリを有効にすることができます。 GUIのソフトウェアおよび更新オプションからこれを行うか、次のようにターミナルにリポジトリを追加します。

echo "deb http://security.ubuntu.com/ubuntu xenial-security main restricted" | Sudo tee -a  /etc/apt/sources.list

その後、aptパッケージリストを更新します。

Sudo apt update

次に、ドライバを次のようにインストールします。

Sudo ubuntu-drivers autoinstall

または

Sudo apt install nvidia-304

または

nvidia-304_304.135-0ubuntu0.16.04.1_AMD64 でパッケージを取得します

3
Raffa