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. ** Attachment added: "fix-for-4.15-timer-change" https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/+bug/1751147/+attachment/5060872/+files/fix-for-4.15-timer-change -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to nvidia-graphics-drivers-304 in Ubuntu. https://bugs.launchpad.net/bugs/1751147 Title: nvidia-304 kernel module failed to build with new bionic kernel [error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’?] Status in nvidia-graphics-drivers-304 package in Ubuntu: Confirmed 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 184.108.40.206ubuntu1 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) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/+bug/1751147/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : firstname.lastname@example.org Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp