Could not insert module

Bug #1634802 reported by Daiwai
106
This bug affects 21 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-304 (Ubuntu)
Fix Released
High
Alberto Milone
Yakkety
Triaged
High
Alberto Milone

Bug Description

Ubuntu release: 16.10 Yakkety Yak
Kernel version: 4.8.0-22-generic x86_64
Package version: 304.132-0ubuntu1

The nvidia module cannot be loaded. The following errors are reported:
Could not insert module Unknown symbol in module

and:

nvidia: Unknown symbol mtrr_del (err 0)
nvidia: Unknown symbol mtrr_add (err 0)

It looks like the buildfix_kernel_4.3.patch, which is supposed to be dealing with those calls, is not applied in this release of the package.

The package was working fine with the previous fully updated Ubuntu version 16.04 prior to the upgrade to 16.10.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: New → Confirmed
Revision history for this message
Anatoly Borodin (anatoly.borodin) wrote :

I can confirm: the driver was working in 16.04, but stopped working in 16.10, with the same messages about mtrr_del/mtrr_add.

Revision history for this message
Anatoly Borodin (anatoly.borodin) wrote :

> nm /lib/modules/4.8.0-26-generic/updates/dkms/nvidia_304.ko | fgrep mtrr
                 U mtrr_add
                 U mtrr_del

Revision history for this message
Anatoly Borodin (anatoly.borodin) wrote :
Revision history for this message
Ricardo Almeida (ric-almeida) wrote :

Not working for me either :(

Is this the same issue that got fixed in Debian (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809324)? How can we get this to be patched in Ubuntu? My machine is not very usable at the moment :(

Revision history for this message
Ricardo Almeida (ric-almeida) wrote :

This was working in 16.04, now since the upgrade to 16.10 it's broken. Should be marked as Critical. If fix was already released by Debian team should be easy and fast to get this corrected. Please, someone look into this!

Revision history for this message
Daiwai (daiwai) wrote :

I agree with Ricardo, that this bug is critical. For the video card of one of my systems, the nouveau driver doesn't work so it is practically unusable without the proprietary NVIDIA driver.

Revision history for this message
Mario Caves (ubuntu-mario) wrote :

this bug appeared on upgrading from Ubuntu 16.04 to 16.10 on an amd64 system and breaks Nvidia making my PC unable to log into the desktop. I have an older graphics card which requires the Nvidia 304 driver.

This patch appears to fix the bug by providing the missing symbols, could it be included into the kernel for Ubuntu 16.10?

https://anonscm.debian.org/viewvc/pkg-nvidia/packages/nvidia-graphics-drivers-legacy-304xx/trunk/debian/module/debian/patches/disable-mtrr.patch?annotate=6439

Revision history for this message
Ricardo Almeida (ric-almeida) wrote :

I changed /usr/src/nvidia-304-304.132/nv-linux.h and added just before the #endif in the end of the file the line:

#undef CONFIG_MTRR

then I did sudo dpkg-reconfigure nvidia-304

rebooted and at least X now is at proper resolution, but cinnamon fails to load. running cinnamon --replace on the terminal I get

libEGL warning: DRI2: failed to authenticate
Segmentation fault (core dumped)

Not sure if related with this bug or if it could be something else :(

Revision history for this message
kary (kari-kivioja) wrote :

This was/is working in:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Yakkety Yak (development branch)
Release: 16.10
Codename: yakkety

$ uname -a
Linux acer07 4.8.0-21-generic #23-Ubuntu SMP Tue Oct 4 18:27:25 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

With later kernels no longer works.

Revision history for this message
kary (kari-kivioja) wrote :

kari@acer07:~$ dpkg -l nvidia-304
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===========================-==================-==================-===========================================================
ii nvidia-304 304.131-0ubuntu5 amd64 NVIDIA legacy binary driver - version 304.131

Revision history for this message
Mario Caves (ubuntu-mario) wrote :

Not a solution to the bug, but a solution to the problem...
I have found that the driver for my graphics card (GeForce 210) has been updated from nvidia-304 to nvidia-340, both drivers being listed in Ubuntu 16.10 as available for my card.
Anyone else with the problem as reported can check this by running the following command:

$ ubuntu-drivers devices

This will tell you which drivers are available for your installed graphics card, I suggest picking the one marked 'recommended' for your card.

Revision history for this message
Mario Caves (ubuntu-mario) wrote :

the previous post was a solution for:

$ uname -a
Linux m28 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
kary (kari-kivioja) wrote :

Thanks Mario, but for me, that doesn't help:

model : C61 [GeForce 6100 nForce 405]
vendor : NVIDIA Corporation
driver : nvidia-304 - distro non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin

nvidia-304 is the problem and I've tried Nouveau earlier with no success.

Revision history for this message
kary (kari-kivioja) wrote :

To wrap up my previous couple of comments and hopefully bisect the problem, I can state the following (thanks to BTRFS):

This problem didn't / does not exist with:

Description: Ubuntu Yakkety Yak (development branch)
Linux acer07 4.8.0-21-generic #23-Ubuntu SMP Tue Oct 4 18:27:25 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ii nvidia-304 304.131-0ubuntu5 amd64 NVIDIA legacy binary driver - version 304.131

This problem exists with:

Description: Ubuntu 16.10
Linux acer07 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ii nvidia-304 304.132-0ubuntu1 amd64 NVIDIA legacy binary driver - version 304.132

Sorry, I don't have any more intermediary points.

Changed in nvidia-graphics-drivers-304 (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: Confirmed → In Progress
Changed in nvidia-graphics-drivers-304 (Ubuntu Yakkety):
status: New → Triaged
importance: Undecided → Critical
importance: Critical → High
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Ricardo Almeida (ric-almeida) wrote :

Just to add to my experience, adding #undef CONFIG_MTRR doesn't seem to be enough :( Besides the issues with cinnamon, I tried kodi, and it also crashes

21:12:29 T:139627963873664 ERROR: GLX Error: Could not create context
21:12:29 T:139627963873664 ERROR: InitRenderSystem() glewInit returned 1: Missing GL version
21:12:29 T:139627963873664 FATAL: CApplication::Create: Unable to init rendering system

and even glxgears fails to start

X Error of failed request: BadValue (integer parameter out of range for operation)
  Major opcode of failed request: 155 (GLX)
  Minor opcode of failed request: 3 (X_GLXCreateContext)
  Value in failed request: 0x0
  Serial number of failed request: 30
  Current serial number in output stream: 31

Hope this can be fixed soon...

Revision history for this message
kary (kari-kivioja) wrote :

I did a little bit of more triaging:

Staying on my
    Linux acer07 4.8.0-21-generic #23-Ubuntu SMP Tue Oct 4 18:27:25 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
and only upgrading from "nvidia-304 304.131-0ubuntu5" to "nvidia-304 304.132-0ubuntu1"
brings up this problem.

On the other hand, staying on "nvidia-304 304.131-0ubuntu5" and doing a complete "apt-get dist-upgrade" otherwise, results in a completely functioning system.

So looks like this problem is more connected with nvidia-304 versions than kernel versions.

My workaround is (thanks to BTRFS allowing me to boot into various snapshots and having the earlier driver version available):

$ cat /etc/apt/preferences.d/nvidia-304_mtrr-prob.pref
Package: nvidia-304
Pin: version 304.132-0ubuntu1
Pin-Priority: -1

Revision history for this message
Konrad (konradmb) wrote :

I've found a hack that will enable nvidia module to insert into kernel:

Uncomment this line:
#PATCH[1]="buildfix_kernel_4.3.patch"

in file /usr/src/nvidia-304-304.132/dkms.conf
then sudo dpkg-reconfigure nvidia-304

In Ubuntu 16.04 it was uncommented, because there were some mtrr changes in 4.3.0 kernel. This patch works for 4.8.0 kernel also.

Module works, but something is wrong with acceleration, because Unity is not working. This should throw some light on it:

$ glxgears
X Error of failed request: BadValue (integer parameter out of range for operation)
  Major opcode of failed request: 155 (GLX)
  Minor opcode of failed request: 3 (X_GLXCreateContext)
  Value in failed request: 0x0
  Serial number of failed request: 30
  Current serial number in output stream: 31

but running as sudo works

$ sudo glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.420 FPS
300 frames in 5.0 seconds = 59.928 FPS

I'm currently using gnome-session-flashback with metacity.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-304 - 304.132-0ubuntu2

---------------
nvidia-graphics-drivers-304 (304.132-0ubuntu2) zesty; urgency=medium

  * debian/dkms/patches/buildfix_kernel_4.3.patch:
    - Refresh and re-enable the patch (LP: #1634802).

 -- Alberto Milone <email address hidden> Thu, 03 Nov 2016 10:40:41 +0100

Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Ricardo Almeida (ric-almeida) wrote :

I installed from https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304

It gives some warnings in dmesg, probably ok:

[ 16.590697] nvidia: module license 'NVIDIA' taints kernel.
[ 16.590697] Disabling lock debugging due to kernel taint
[ 16.597921] nvidia: module verification failed: signature and/or required key missing - tainting kernel

[ 16.603283] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 304.132 Fri Sep 16 11:02:09 PDT 2016

starts X with correct resolution, but cinnamon fails :( Looking at dmesg, I have:

[ 92.875656] cinnamon[2152]: segfault at 0 ip 00007f69f0b917ae sp 00007ffd8fd75270 error 4 in libc-2.24.so[7f69f0b02000+1bd000]

Trying to start glxgears, also fails :(

X Error of failed request: BadValue (integer parameter out of range for operation)
  Major opcode of failed request: 155 (GLX)
  Minor opcode of failed request: 3 (X_GLXCreateContext)
  Value in failed request: 0x0
  Serial number of failed request: 30
  Current serial number in output stream: 31

glxinfo, similar error :(

name of display: :0
X Error of failed request: BadValue (integer parameter out of range for operation)
  Major opcode of failed request: 155 (GLX)
  Minor opcode of failed request: 24 (X_GLXCreateNewContext)
  Value in failed request: 0x0
  Serial number of failed request: 87
  Current serial number in output stream: 88

Revision history for this message
kary (kari-kivioja) wrote :

Also I tested nvidia-304, version 304.132-0ubuntu2. I did it from zesty archive.

It seems to me, that THIS bug is fixed. The module got loaded into kernel, there are no longer unsatisfied global references.

But like others have have commented, something else seems to be wrong. In my case (I am running kubuntu) I get a black screen after boot. The greeter login window does not appear.

Right now I don't have time to debug THAT problem. I hope to be able to do that later this week and probably file another bug. (My current guess is, that it may have something to do with the lack of another patch, that has been dropped between 304.131-0ubuntu5 and 304.132-0ubuntu1...)

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

I installed the fix from zesty, and it loads into the kernal fine, and I can set the resolution that I want.

However...

Since before now I could not get nvidia-304 to work, I had been using nouveau.
I had been able to start the panorama program Hugin, but when I tried to open the images to stitch together, the graphics driver nouveau crashed and I had to do a hard-shutdown.

Now that I have a working nvidia-304, Hugin crashes with some sort of a x-window error when it tries to start up.

"
The program 'hugin' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 541 error_code 2 request_code 154 minor_code 24)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
"

I don't know if it is the mere presence of nvidia-304, or THIS PARTICULAR
nvidia-304. I don't know if it is the FIX that caused it, or something else.
I can see that the version of nvidia-304 that I had been using under Lubuntu
16.04 (and which I used with Hugin with no problem) was 304.131xxx instead of
.132.

From this output, can anyone say if it is a bug in nvidia-304, or Hugin that is
the problem?

Say...

I see that there is a .131 for Xenial Xerus. at the same site I got the fixed .132 ...
Does anyone think there is likely to be a problem if I try to load that version of nvidia-304?
I am inclined to try it...

Revision history for this message
Anatoly Borodin (anatoly.borodin) wrote :

I've installed http://archive.ubuntu.com/ubuntu/pool/restricted/n/nvidia-graphics-drivers-304/nvidia-304_304.132-0ubuntu2_amd64.deb , and dmesg doesn't complain about the mtrr functions anymore, but the X doesn't work: I see the big green Nvidia logo, and then a black screen instead of sddm, but I see no problems in the logs.

Nouveau driver kinda works, but many programs just crash.

"Subsystem: NVIDIA Corporation NV44 [Quadro NVS 285]"

Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :

I also have this problem (on the computer of my dear old mother, 250 miles away, so remote support through SSH.....) so I'll be happy to lend a hand if I can...

Upgraded her to 16.10 remotely via the command line because her 16.04 install developed the infinite login loop with a GLX error on starting X as mentioned in #20

Now getting the mtrr_add problem instead.

She had no complaints with 304.131-0ubuntu3 (Xenial release version), so whatever it is arrived in the 304.132 release, I think.

Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :

Installed the 301.132-ubuntu2 release from Zesty on Mom's computer.

That does indeed allow the module to load, but puts you right back at the GLX error.

Removed the nvidia-304 package and thankfully, nouveau seems to have improved somewhat and now works for her.

Have enclosed error log, although it should probably go in another bug.

Revision history for this message
Ben Coleman (oloryn) wrote :

Apparently, there was a nvidia-304-304.134 release in the past week. I still had to uncomment the "#PATCH[1]="buildfix_kernel_4.3.patch" line in dkms.conf and run 'dpkg-reconfigure nvidia-304' to get rid of the mtrr-add and mtrr-del references so it would load, but the speed problem that others have noted appears to have been dealt with. At least watching Netflix on this particular machine is back to where it was on 16.04.

Revision history for this message
Ben Coleman (oloryn) wrote :

Ah. Apparently 304.134 release I got was from the graphics-drivers PPA.

Revision history for this message
Jonathan Neufeld (jonath2n) wrote :

Confirmed I was unsuccessful with 304.131 and 304.132 but I just finished installing 304.134 on my 4.8.0-30-generic kernel, no more login loop and I can get back onto NetFlix.

Revision history for this message
Gary Caine (skgary) wrote :

I still have the login loop with 4.8.0-32-generic GNU/Linux after installing 304.134

At https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/+bug/1639180

it seems that the bug for 16.04 was fixed in the package nvidia-graphics-drivers-304 - 304.134-0ubuntu1

However in 16.10 the latest version is nvidia-graphics-drivers-304 - 304.134-0ubuntu0

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

Well, I ended up with the nvidia-304 304.131-0ubuntu5 version, which loads into the kernel just fine, and also allows Hugin to function...

I am curious - since the fixed 304.132-0ubuntu2 version loads into the kernel, why has it not yet made it into Yakkety?
Since I cannot use it (see comment #22), it doesn't make much difference to me, but it probably would help other people. I see it is not yet available, because every day, I have to dismiss the Software Updater, which is constantly offering me the 304.132-0ubuntu1 version, with which it wants to replace my 304.131-0ubuntu5...

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

A week or two ago, Software Updater started offering me version 304.134-0ubuntu0.16.10.1

It had never offered me the "fixed" version 304.132-0ubuntu2, but only the original version 304.132-0ubuntu1, which did not load into the kernel (with the mtrr_add and mtrr_del errors).

I tried the 304.134-0ubuntu0.16.10.1 version offered, and it fails just like 304.132-0ubuntu1.

Somehow, the fix never made it into my distribution repositories, and was not incorporated into the new 304.134-0ubuntu0.16.10.1 version.

I still am forced to use an older version ( 304.131-0ubuntu5 ) in order to have an nvidia driver that both loads into the kernel, and allows Hugin to run correctly...

------------------------------------------------------------
scott@scott-ASUS-M2N68-AM-PLUS:~$ uname -a
Linux scott-ASUS-M2N68-AM-PLUS 4.8.0-37-generic #39-Ubuntu SMP Thu Jan 26 02:27:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
scott@scott-ASUS-M2N68-AM-PLUS:~$ lsb_release -dsc
Ubuntu 16.10
yakkety
scott@scott-ASUS-M2N68-AM-PLUS:~$ echo $DESKTOP_SESSION
Lubuntu

Revision history for this message
kary (kari-kivioja) wrote :

I have been succesfully using 304.134-0ubuntu1 for a while on Kubuntu zesty.

# ubuntu-drivers devices
vendor : NVIDIA Corporation
model : C61 [GeForce 6100 nForce 405]
driver : nvidia-304 - distro non-free recommended
# uname -a
Linux acer07 4.9.0-11-generic #12-Ubuntu SMP Mon Dec 12 16:18:23 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
# lsb_release -dcs
Ubuntu Zesty Zapus (development branch)
zesty
# echo $DESKTOP_SESSION
/usr/share/xsessions/plasma

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.