To Pedro: Yes, downgrading to nvidia drivers 304.137 does work. However, I have some other issues (tearing in videos) with drivers 304.137.
The alternative is to keep nvidia drivers 340, and to downgrade the kernel to 4.4.0-109: nvidia drivers 340 work fine with kernel 4.4.0-109. And kernel 4.4.0-109 has patches for Spectre and Meltdown flaws. This worked for me. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu. https://bugs.launchpad.net/bugs/1718839 Title: nvidia-340 340.104-0ubuntu1: nvidia-340 kernel module failed to build (error: initialization from incompatible pointer type [-Werror =incompatible-pointer-types] .fault = _fault,) Status in nvidia-graphics-drivers-340 package in Ubuntu: Confirmed Bug description: After installing new drivers when I restart, it shows crash report. ProblemType: Package DistroRelease: Ubuntu 17.10 Package: nvidia-340 340.104-0ubuntu2 ProcVersionSignature: Ubuntu 4.13.0-11.12-generic 4.13.1 Uname: Linux 4.13.0-11-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.20.7-0ubuntu1 Architecture: amd64 DKMSKernelVersion: 4.13.0-11-generic Date: Thu Sep 21 15:08:42 2017 DuplicateSignature: dkms:nvidia-340:340.104-0ubuntu1:/var/lib/dkms/nvidia-340/340.104/build/uvm/nvidia_uvm_lite.c:857:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] InstallationDate: Installed on 2017-04-03 (171 days ago) InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2) PackageVersion: 340.104-0ubuntu1 Python3Details: /usr/bin/python3.6, Python 3.6.3rc1, python3-minimal, 3.6.2-1ubuntu2 PythonDetails: /usr/bin/python2.7, Python 2.7.14, python-minimal, 2.7.14-1 RelatedPackageVersions: dpkg 1.18.24ubuntu1 apt 1.5~rc4 SourcePackage: nvidia-graphics-drivers-340 Title: nvidia-340 340.104-0ubuntu1: nvidia-340 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-340/+bug/1718839/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp