How to solve the “Building kernel modules”? during nvidia driver install

My computer has an RTX2080 ti external graphics and is based on Ubuntu 18.04. I am trying to install CUDA 10.0, and the corresponding graphics driver 410.57 to use tensorflow gpu. chmod + x NVIDIA-Linux-x86_64–410.57.run #to get permission to execute the run file. sudo ./NVIDIA-Linux-x86_64–410.57.run — no-x-check I’m trying to do this ERROR: An error occrured while performing the step: “Building kernel modules”. How do you solve it?

/var/log/nvidia-installer.log

Below is the log file

/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/linux_nvswitch.c:1582:5: error: implicit declaration of function ‘time_to_tm’; did you mean ‘time64_to_tm’? [-Werror=implicit-function-declaration] time_to_tm(time_nsec / NVSWITCH_NSEC_PER_SEC, 0, &t); ^~~~~~~~~~ time64_to_tm /tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.c: In function ‘nvlink_sleep’: /tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.c:570:5: error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘efi_gettimeofday’? [-Werror=implicit-function-declaration] do_gettimeofday(&tm_aux); ^~~~~~~~~~~~~~~ efi_gettimeofday cc1: some warnings being treated as errors scripts/Makefile.build:284: recipe for target ‘/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/os-interface.o’ failed make[2]: * [/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/os-interface.o] Error 1 cc1: some warnings being treated as errors scripts/Makefile.build:284: recipe for target ‘/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.o’ failed make[2]: [/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.o] Error 1 cc1: some warnings being treated as errors scripts/Makefile.build:284: recipe for target ‘/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/linux_nvswitch.o’ failed make[2]: [/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/linux_nvswitch.o] Error 1 make[2]: Target ‘__build’ not remade because of errors. Makefile:1606: recipe for target ‘module/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel’ failed make[1]: * [module/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel] Error 2 make[1]: Target ‘modules’ not remade because of errors. make[1]: Leaving directory ‘/usr/src/linux-headers-5.0.0-23-generic’ Makefile:79: recipe for target ‘modules’ failed make: *** [modules] Error 2 ERROR: The nvidia kernel module was not created. 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. 1352,1 Bot

Installation of Nvidia driver 304.317 on Lubuntu 18.04 failed

I tried to install the Nvidia driver 304.317 according this post: Can't install Nvidia drivers on Ubuntu 18.04

During installation, several errors occurred:

Error message 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. 

Error message 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. 

Error message 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 

I tried to install the driver without dkms, but I had the same problem. The readme from nvidia couldn’t help me out. Any suggestions?

underclock old gpu with amdgpu driver

i have an old graphic card(saphire r9 270x pitcairn architecture) that keeps crashing when under maximum load. the preset stock clock is 1070mhz and it runs fine when underclock to 1000mhz. i’ve already enable amdgpu experimental through

GRUB_CMDLINE_LINUX_DEFAULT="radeon.cik_support=0 amdgpu.cik_support=1 radeon.si_support=0 amdgpu.si_support=1 amdgpu.ppfeaturemask=0xffffffff radeon.dpm=0 amdgpu.dpm=1" 
lspci -nnk | grep -i vga -A3 | grep 'in use'  Kernel driver in use: amdgpu 

Clock speeds, voltages are supposed to change via overriding GPU’s P-states in /sys/class/drm/card0/device/pp_od_clk_voltage and committing it with “c” but when i go in system root folder i cant find “pp_od_clk_voltage” in /sys/class/drm/card0/device/. the file is missing. i can only find pp_sclk_od, pp_mclk_od, pp_dpm_sclk and pp_dpm_mclk. how can i underclock using pp_od_clk_voltage when the file is missing from the system. please need help my english is not very good.

NVidia Quadro P2000’s driver stopped working

I was using using the laptop this afternoon, closed the lid and when i opened it again, i couldn’t get back into Ubuntu. Decided to switch back to the onboard Intel drivers temporarily to figure out what was going on:

sudo prime-select intel 

Tried switching from Gnome to KDE and it made no difference, as soon as i select the nvidia driver again, it freezes upon login on Gnome and no login screen at all when on KDE until switching back to the Intel driver again. (switched from gdm to ssdm in case that made a difference, no luck there)

Looking at the drivers, there are two NVidia drivers and a Nouveau driver, i’ve tried all three of them followed by a restart each time, each of them does exactly the same – system freezes after login in the case of Gnome or doesn’t even get to the login screen on KDE.

enter image description here

Next, i tried adding some stuff to grub:

sudo vim /etc/default/grub 

added nvidia-drm.modeset=1 and ran sudo update-grub

GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1" GRUB_CMDLINE_LINUX="mem_sleep_default=deep nvidia-drm.modeset=1" 

Followed by a restart, made no difference.

Not sure what other information i need to provide, so here’s an lspci dump:

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07) 00:02.0 VGA compatible controller: Intel Corporation Device 3e9b 00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07) 00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model 00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10) 00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10) 00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10) 00:15.0 Serial bus controller [0c80]: Intel Corporation Device a368 (rev 10) 00:15.1 Serial bus controller [0c80]: Intel Corporation Device a369 (rev 10) 00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10) 00:17.0 SATA controller: Intel Corporation Device a353 (rev 10) 00:1b.0 PCI bridge: Intel Corporation Device a340 (rev f0) 00:1c.0 PCI bridge: Intel Corporation Device a338 (rev f0) 00:1c.4 PCI bridge: Intel Corporation Device a33c (rev f0) 00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port 9 (rev f0) 00:1f.0 ISA bridge: Intel Corporation Device a30e (rev 10) 00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10) 00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10) 00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10) 01:00.0 3D controller: NVIDIA Corporation GP107GLM [Quadro P2000 Mobile] (rev a1) 02:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 03:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 03:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 03:02.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 3a:00.0 USB controller: Intel Corporation Device 15db (rev 02) 3b:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29) 3c:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01) 3d:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981 

I also noticed there’s a core file in my home directory

-rw------- 1 leuser leuser 698M Jul 31 23:42 core 

This is the stock Ubuntu 18.04 that came with this Dell Precision 5530, had it for about 2 weeks now. Not sure if one of those automated patches could have caused this, that being said, had i run apt upgrade, the same would probably have happened.

Any idea what else i could try to get the Quadro P2000 as the default graphics card again? This Intel card is ok for basic things, but not much more.

Cannot Fully Boot After AMD Driver Re-Installation (Stuck At ‘/dev/sdb2: clean, x/x files, x/x blocks)

The title pretty much says it all – I re-installed my AMD drivers on my Ubuntu drive, and after rebooting I am presented with ‘/dev/sdb2: clean, x/x files, x/x blocks’. It seems as though it is stuck at this, and so I can no longer boot into Ubuntu. I should say that I am very new to Ubuntu, so forgive me if this is a simple issue.

Unable to get driver to recognize NVIDIA GPU when I followed instructions for tensorflow install for 18.04

I am following the instructions here https://www.tensorflow.org/install/gpu

My output for nvidia-smi was “No devices were found.” However when I run lspci -vv | grep NVI I get

0a:00.0 VGA compatible controller: NVIDIA Corporation Device 1f06 (rev a1) (prog-if 00 [VGA controller]) 0a:00.1 Audio device: NVIDIA Corporation Device 10f9 (rev a1) 0a:00.2 USB controller: NVIDIA Corporation Device 1ada (rev a1) (prog-if 30 [XHCI]) 0a:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device 1adb (rev a1)

When I run the bug report, nvidia-bug-report-sh Iget this

https://drive.google.com/open?id=1Gn60tmK1FUP_DskXlcgB0k2Y1ruL4yyO

One thing that stood out to me was the fact that it says

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.";

I am unsure of how to do that or if it will fix the problem.

Problems booting – Nvidia Driver + Grub

I’m trying to get my default option in GRUB working again. Currently, it keeps hanging before login, probably on splash screen but I’m not sure since there are just some lines on a black and purple background :/

I can access my system through recovery mode with the resume option. Then everything including graphic driver is working just as it should.

Can someone help me debug this, please? It’s my working machine and I would love to have it working again – of course ^^

Thank you!

Graphic card driver issue : can’t log in

Here is my issue : Ubuntu starts perfectly, but when I get to the login screen and try to log in, I get a black screen and a few seconds later I’m back to the login screen.

I believe the problem comes from the graphic card driver, since I had just switched from the alternative driver to the proprietary one before I got the issue. (I used the Software and Updates app to do so.)

I have a Asus with i7 and a dualboot with Windows and Unbuntu 18.04 (Grub starts fine). My graphic card is Nvidia Geforce 920M.

Thank you !

PS : I’m a beginner Ubuntu user, don’t hesitate to ask if I forgot essential info.

Daily Driver Blog

Why are you selling this site?
Need some money

How is it monetized?
No

Does this site come with any social media accounts?
No

How much time does this site take to run?
10 min

What challenges are there with running this site?
No