nvidia-304 kernel module failed to build with new bionic kernel [error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’?]

Bug #1751147 reported by Bill Miller
58
This bug affects 12 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-304 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After updating to the 4.15.0-10-generic kernel today and rebooting, could log in but not do anything after that (got desktop image and conky, but no panel). Returning to the prior kernel, everything was OK except apport popped up with this error.

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: nvidia-304 304.137-0ubuntu2
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
DKMSKernelVersion: 4.15.0-10-generic
Date: Thu Feb 22 15:30:32 2018
DuplicateSignature: dkms:nvidia-304:304.137-0ubuntu2:/var/lib/dkms/nvidia-304/304.137/build/nv.c:3032:5: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
InstallationDate: Installed on 2018-02-10 (12 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180210)
PackageVersion: 304.137-0ubuntu2
Python3Details: /usr/bin/python3.6, Python 3.6.4+, python3-minimal, 3.6.4-1
PythonDetails: /usr/bin/python2.7, Python 2.7.14+, python-minimal, 2.7.14-4
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu1
 apt 1.6~alpha7ubuntu2
SourcePackage: nvidia-graphics-drivers-304
Title: nvidia-304 304.137-0ubuntu2: nvidia-304 kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Bill Miller (wbmilleriii) wrote :
tags: removed: need-duplicate-check
summary: - nvidia-304 kernel module failed to build with new bionic kernel
+ nvidia-304 kernel module failed to build with new bionic kernel [error:
+ implicit declaration of function ‘init_timer’; did you mean
+ ‘init_timers’?]
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
kary (kari-kivioja) wrote :

I saw the same problem. Similar discussion can be found: https://devtalk.nvidia.com/default/topic/1026876/patch-for-387-34-and-linux-4-15-0-rc1/ .

I tested a similar fix and was able to get the kernel module built and running. My fix attached.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-for-4.15-timer-change" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Bill Miller (wbmilleriii) wrote :

I'm glad to know that the problem is fixable, but my knowledge level is not such that I could apply this patch without detailed instructions.

Revision history for this message
Bill Miller (wbmilleriii) wrote :

I changed to nvidia-340 and it works.

Revision history for this message
Bill Miller (wbmilleriii) wrote :

"Thanks."

Since I reported the bug in the first place, I'm well aware of what it covered.

I was commenting to let affected users know that a different driver, compatible with the same hardware (at least in my case), works.

Revision history for this message
vmc (vmclark) wrote :

What I meant to say is only nvidia-304 and in the next kernel 15 update, that fix that is listed above will NOT work anymore. Since this is nvidia's legacy were out of luck.

Revision history for this message
matt r. (triplr) wrote :

I have built all 4.15.x releases and 4.16rc from source kernel.org and confirm nvivia-304 will not build. Am looking at learning how to install patch. This should be reported to kernel.org as well

Revision history for this message
matt r. (triplr) wrote :

also, i have this hardware on my laptop, and never have applied a patch before. is there a guide or howto to apply this patch, or can someone post a link ?
thanks in advance

Revision history for this message
victor00000 (vict1971) wrote :

my ubuntu 18.04 install nvidia-304 no work. :(

Revision history for this message
victor00000 (vict1971) wrote :

gcc problem.

setup ppa:ubuntu-toolchain-r/test
dav update kernel drivers nvidia auto make install
BUM!
my 14.04 lts

sudo ppa-purge ppa:ubuntu-toolchain-r/test
reinstall nvidia-304
ok.
:D

Revision history for this message
Modestas (montvid) wrote :

Hi dear Xenial ubuntu 16.04 LTS maintainers. You broke Nvidia drivers with hwe kernel 4.15. AS it is a LTE please stop wasting time on bug fixing and just import the debian strech stable packages that are fixed for kernel 4.15 and above. see:
https://metadata.ftp-master.debian.org/changelogs//non-free/n/nvidia-graphics-drivers-legacy-304xx/nvidia-graphics-drivers-legacy-304xx_304.137-0~deb8u1_changelog

* Add timer.patch to fix kernel module build on Linux 4.15 and newer (304.137-4).

https://packages.debian.org/jessie/nvidia-legacy-304xx-driver

Pretty please!!!

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.