nvidia-340 340.102-0ubuntu0.16.04.2: nvidia-340 kernel module failed to build [nv-linux.h:199:2: error: #error "This driver requires the ability to change memory types!"]

Bug #1741671 reported by naggis
176
This bug affects 38 people
Affects Status Importance Assigned to Milestone
linux-hwe (Ubuntu)
Expired
Undecided
Unassigned
nvidia-graphics-drivers-304 (Ubuntu)
Expired
Undecided
Unassigned
nvidia-graphics-drivers-340 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

not compiling after installation of linux-image-4.13.0-21-generic

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: nvidia-340 340.102-0ubuntu0.16.04.2
ProcVersionSignature: Ubuntu 4.4.0-97.120-generic 4.4.87
Uname: Linux 4.4.0-97-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
.proc.driver.nvidia.gpus.0000.01.00.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:01:00.0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.102 Mon Jan 16 13:06:29 PST 2017
 GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)
.tmp.unity_support_test.0:

ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
DKMSKernelVersion: 4.13.0-21-generic
Date: Sat Jan 6 18:36:58 2018
DistUpgraded: Fresh install
DistroCodename: xenial
DistroVariant: ubuntu
DuplicateSignature: dkms:nvidia-340:340.102-0ubuntu0.16.04.2:/var/lib/dkms/nvidia-340/340.102/build/nv-linux.h:199:2: error: #error "This driver requires the ability to change memory types!"
GraphicsCard:
 NVIDIA Corporation GT216M [GeForce GT 230M] [10de:0a28] (rev a2) (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company GT216M [GeForce GT 230M] [103c:363c]
InstallationDate: Installed on 2016-04-26 (619 days ago)
InstallationMedia: Ubuntu 14.04.4 LTS "Trusty Tahr" - Release amd64 (20160217.1)
MachineType: Hewlett-Packard HP Pavilion dv7 Notebook PC
PackageVersion: 340.102-0ubuntu0.16.04.2
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-97-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.3
 apt 1.2.24
SourcePackage: nvidia-graphics-drivers-340
Title: nvidia-340 340.102-0ubuntu0.16.04.2: nvidia-340 kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/05/2010
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: F.1D
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 363C
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 32.25
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnHewlett-Packard:bvrF.1D:bd10/05/2010:svnHewlett-Packard:pnHPPaviliondv7NotebookPC:pvr039E200000241310000020000:rvnHewlett-Packard:rn363C:rvr32.25:cvnHewlett-Packard:ct10:cvrN/A:
dmi.product.name: HP Pavilion dv7 Notebook PC
dmi.product.version: 039E200000241310000020000
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz 1:0.9.12.2+16.04.20160823-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.83-1~16.04.1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.2.4-0ubuntu1~16.04.2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 17.2.4-0ubuntu1~16.04.2
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.18.4-0ubuntu0.7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.1-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.7.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20160325-1ubuntu1.2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.12-1build2
xserver.bootTime: Sat Jan 6 18:17:29 2018
xserver.configfile: default
xserver.errors: open /dev/fb0: No such file or directory
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:

xserver.version: 2:1.18.4-0ubuntu0.7

Revision history for this message
naggis (joseph-spagnol) wrote :
tags: removed: need-duplicate-check
summary: nvidia-340 340.102-0ubuntu0.16.04.2: nvidia-340 kernel module failed to
- build
+ build [nv-linux.h:199:2: error: #error "This driver requires the ability
+ to change memory types!"]
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: New → Confirmed
Revision history for this message
layingback (laying-back) wrote :

Same problem (as determined by automated reporting which dumped me here). Occurred during the Meltdown Security update of 16.04.03 install to Kernel 4.13.

Will attempt switch to non-nvidia driver before restart.

Revision history for this message
Mikko Nahkola (mnahkola) wrote :

Same as previous user.

Sort of a bother, this old luggable with the Quadro GPU is still a fairly decent machine despite its age... hope there'll be a fix for the driver.

Revision history for this message
summoner (ssummoner) wrote :

Confirmed!

Same here. I have an nVidia Geforce 9800 GT. After the 4.13 kernel update the nVidia 340 binary driver goes wrong... Changed to x-org driver that work fine.

I hope there'll be a fix for the 4.13 kernel.

Revision history for this message
Serg (avsa1107) wrote :

Confirmed!
Same as previous user.

Revision history for this message
Stefan (stefanduelist) wrote :

Resorted to boot with old kernel image from GRUB menu as a workaround. I hope this gets fixed soon.

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

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

Changed in linux-hwe (Ubuntu):
status: New → Confirmed
Revision history for this message
fife (fife0) wrote :

I also have a Geforce 9800 GT and am equally frustrated by the apparent gpu driver vs latest linux kernel conflict. This may fall on nvidia to update their drivers to include a 4.13 patch. Last update for 304.104 was September 2017.

The following may be informative:

"Legacy GPUs are older-generation NVIDIA GPUs which are no longer supported in the regular NVIDIA Unified UNIX Graphics Driver. Instead, these GPUs will continue to be supported through special "Legacy GPU" drivers that will be updated periodically to add support for new versions of Linux system components (e.g., new Linux kernels, new versions of the X server, etc)."
(http://www.nvidia.com/object/IO_32667.html)

"The Linux 340.* legacy driver series is the last to support the G8x, G9x, and GT2xx GPUs, and motherboard chipsets based on them. Support for new Linux kernels and X servers, as well as fixes for critical bugs, will be included in 340.* legacy releases through the end of 2019.

The Linux 304.* legacy driver series is the last to support the NV4x and G7x GPUs and motherboard chipsets based on them. Support for new Linux kernels and X servers, as well as fixes for critical bugs, will be included in 304.* legacy releases through the end of 2017."
(http://nvidia.custhelp.com/app/answers/detail/a_id/3142)

Latest drive list: http://www.nvidia.com/object/unix.html

Revision history for this message
Diogo Gomes (diogogomes) wrote :

This is really bad for one of my computers.

The open source drivers crash the system since a few years ago and after this update I can't use the proprietary drivers there.

Boot with old kernel image from GRUB menu do not seems a workaround because after the Meltdown and Spectre we can't stand with an outdated kernel.

Revision history for this message
Richard Collins (rcollins0618) wrote :

nVidia GeForce GTX 750Ti
Ubuntu 16.04 LTS Desktop amd64

Before Restart:
uname -a: Linux Dell-Precision-3620 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Richard Collins (rcollins0618) wrote :

going back to 4.10 works. Otherwise, everything appears as normal except I can't login to any of my user accounts (local machine, ubuntu usernames). Logging in appears to work, and then I'm back to the login screen again.

Revision history for this message
emmanuel okeke (emmanix2002) wrote :

Started having the same issues today after updating to the linux-image-4.13.0-26-generic.
Had to remove the binary driver, and switch to the X.Org version temporarily.

Revision history for this message
Martin Segado (msegado) wrote :

Looks like it's already been fixed in xenial-proposed**. As a workaround until the new version appears in the main repos, open a terminal (Ctrl + Alt + T) and type:

    # Add xenial-proposed source:
    echo "deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main multiverse universe" \
      | sudo tee /etc/apt/sources.list.d/xenial-proposed.list
    sudo apt update

    # Install the updated package:
    sudo apt -t xenial-proposed install nvidia-340

    # Remove xenial-proposed source:
    sudo rm /etc/apt/sources.list.d/xenial-proposed.list
    sudo apt update

Hope that helps,
Martin

** see https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/340.104-0ubuntu0.16.04.1

Revision history for this message
Matt Austin (mattaustin) wrote :

Thank you - I can confirm that installing nvidia-340 from xenial-proposed resolved this for me.

Revision history for this message
Matt Austin (mattaustin) wrote :

Possible duplicate of #1724872.

Revision history for this message
Bruno (bruno-42) wrote :

Martin's solution worked for me on 16.04.3 LTS with kernel 4.13.0-26.29~16.04.2 giving me nvidia-340 340.104-0ubuntu0.16.04.1
Thx!

Revision history for this message
Massimo (capitan-zap) wrote :

Martin's solution worked for me on 16.04.3 LTS with kernel 4.13.0-26.29~16.04.2 giving me nvidia-340 340.104-0ubuntu0.16.04.1
Thx! Grazie

Revision history for this message
Adrian Moise (adisah) wrote :

Martin's solution worked for me on 16.04.3 LTS

Revision history for this message
summoner (ssummoner) wrote :

Confirmed!

Martin's solution worked for me on 16.04.3 LTS

Revision history for this message
emmanuel okeke (emmanix2002) wrote :

Martin's solution solves it for me on Ubuntu 16.04.3

Revision history for this message
MauRice (dalmagro) wrote :

I solved the 340.120 issue with kernel 4.13.0-26-generic Ubuntu 16.04.3 LTS ....

Boot with an older kernel, download this patch:

https://devtalk.nvidia.com/default/topic/1019362/fully-working-patch-for-nvidia-driver-340-102-compiler-installer-file-and-linux-kernel-4-12/

Rename and copy the patch in /usr/src/nvidia-340-340.102/patches/buildfix_kernel-4.12.patch
Modified the dkms.conf by disable patch 4.9 & 4.10 and enable only patch 4.12.

Part of the dkms.conf:

....
#PATCH[0]="buildfix_kernel_4.9.patch"
#PATCH[1]="buildfix_kernel_4.10.patch"
PATCH[0]="buildfix_kernel_4.12.patch"
#PATCH_MATCH[0]="^3.[8-9]"
....

Build and Install the kernel module:
 sudo dkms build -m nvidia-340 -v 340.102 -k 4.13.0-26-generic
 sudo dkms install -m nvidia-340 -v 340.102 -k 4.13.0-26-generic

Reboot

Revision history for this message
Andrey Filchenkov (radren) wrote :

I fixed a problem using this commands:

    # Show all posible drivers
    sudo ubuntu-drivers devices

    # Choose another one
    sudo apt install nvidia-384

    rm .Xauthority .ICEauthority

After that Ubuntu started.

Diogo Gomes (diogogomes)
Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: New → Confirmed
status: Confirmed → Fix Committed
status: Fix Committed → Confirmed
Revision history for this message
Sam Van den Eynde (samvde) wrote :

Bug and workaround https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1741671/comments/14 confirmed on older NVidia ION machine with nvidia-340 on kernel 4.13.0-26.

Thanks guys!!

Revision history for this message
Régis Desgroppes (rdesgroppes) wrote :

Martin's solution worked for me

Revision history for this message
Chris Franklin (jcfranklin2038) wrote :

Martin's solution worked for me on 16.04.3 LTS with kernel 4.13.0-26.29~16.04.2 giving me nvidia-340 340.104-0ubuntu0.16.04.1
Thanks!

Revision history for this message
Ruslan Kovtun (koutoftimer) wrote :

Martin's solution worked for me

    $ uname -r
    4.13.0-26-generic

Revision history for this message
Nat Wyatt (natwyatt) wrote :

I solved it with this:

sudo apt install nvidia-304-updates

(4.13.0-26-generic; Quadro NVS 290)

That got me to 304.135-0ubuntu0.16.04.2. Latest on nvidia.com/object/unix.html is 340.137 2017.9.19.

I don't know if either of them have the Meltdown/Spectre fixes.

Revision history for this message
Jason (jshortall) wrote :

It still doesn't work with Xinerama.

I have two nvidia gpu's running 3 screens. Only one gpu works without enabling xinerama, and when I enable it, Ubuntu crashes immediately after login and bumps me back out to the login screen.

Revision history for this message
Linard Verstraete (linardv) wrote :

Last week the fixed version of nvidia-340 (340.104-0ubuntu0.16.04.1) that resolves this bug has landed in xenial-updates. Just as the previous comments and people before me, this fixed the reported issue.

So what are the remaining steps to close this bug report?

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hello,
this bug report is quite old, do you still have this issue with the nvidia driver with latest kernel?
Thanks

Changed in linux-hwe (Ubuntu):
status: Confirmed → Incomplete
Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: Confirmed → Incomplete
Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
mvsfrasson (mvsfrasson) wrote : Re: [Bug 1741671] Re: nvidia-340 340.102-0ubuntu0.16.04.2: nvidia-340 kernel module failed to build [nv-linux.h:199:2: error: #error "This driver requires the ability to change memory types!"]

Hi

I don't have access to that hardware anymore. So I do not have issues with
it.

Thanks

Miguel

Em seg., 9 de nov. de 2020 às 05:46, Po-Hsu Lin <email address hidden>
escreveu:

> Hello,
> this bug report is quite old, do you still have this issue with the nvidia
> driver with latest kernel?
> Thanks
>
> ** Changed in: linux-hwe (Ubuntu)
> Status: Confirmed => Incomplete
>
> ** Changed in: nvidia-graphics-drivers-304 (Ubuntu)
> Status: Confirmed => Incomplete
>
> ** Changed in: nvidia-graphics-drivers-340 (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1741671
>
> Title:
> nvidia-340 340.102-0ubuntu0.16.04.2: nvidia-340 kernel module failed
> to build [nv-linux.h:199:2: error: #error "This driver requires the
> ability to change memory types!"]
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/linux-hwe/+bug/1741671/+subscriptions
>

--
Miguel Vinicius Santini Frasson
<email address hidden>

Revision history for this message
Linard Verstraete (linardv) wrote :

Hi Po-Hsu Lin,

As mentioned in comment #30, the fix for nvidia-340 has been released and available in xenial-updates since January 2018. I can confirm on the relevant hardware it has been working ever since.

I can't comment for another package channel or nvidia-304.

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

[Expired for nvidia-graphics-drivers-304 (Ubuntu) because there has been no activity for 60 days.]

Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nvidia-graphics-drivers-340 (Ubuntu) because there has been no activity for 60 days.]

Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux-hwe (Ubuntu) because there has been no activity for 60 days.]

Changed in linux-hwe (Ubuntu):
status: Incomplete → Expired
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.