[SOLVED]Cannot build nvidia drivers on Mint 18

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
EvanBlack72
Level 1
Level 1
Posts: 4
Joined: Thu Aug 25, 2016 11:32 pm

[SOLVED]Cannot build nvidia drivers on Mint 18

Postby EvanBlack72 » Thu Aug 25, 2016 11:46 pm

Building nvidia driver freezes at "Building initial module for 4.4.0-34-generic"

You can insert ANY version of nvidia drivers and/or kernels.
Tried different kernel/nvidia combos ALL freeze at build. 361 364 367 370
Tried both stock repository and ppa:graphics-drivers/ppa
Tried gcc-4.9

Make log shows:

Code: Select all

DKMS make.log for nvidia-370-370.23 for kernel 4.4.0-34-generic (x86_64)
Thu Aug 25 23:05:19 EDT 2016
make "CC=cc"  KBUILD_VERBOSE= -C /lib/modules/4.4.0-34-generic/build M=/var/lib/dkms/nvidia-370/370.23/build ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/4.4.0-34-generic/build NV_KERNEL_OUTPUT=/lib/modules/4.4.0-34-generic/build NV_KERNEL_MODULES="nvidia nvidia-uvm nvidia-modeset nvidia-drm" INSTALL_MOD_DIR=kernel/drivers/video modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-34-generic'
  SYMLINK /var/lib/dkms/nvidia-370/370.23/build/nvidia/nv-kernel.o
  SYMLINK /var/lib/dkms/nvidia-370/370.23/build/nvidia-modeset/nv-modeset-kernel.o
 CONFTEST: INIT_WORK
 CONFTEST: follow_pfn
 CONFTEST: remap_pfn_range
 CONFTEST: vmap
 CONFTEST: set_pages_uc


And stops there...

Linux Mint 18 Sarah 64-bit MATE and cinamon
nvidia 550gtx
AMD Phenom(tm) II X6 1100T
8gb mem
Last edited by EvanBlack72 on Mon Dec 05, 2016 9:08 pm, edited 1 time in total.

Ronnie01
Level 2
Level 2
Posts: 69
Joined: Mon Jul 25, 2016 9:19 am
Contact:

Re: Cannot build nvidia drivers on Mint 18

Postby Ronnie01 » Fri Aug 26, 2016 4:35 am

Don't build them yourself. Add this PPA: https://launchpad.net/~graphics-drivers ... ubuntu/ppa
Install the recommended driver using driver manager/additional drivers menu.

EvanBlack72
Level 1
Level 1
Posts: 4
Joined: Thu Aug 25, 2016 11:32 pm

Re: Cannot build nvidia drivers on Mint 18

Postby EvanBlack72 » Fri Aug 26, 2016 11:16 am

Ronnie01 wrote:Don't build them yourself. Add this PPA: https://launchpad.net/~graphics-drivers ... ubuntu/ppa
Install the recommended driver using driver manager/additional drivers menu.


The driver installation freezes at building module. Please read original post.
I've seen this "fix" a million times now. This is not the answer.
Tried both stock repository and ppa:graphics-drivers/ppa


Any time you use the software manager, driver manager, or sudo apt-get nvidia-###
You will get "Building initial module for kernelversion-generic"
NORMALLY it builds the module and completes install.
The issue is it stops there... forever. Never completing the module build.
No matter what version of nvidia driver, no matter stock or ppa:graphics-drivers/ppa repo, no matter what kernel.

Had this issue on two separate machines, and many others have same issue but ZERO real answer, other than "get ppa:graphics-drivers/ppa".
Unfortunately we HAVE that repo, it's not working!
Always on linux mint 18 or ubuntu 16.04

This also only seems to happen when updating drivers. Fresh install works, then in the updating something goes wrong and no nvidia driver can be installed.
You can wipe all traces of nvidia, and try to re-install.. it will fail.
sudo dkms remove -m nvidia -v <version###> --all
sudo apt-get remove --purge nvidia-*
sudo apt-get remove --purge *nvidia
sudo apt-get install nvidia-367

BAM! Stuck for an hour at "Building initial module for 4.4.0-34-generic"

robertcc
Level 1
Level 1
Posts: 3
Joined: Tue Oct 01, 2013 6:22 pm

Re: Cannot build nvidia drivers on Mint 18

Postby robertcc » Thu Sep 08, 2016 7:19 pm

I have this exact same issue. The system itself is older, but with an Nvidia 1070.
Like the OP, I'm also able to install the driver from the graphics-drivers repo once. But any updates to either the kernel or the driver itself "breaks"--exhibits the infinite "building" message.

I can't find anything useful in any /var/logs--the best I get is this in the kern.log which is also echoed in the dmesg:

Sep 8 16:05:30 host kernel: [238869.476737] NVRM: API mismatch: the client has the version 370.28, but
Sep 8 16:05:30 host kernel: [238869.476737] NVRM: this kernel module has the version 370.23. Please
Sep 8 16:05:30 host kernel: [238869.476737] NVRM: make sure that this kernel module and all NVIDIA driver
Sep 8 16:05:30 host kernel: [238869.476737] NVRM: components have the same version.

I see the same thing as the OP in the make.log.

(This was from an attempt to update the driver via the PPA.)

EvanBlack72
Level 1
Level 1
Posts: 4
Joined: Thu Aug 25, 2016 11:32 pm

Re: Cannot build nvidia drivers on Mint 18

Postby EvanBlack72 » Tue Sep 13, 2016 4:04 pm

Still hoping someone can find an answer to this. I've tried multiple kernals and multiple driver versions. All stuck at building module.
That system has been unable to run anything short of desktop without the drivers...
If I have them come in for a system wipe, I can guarantee it will not my mint 18 going back in. lol
This is the worst issue I've ever encountered in linux.

User avatar
kyphi
Level 8
Level 8
Posts: 2123
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter, Australia

Re: Cannot build nvidia drivers on Mint 18

Postby kyphi » Tue Sep 13, 2016 7:47 pm

Here are some thoughts on the matter:

1. Purge nvidia (sudo aptitude purge ~nnvidia) and, if necessary, revert to the native nvidia driver (NouVeau)
(or you can use sudo nvidia-installer --uninstall).
2. Revert to the original kernel or at least an earlier one that the nvidia driver has not been compiled against.

Check that the system works.

3. Upgrade the kernel if you deem it necessary (I am using kernel 4.4.0-34 and find it satisfactory with nvidia driver 361.42).
4. Install the nvidia driver either from the Driver Manager (preferred) or download one from Nvidia. The driver will be compiled against the installed kernel.

If you want to install another kernel, purge the nvidia driver first and then install it again so that it is compiled against the new kernel.
Linux Mint 18.3 Cinnamon - 64bit

User avatar
trytip
Level 5
Level 5
Posts: 868
Joined: Tue Jul 05, 2016 1:20 pm

Re: Cannot build nvidia drivers on Mint 18

Postby trytip » Wed Sep 14, 2016 1:28 am

i had this issue with pclinuxos where the nvidia will not build and it boots to a command line login where it fails to startx because of permission denied

after many tries sometimes succeding to boot but on the next reboot it will scan for hardware then say nvidia is already installed at which point everything stalls. i had to ditch pclinuxos kde4 which was my favorite

i have not tried the mint 18 on hardware to see how nvidia acts, but then maybe you'll need to use 17.3 instead
I love Windows, they give my walls personality.

robertcc
Level 1
Level 1
Posts: 3
Joined: Tue Oct 01, 2013 6:22 pm

Re: Cannot build nvidia drivers on Mint 18

Postby robertcc » Thu Nov 10, 2016 5:47 pm

As an update, after having to deal with this again recently:

I had Eset antivirus on these endpoints and, after reading something elsewhere about the nature of its kernel protection integration, removed it. Afterward I was able to cleanly install the nvidia driver on the kernel of my choice without issue.

EvanBlack72
Level 1
Level 1
Posts: 4
Joined: Thu Aug 25, 2016 11:32 pm

Re: Cannot build nvidia drivers on Mint 18

Postby EvanBlack72 » Mon Dec 05, 2016 9:14 pm

robertcc wrote:As an update, after having to deal with this again recently:

I had Eset antivirus on these endpoints and, after reading something elsewhere about the nature of its kernel protection integration, removed it. Afterward I was able to cleanly install the nvidia driver on the kernel of my choice without issue.



^^^^^ THIS THIS THIS and THIS ^^^^^

I actually found this elsewhere as well and came back to post this very solution. You can't build kernal modules with ESET in the way. lol

Thank you robertcc for posting. Marking this as SOLVED. I really hope someone else finds this information helpful!

physicsman
Level 1
Level 1
Posts: 1
Joined: Thu Oct 19, 2017 7:12 pm

Re: [SOLVED]Cannot build nvidia drivers on Mint 18

Postby physicsman » Thu Oct 19, 2017 7:19 pm

I had this problem. For me however this was not the solution. It turned out to be a motherboard issue. Another post mentioned the problem being fixed after swapping the motherboard. Instead of doing that I removed all my hardware tweaks in the BIOS by setting the motherboard to default settings and after that everything worked fine. Not sure which setting was the issue, I think it may have been the overclock on the RAM.


Return to “Graphic Cards & Monitors”