nvidia-graphics-drivers-304 304.137-0ubuntu2 ADT test failure with linux 4.15.0-1.2 [error: implicit declaration of function ‘init_timer’]

Bug #1737750 reported by Seth Forshee on 2017-12-12
206
This bug affects 50 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-304 (Ubuntu)
Medium
Seth Forshee
nvidia-graphics-drivers-340 (Ubuntu)
Undecided
Unassigned
Seth Forshee (sforshee) wrote :
tags: added: kernel-adt-failure
Seth Forshee (sforshee) wrote :
Changed in nvidia-graphics-drivers-304 (Ubuntu):
assignee: nobody → Seth Forshee (sforshee)
importance: Undecided → Medium
status: New → In Progress
Seth Forshee (sforshee) wrote :

Note that I've compile tested the attached fix but don't have hardware to do run-time testing.

tags: added: patch
Unit 193 (unit193) wrote :

I can confirm Seth's findings, as well as the fact it functions.

nvidia-304, 304.137, 4.15.0-10-generic, x86_64: installed

[ 40.440] (II) NVIDIA dlloader X Driver 304.137 Thu Sep 14 13:52:41 PDT 2017
[ 40.440] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 40.440] (II) NOUVEAU driver Date: Fri Apr 21 14:41:17 2017 -0400

00:0d.0 VGA compatible controller: NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) (prog-if 00 [VGA controller])
 Kernel driver in use: nvidia

Thanks for the patch!

Seth Forshee (sforshee) wrote :

It's been suggested that this driver should be removed as it's not longer maintained (bug 1748000), so I'm not sure what the fate of this patch will be.

matt r. (triplr) wrote :

it is maintained by nvidia, i submitted a report to them .

how do I install the patch and where, driver kernel etc ?
i have compiled kernels, but not a patch as of yet

i have the hardware.

matt r. (triplr) wrote :

build reject for this patch in the driver

matt r. (triplr) wrote :

thank you google and duck duck gogo, i found the patch instructions here

https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/4/

Ricardo Almeida (ric-almeida) wrote :

Could a ppa be created for the easy distribution of the patched version?

Bill Miller (wbmilleriii) wrote :

I'd love to have it too. It controlled the heating on my laptop better than any other version.

jfrantzius (jfrantzius) wrote :

Could some friendly soul provide instructions on how to apply the patch from comment #2 ?

Or are there any chances it will be applied in a way that the proprietary driver manager will find the (patched) 304.137 driver again?

(the alleged patch on if-not-true-then-false seems to be something entirely different. I downloaded the patched driver there, and it fails with same 3 error messages)

summary: nvidia-graphics-drivers-304 304.137-0ubuntu2 ADT test failure with linux
- 4.15.0-1.2
+ 4.15.0-1.2 [error: implicit declaration of function ‘init_timer’]
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: New → Confirmed
Andy Dufresne (adufray) wrote :

@jfrantzius and others, I wrote a quick blog post to document the steps required to apply Seth's wonderful patch:

https://adufray.com/blog/2018/06/02/nvidia-304-127-on-bionic

Hope that helps.

Thank you for your efforts, Seth! It is a shame this patch and package will not longer be included in the PPA; it seems they've marked the other bug as Won't Fix. This driver version is the latest available for my aging GeForce 7300 GT.

Bill Miller (wbmilleriii) wrote :

I really appreciate your doing this. I am trying it right now and the patch process just stops. I looked at the combined patch file and it seems to end with an unterminated left parenthesis. Does the file end prematurely?

Bill Miller (wbmilleriii) wrote :

And, the build process failed with Unable to build the NVIDIA kernel module. Sigh.

Andy Dufresne (adufray) wrote :

When you say the patch process just stops, does it print out any kind of message? The patch should end with this line, which is just contextual information:

 static int nv_drm_load(

Bill Miller (wbmilleriii) wrote :

With offline help from @audfray I got this to work. Really appreciate the help.

iGadget (igadget) wrote :

So even while this bug has been known to exist for more than half a year, it still managed to slip into the automatic updates of an LTS (16.04) release: https://bugs.launchpad.net/bugs/1779687

Ouch.

I hope this doesn't mean systems with older nVidia cards are just out of luck?

teramind (soeren-w) wrote :

How to solve this? Is anyone working on it? Is it enough do downgrade the kernel?

Bill Miller (wbmilleriii) wrote :

Patch and compile the driver as explained in the link from comment #13

Attila K (attila-kilo) wrote :

Downgrading the kernel is sufficient too, aka if you boot with kernel version 4.13.0 through GRUB, and then remove everything related to 4.15.0, the driver will work fine.

There was a 340 issue with the 4.13 kernel update too back in January, and it was fixed in a couple of days (https://bugs.launchpad.net/bugs/1741671), I'm hopeful here too, as this affects a LTS release now...

iGadget (igadget) wrote :

I was hoping this would have been fixed with today's updates, as the xorg update mentioned something in the terms of 'prevent nvidia regression'. But alas, still need to manually boot kernel 4.13 to get beyond lightdm.

Benchrest (benchrest) wrote :

I think this bug describes my failure. I am using Linux Mint Cinnamon 18.3 w NVIDIA-340.104
Using the latest kernel at the time, 4.15.0-24 cinnamon crashes at boot. Also with 4.15.0-20, the kernel that comes with LM 19 and Ubuntu 18.04 I understand. I just tried the new 4.15.0-29 and have the same failure. I get a message in xorg.log that the nvidia driver failed to load, see the syslog for more error messages, but I find nothing there.

Works ok if I use the Nouveau driver or revert back to 4.13.0-45 and use the nvidia-340 driver. I am hesitant to go to the new LM 19 for this problem.

I am seeing conflicting information. The kernel inadvertently dropped support for nvidia-340 and will be fixed or support for nvidia-340 is being dropped permanently.

Can anyone comment on if this problem will be fixed or do I need to make other plans? Not trying to rush a fix just want to know if I wait if something will happen.
Rich

Bill Miller (wbmilleriii) wrote :

Not an authority, but I don't think it will be fixed. Patch and compile the driver as explained in the link from comment #13 and then use any kernel you like.

Jarno Suni (jarnos) wrote :

This bug started to show up in Xenial with linux-generic-hwe-16.04, and not just linux-generic-hwe-16.04-edge, as the former was updated to version 4.15.0.29.51 in xenial-security:

$ apt-cache policy linux-generic-hwe-16.04
linux-generic-hwe-16.04:
  Installed: 4.15.0.29.51
  Candidate: 4.15.0.29.51
  Version table:
 *** 4.15.0.29.51 500
        500 http://ubuntu.trumpetti.atm.tut.fi/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     4.13.0.45.64 500
        500 http://ubuntu.trumpetti.atm.tut.fi/ubuntu xenial-security/main amd64 Packages

Linard Verstraete (linardv) wrote :

I have hardware (nVidia GeForce 8400M GS) for a runtime test.
The card is supported upstream by the 340.x branch until 2019 [1].
The release notes of the latest released patch (340.107-0) seem to be mention that they resolved the problem [2].
The patch is available and packaged for Ubuntu, currently only for 18.10 "Cosmic Cuttlefish" [3].

To confirm, I ran Ubuntu 18.10 from the daily liveDVD [4], verified it ran linux-4.15.x, installed nvidia-340 340.107-0ubuntu1 and noted that it built successfully [5].

Anyone an idea who can make the "nvidia-340 340.107-0ubuntu1" package available affected versions:
* Ubuntu 16.04 LTS Xenial Xerus (HWE introduced kernel 4.15 there [6])
* Ubuntu 18.04 LTS Bionic Beaver (started on kernel 4.15)

Thanks,
Linard.

[1] http://nvidia.custhelp.com/app/answers/detail/a_id/3142
[2] http://www.nvidia.co.uk/download/driverResults.aspx/135245/en-uk
[3] https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+publishinghistory
[4] http://cdimage.ubuntu.com/daily-live/current/
[5] See attachment to this bug report: "nvidia-340.1070-linux-4.15-install-log.txt"
[6] https://wiki.ubuntu.com/Kernel/Support?action=AttachFile&do=view&target=16.04.x+Ubuntu+Kernel+Support+Schedule.svg

Wouter Depuydt (narrenschip) wrote :

A 'backport' of "nvidia-340_340.106-0ubuntu3_amd64.deb" from Bionic should do the trick as this is fixed by NVidia in nvidia-340.106:
http://www.nvidia.com/Download/driverResults.aspx/130042/en-us
"Release Highlights: Fixed a compatibility problem between the nvidia.ko's Page Attribute Table (PAT) support and the kernel Page Table Isolation (PTI) patches."

Forcing the installation of "nvidia-340_340.106-0ubuntu3_amd64.deb" from Bionic on Xenial seems to work:
  sudo dpkg -i --force-depends nvidia-340_340.106-0ubuntu3_amd64.deb
This then needs a little massaging:
  sudo ln -s /usr/lib/nvidia-340/xorg /etc/alternatives/x86_64-linux-gnu_xorg_extra_modules
  sudo ln -s /etc/alternatives/x86_64-linux-gnu_xorg_extra_modules /usr/lib/x86_64-linux-gnu/xorg/extra-modules
And commenting out
  ModulePath "/usr/lib/nvidia-340/xorg"
in /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass-ubuntu.conf

Jim Kyle (jim-jimkyle) wrote :

I've encountered this bug on the past TWO kernel updates of my Xubuntu 16.04.4 (now .5) system that uses an Nvidia card. Initially I found that falling back to the previous kernel was a satisfactory workaround. This morning, I tried using the "Additional drivers" system setting to change from the Nvidia driver to the noveau driver -- and that has worked perfectly so far. This might be a possible recommended solution. I had originally switched from noveau to the proprietary driver because noveau didn't work properly, but that was several years ago and it has obviously gotten much metter!

Jim Kyle (jim-jimkyle) wrote :

s/metter/better/!!!

Chugajstyr (chugajstyr) wrote :

I've got same issue on Linux Mint 18.3 x86_64 (Ubuntu 16.04 based) with nvidia-340 "340.104-0ubuntu0.16.04.1", and for me very helps debdiff patch of Seth Forshee from this bug report: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1737751. I also forced to find and add another one patch for kernel 4.14, because it is not exist anymore in current nvidia-340 sources, but mentioned in Seth patch.

So, I saw 2 ways to fix current nvidia driver for Ubuntu 16.04 v.340.104:
1) quick
  1.1) use chunks from Seth patch to fix nvidia sources right in DKMS directory /usr/src/nvidia-340-340.104/ (if you got error from this topic, you already have them there),
  1.2) build & install nvidia kernel module with DKMS.

2) longer, but you've got ready-to-use nvidia deb-packages.
  2.1) fix nvidia source deb-packages with modified Seth's debdiff patch
  2.2) rebuild nvidia deb-packages, purge original & install rebuilded ones

I used second way, now I have working nvidia-340 driver with 4.15 kernel.
Also, after installing rebuilded packages, nvidia module not loaded, even manually - I got error "modprobe: ERROR: could not insert 'nvidia_340': No such device" - I forced to remove loaded module "nouveau", load "nvidia-340", then rebuild initrd image.

Chugajstyr (chugajstyr) wrote :
Chugajstyr (chugajstyr) wrote :
wally (xxsjsxx) wrote :

As others report, this has now happened with two attempted updates to kernel 4.15.
In one case the updater reported errors as it tried to load the update but then improperly ignored the errors and the update - known to be wrong - was then finalized and grub was updated to use the known wrong files.
Why put out the error notification if it is then ignored?

Eggsome (eggsome) wrote :

I thought the whole point of an LTS release is that nothing major breaks?
Really disappointing to do an apt-get update and break my laptop :(
I have a GeForce 310M and this is the only supported driver.
What is the likelihood that the patch from comment #2 will make it into the mainstream patch cycle for 16.04 repositories?

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

Other bug subscribers