SRU Request: nvidia-*: nvidia-* kernel module failed to build [error: too many arguments to function ‘get_user_pages’]

Bug #1573508 reported by khanpakpum@gmail.com on 2016-04-22
290
This bug affects 55 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-304 (Ubuntu)
Trusty
High
Alberto Milone
Xenial
High
Alberto Milone
nvidia-graphics-drivers-340 (Ubuntu)
High
Unassigned
Trusty
High
Alberto Milone
Xenial
High
Alberto Milone
nvidia-graphics-drivers-384 (Ubuntu)
Trusty
High
Alberto Milone
Xenial
High
Alberto Milone

Bug Description

SRU Request:

[Impact]
A commit that was backported to the latest 4.4 kernel, broke compatibility with the NVIDIA drivers in Xenial and in Trusty.

[Test Case]
1) Enable the -proposed repository, and install the new 4.4 kernel image and headers, and one of the NVIDIA drivers (304, 340, 384)

2) Check that the kernel module can be built against the new kernel.

3) Restart your computer, and see if everything works correctly when accessing the desktop.

[Regression Potential]
Low.

___________________________

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: nvidia-361 361.42-0ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
DKMSKernelVersion: 4.6.0-040600rc4-lowlatency
Date: Fri Apr 22 15:43:10 2016
DuplicateSignature: dkms:nvidia-361:361.42-0ubuntu2:/var/lib/dkms/nvidia-361/361.42/build/nvidia/os-mlock.c:119:11: error: too many arguments to function ‘get_user_pages’
InstallationDate: Installed on 2016-04-22 (0 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageVersion: 361.42-0ubuntu2
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1
 apt 1.2.10ubuntu1
SourcePackage: nvidia-graphics-drivers-361
Title: nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

tags: removed: need-duplicate-check
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers-361 (Ubuntu):
status: New → Confirmed
summary: nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build
+ [error: too many arguments to function ‘get_user_pages’]
Changed in nvidia-graphics-drivers-361 (Ubuntu):
importance: Undecided → High
Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: New → Confirmed

Hey there,

I created a patch which updates os-mlock.c to adjust for the changes made on the kernel-side in get_user_pages() (include/linux/mm.h). However, I do not have a deep understanding of why the first 2 parameters of get_user_pages() were removed which is why this solution needs to be tested thoroughly. The patch was done for nvidia-driver v340.96 as this is the version I use on my system. However, the patch might also be applicable for newer releases of the nvidia driver. After applying the patch an additional "sudo dpkg-reconfigure nvidia-legacy-340xx-kernel-dkms" was enough to get the kernel module to work. The patch must me applied inside /usr/src/nvidia-legacy-340xx-340.96 (I am on debian - the actual path on ubuntu could be different). I hope I could help.

Cheers, chris

The attachment "Patch for os-mlock.c" 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

Thans
Op 24 mei 2016 18:35 schreef "Ubuntu Foundations Team Bug Bot" <
<email address hidden>>:

> The attachment "Patch for os-mlock.c" 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
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1573508
>
> Title:
> nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build
> [error: too many arguments to function ‘get_user_pages’]
>
> Status in nvidia-graphics-drivers-340 package in Ubuntu:
> Confirmed
> Status in nvidia-graphics-drivers-361 package in Ubuntu:
> Confirmed
>
> Bug description:
> NA
>
> ProblemType: Package
> DistroRelease: Ubuntu 16.04
> Package: nvidia-361 361.42-0ubuntu2
> ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
> Uname: Linux 4.4.0-21-generic x86_64
> NonfreeKernelModules: wl
> ApportVersion: 2.20.1-0ubuntu2
> Architecture: amd64
> DKMSKernelVersion: 4.6.0-040600rc4-lowlatency
> Date: Fri Apr 22 15:43:10 2016
> DuplicateSignature:
> dkms:nvidia-361:361.42-0ubuntu2:/var/lib/dkms/nvidia-361/361.42/build/nvidia/os-mlock.c:119:11:
> error: too many arguments to function ‘get_user_pages’
> InstallationDate: Installed on 2016-04-22 (0 days ago)
> InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64
> (20160420.1)
> PackageVersion: 361.42-0ubuntu2
> RelatedPackageVersions:
> dpkg 1.18.4ubuntu1
> apt 1.2.10ubuntu1
> SourcePackage: nvidia-graphics-drivers-361
> Title: nvidia-361 361.42-0ubuntu2: nvidia-361 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/1573508/+subscriptions
>

Changed in nvidia-graphics-drivers-340 (Ubuntu):
importance: Undecided → High
mariojuniorjp (mariojuniorjp) wrote :

The patch posted by Christian not work for me on kernel 4.6.2 with Nvidia 340.96.

Mohammad (mohamad-kav) wrote :
Download full text (4.3 KiB)

Sorry but the patch returned other errors:

/var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c: In function ‘os_lock_user_pages’:
/usr/src/linux-4.6.2-1/arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
 #define current get_current()
                 ^
/var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:119:26: note: in expansion of macro ‘current’
     ret = get_user_pages(current, mm, (unsigned long)address,
                          ^
In file included from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-pgprot.h:17:0,
                 from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-linux.h:17,
                 from /var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:15:
/usr/src/linux-4.6.2-1/include/linux/mm.h:1266:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^
/var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:119:35: warning: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
     ret = get_user_pages(current, mm, (unsigned long)address,
                                   ^
In file included from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-pgprot.h:17:0,
                 from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-linux.h:17,
                 from /var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:15:
/usr/src/linux-4.6.2-1/include/linux/mm.h:1266:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^
/var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:120:25: warning: passing argument 5 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
             page_count, write, force, user_pages, NULL);
                         ^
In file included from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-pgprot.h:17:0,
                 from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-linux.h:17,
                 from /var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:15:
/usr/src/linux-4.6.2-1/include/linux/mm.h:1266:6: note: expected ‘struct page **’ but argument is of type ‘NvBool {aka unsigned char}’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^
/var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:120:32: warning: passing argument 6 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
             page_count, write, force, user_pages, NULL);
                                ^
In file included from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-pgprot.h:17:0,
                 from /var/lib/dkms/nvidia/361.42/build/common/inc/nv-linux.h:17,
                 from /var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:15:
/usr/src/linux-4.6.2-1/include/linux/mm.h:1266:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘NvBool {aka unsigned char}’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^
/var/lib/dkms/nvidia/361.42/build/nvidia/os-mlock.c:11...

Read more...

Aleksander (a-h-burzec) on 2016-07-01
Changed in nvidia-graphics-drivers-361 (Ubuntu):
assignee: nobody → Aleksander (a-h-burzec)
assignee: Aleksander (a-h-burzec) → nobody
Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Mark (mark-k) wrote :

I'm using Lubuntu 16.04 x86-64 with kernel 4.7.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/ and the 304-series Nvidia driver.

I solved this problem without needing to manually apply patches, by downloading and installing the current nvidia-304 package for 16.10:
https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/304.131-0ubuntu5/+build/10627168/+files/nvidia-304_304.131-0ubuntu5_amd64.deb

Same success with the 340-series driver from
https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/340.96-0ubuntu6/+build/9872860/+files/nvidia-340_340.96-0ubuntu6_amd64.deb

Can someone at Canonical just update the nvidia-304 & nvidia-340 etc. packages for Xenial to the ones for Yakkety (16.10)? They seem to work fine.

Mark (mark-k) wrote :

Some more details to my previous comment #9...

While installing the 16.10/Yakkety nvidia-340_340.96-0ubuntu6_amd64.deb did get the Nvidia driver working, as shown by the Nvidia logo before the desktop appears, there must have been something slightly amiss about the installation.

On trying to run certain programs (e.g. Steam), I got an error message mentioning libGL and swrast. Maybe some symbolic link wasn't made correctly for 16.04 when installing the 16.10 package??? glxgears did seem to work OK however.

So that solution isn't perfect, but if someone more knowledgeable than me wants to give it a try, the problem could probably be easily fixed.

Lorenzo Bettini (bettini) wrote :

you may want to try to run

sudo update-alternatives --config i386-linux-gnu_gl_conf

Mark (mark-k) wrote :

Thanks.

After I uninstalled the 16.04 nvidia-340 package, rebooted (so using Nouveau), then installed the nvidia-340_340.96-0ubuntu6_amd64.deb package, Steam and other programs seem to be working fine now.

summary: - nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build
- [error: too many arguments to function ‘get_user_pages’]
+ nvidia-*: nvidia-* kernel module failed to build [error: too many
+ arguments to function ‘get_user_pages’]
Changed in nvidia-graphics-drivers-384 (Ubuntu):
status: New → Confirmed
importance: Undecided → High
tags: added: bugpattern-written
Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: Confirmed → Triaged
status: Triaged → Invalid
Changed in nvidia-graphics-drivers-304 (Ubuntu Trusty):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Changed in nvidia-graphics-drivers-304 (Ubuntu Xenial):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Changed in nvidia-graphics-drivers-340 (Ubuntu Trusty):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Changed in nvidia-graphics-drivers-340 (Ubuntu Xenial):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Changed in nvidia-graphics-drivers-361 (Ubuntu Trusty):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
no longer affects: nvidia-graphics-drivers-361 (Ubuntu)
Changed in nvidia-graphics-drivers-384 (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
status: Confirmed → In Progress
Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: Confirmed → Invalid
Changed in nvidia-graphics-drivers-384 (Ubuntu Trusty):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Changed in nvidia-graphics-drivers-361 (Ubuntu Trusty):
assignee: Alberto Milone (albertomilone) → nobody
status: In Progress → Invalid
Changed in nvidia-graphics-drivers-361 (Ubuntu Xenial):
status: New → Invalid
Changed in nvidia-graphics-drivers-384 (Ubuntu Xenial):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Changed in nvidia-graphics-drivers-384 (Ubuntu):
status: In Progress → Invalid

Hello <email address hidden>, or anyone else affected,

Accepted nvidia-graphics-drivers-304 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/304.135-0ubuntu0.16.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nvidia-graphics-drivers-304 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Andy Whitcroft (apw) wrote :

Hello <email address hidden>, or anyone else affected,

Accepted nvidia-graphics-drivers-384 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-384/384.130-0ubuntu0.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nvidia-graphics-drivers-384 (Ubuntu Xenial):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello <email address hidden>, or anyone else affected,

Accepted nvidia-graphics-drivers-340 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/340.107-0ubuntu0.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nvidia-graphics-drivers-340 (Ubuntu Xenial):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello <email address hidden>, or anyone else affected,

Accepted nvidia-graphics-drivers-384 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-384/384.130-0ubuntu0.14.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nvidia-graphics-drivers-384 (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed-trusty
Changed in nvidia-graphics-drivers-304 (Ubuntu Trusty):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello <email address hidden>, or anyone else affected,

Accepted nvidia-graphics-drivers-304 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/304.135-0ubuntu0.14.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Andy Whitcroft (apw) wrote :

Hello <email address hidden>, or anyone else affected,

Accepted nvidia-graphics-drivers-340 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/340.107-0ubuntu0.14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nvidia-graphics-drivers-340 (Ubuntu Trusty):
status: In Progress → Fix Committed
Andy Whitcroft (apw) on 2019-03-08
tags: added: verification-needed-xenial
removed: verification-failed-xenial
description: updated
summary: - nvidia-*: nvidia-* kernel module failed to build [error: too many
- arguments to function ‘get_user_pages’]
+ SRU Request: nvidia-*: nvidia-* kernel module failed to build [error:
+ too many arguments to function ‘get_user_pages’]
Jarno Suni (jarnos) wrote :

Fixed in 340.107-0ubuntu0.16.04.2

tags: added: verification-done-xenial
removed: verification-needed-xenial
no longer affects: nvidia-graphics-drivers-361 (Ubuntu Trusty)
no longer affects: nvidia-graphics-drivers-304 (Ubuntu)
Mathew Hodson (mathew-hodson) wrote :

Why was nvidia-361 for Xenial marked invalid? That was the version that opened this bug.

no longer affects: nvidia-graphics-drivers-384 (Ubuntu)
Mathew Hodson (mathew-hodson) wrote :

Nevermind, I see that this bug was opened a while ago, and nvidia-361 has since transitioned.

no longer affects: nvidia-graphics-drivers-361 (Ubuntu Xenial)
Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: Invalid → Fix Released
Dimez (koptev) on 2019-03-13
Changed in nvidia-graphics-drivers-304 (Ubuntu Trusty):
status: Fix Committed → Confirmed
status: Confirmed → Fix Committed
Stefan Bader (smb) wrote :

I did at least check the dkms install step on a trusty VM with lts-xenial kernel installed and the nvidia-304 driver installed. That did succeed. Similar testing for nvidia-340 and -384 but those were done for xenial VMs.

Stefan Bader (smb) on 2019-03-14
tags: added: verification-done verification-done-trusty
removed: verification-needed verification-needed-trusty
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-304 - 304.135-0ubuntu0.16.04.3

---------------
nvidia-graphics-drivers-304 (304.135-0ubuntu0.16.04.3) xenial; urgency=medium

  * debian/dkms_nvidia/patches/buildfix_kernel_4.10.patch:
    - Remove part that affected get_user_pages.
  * debian/dkms_nvidia/patches/buildfix_kernel_4.4_get_user_pages.patch:
   - Add support for backported 7 argument linux get_user_pages call (LP: #1573508).

 -- Alberto Milone <email address hidden> Mon, 04 Mar 2019 12:55:36 +0100

Changed in nvidia-graphics-drivers-304 (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for nvidia-graphics-drivers-304 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-384 - 384.130-0ubuntu0.16.04.2

---------------
nvidia-graphics-drivers-384 (384.130-0ubuntu0.16.04.2) xenial; urgency=medium

  * debian/templates/dkms_nvidia.conf.in,
    debian/dkms_nvidia/patches/buildfix_kernel_4.4_get_user_pages.patch:
    - Add support for new 7 argument get_user_pages() (LP: #1573508).

 -- Alberto Milone <email address hidden> Mon, 04 Mar 2019 11:02:10 +0100

Changed in nvidia-graphics-drivers-384 (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-340 - 340.107-0ubuntu0.16.04.2

---------------
nvidia-graphics-drivers-340 (340.107-0ubuntu0.16.04.2) xenial; urgency=medium

  * debian/templates/dkms_nvidia.conf.in:
    - Re-enable buildfix_kernel_4.11.patch (LP: #1819077).

nvidia-graphics-drivers-340 (340.107-0ubuntu0.16.04.1) xenial; urgency=medium

  * New upstream release:
    - Added support for X.Org xserver ABI 24 (xorg-server 1.20).
    - Improved nvidia-bug-report.sh to check for kern.log which is
      the default kernel log-file location for many Debian-based
      Linux distributions.
    - Fixed a bug which could cause X servers that export a Video
      Driver ABI earlier than 0.8 to crash when running X11
      applications which call XRenderAddTraps().
  * debian/templates/dkms_nvidia.conf.in,
    debian/dkms_nvidia/patches/buildfix_kernel_4.4_get_user_pages.patch:
   - Drop buildfix_kernel_4.11.patch.
   - Add support for new 7 argument get_user_pages() (LP: #1573508).
  * debian/substvars:
   - Add support for X ABI 24.

 -- Alberto Milone <email address hidden> Fri, 08 Mar 2019 12:04:12 +0100

Changed in nvidia-graphics-drivers-340 (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-384 - 384.130-0ubuntu0.14.04.2

---------------
nvidia-graphics-drivers-384 (384.130-0ubuntu0.14.04.2) trusty; urgency=medium

  * debian/templates/dkms_nvidia.conf.in,
    debian/dkms_nvidia/patches/buildfix_kernel_4.4_get_user_pages.patch:
    - Add support for new 7 argument get_user_pages() (LP: #1573508).

 -- Alberto Milone <email address hidden> Mon, 04 Mar 2019 11:10:42 +0100

Changed in nvidia-graphics-drivers-384 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-304 - 304.135-0ubuntu0.14.04.2

---------------
nvidia-graphics-drivers-304 (304.135-0ubuntu0.14.04.2) trusty; urgency=medium

  * debian/dkms_nvidia/patches/buildfix_kernel_4.10.patch:
    - Remove part that affected get_user_pages.
  * debian/dkms_nvidia/patches/buildfix_kernel_4.4_get_user_pages.patch:
   - Add support for backported 7 argument linux get_user_pages call (LP: #1573508).

 -- Alberto Milone <email address hidden> Fri, 01 Mar 2019 19:30:07 +0100

Changed in nvidia-graphics-drivers-304 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-340 - 340.107-0ubuntu0.14.04.1

---------------
nvidia-graphics-drivers-340 (340.107-0ubuntu0.14.04.1) trusty; urgency=medium

  * New upstream release:
    - Added support for X.Org xserver ABI 24 (xorg-server 1.20).
    - Improved nvidia-bug-report.sh to check for kern.log which is
      the default kernel log-file location for many Debian-based
      Linux distributions.
    - Fixed a bug which could cause X servers that export a Video
      Driver ABI earlier than 0.8 to crash when running X11
      applications which call XRenderAddTraps().
  * debian/templates/dkms_nvidia.conf.in,
    debian/dkms_nvidia/patches/buildfix_kernel_4.4_get_user_pages.patch:
   - Drop buildfix_kernel_4.9.patch and buildfix_kernel_4.10.patch.
   - Add support for new 7 argument get_user_pages() (LP: #1573508).
  * debian/substvars:
   - Add support for X ABI 24.

 -- Alberto Milone <email address hidden> Mon, 04 Mar 2019 11:18:48 +0100

Changed in nvidia-graphics-drivers-340 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Robert Hooker (sarvatt) wrote :

Thanks for fixing this Alberto

Stefan Engstrom (stefan23) wrote :
Download full text (4.0 KiB)

I get directed to this issue when I try to install nvidia-driver-390 in a fresh install.

The kernel module compile fails with things like this:

```Building for 4.18.0-16-generic
Building for architecture x86_64
Building initial module for 4.18.0-16-generic
ERROR (dkms apport): There was a segmentation fault when trying to build the module
Error! Bad return status for module build on kernel: 4.18.0-16-generic (x86_64)
Consult /var/lib/dkms/nvidia/390.116/build/make.log for more information.```

The make log contains some dangerous sounding compiler panics:
``` cc -Wp,-MD,/var/lib/dkms/nvidia/390.116/build/nvidia/.nv_uvm_interface.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -mrecord-mcount -I/var/lib/dkms/nvidia/390.116/build/common/inc -I/var/lib/dkms/nvidia/390.116/build -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"390.116\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Wno-sign-compare -Wno-format-extra-args -Werror=undef -I/var/lib/dkms/nvidia/390.116/build/nvidia -DNV_BUILD_MODULE_INSTANCES=0 -DNVIDIA_UNDEF_LEGACY_BIT_MACROS -UDEBUG -U_DEBUG -DNDEBUG -DMODULE -DKBUILD_BASENAME='"nv_uvm_interface"' -DKBUILD_MODNAME='"nvidia"' -c -o /var/lib/dkms/nvidia/390.116/build/nvidia/nv_uvm_interface.o /var/lib/dkms/nvidia/390.116/build/nvidia/nv_uvm_interface.c
In fil...

Read more...

Stefan Engstrom (stefan23) wrote :

... a fresh install of Ubuntu desktop 18.10 (forgot to mention that in post above)

Download full text (3.4 KiB)

A buddy asked me to add that he's also unable to build - Trusty (14.04.5).

...
ld -r -o /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-modeset/nvidia-modeset-linux.o
  LD [M] /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-modeset.o
/tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.c: In function ‘nvidia_drm_lock_user_pages’:
/tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.c:140:5: warning: passing argument 6 of ‘get_user_pages’ makes pointer from integer without a cast [enabled by default]
     pages_pinned = NV_GET_USER_PAGES(address, pages_count, write, force,
     ^
In file included from include/linux/scatterlist.h:7:0,
                 from include/linux/dma-mapping.h:10,
                 from include/drm/drmP.h:37,
                 from /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-os-interface.h:32,
                 from /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.c:27:
include/linux/mm.h:1222:6: note: expected ‘struct page **’ but argument is of type ‘int’
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
/tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.c:140:5: warning: passing argument 7 of ‘get_user_pages’ from incompatible pointer type [enabled by default]
     pages_pinned = NV_GET_USER_PAGES(address, pages_count, write, force,
     ^
In file included from include/linux/scatterlist.h:7:0,
                 from include/linux/dma-mapping.h:10,
                 from include/drm/drmP.h:37,
                 from /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-os-interface.h:32,
                 from /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.c:27:
include/linux/mm.h:1222:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
/tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.c:140:5: error: too many arguments to function ‘get_user_pages’
     pages_pinned = NV_GET_USER_PAGES(address, pages_count, write, force,
     ^
In file included from include/linux/scatterlist.h:7:0,
                 from include/linux/dma-mapping.h:10,
                 from include/drm/drmP.h:37,
                 from /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-os-interface.h:32,
                 from /tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.c:27:
include/linux/mm.h:1222:6: note: declared here
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
make[2]: *** [/tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel/nvidia-drm/nvidia-drm-linux.o] Error 1
make[2]: Target `__build' not remade because of errors.
make[1]: *** [_module_/tmp/selfgz3636/NVIDIA-Linux-x86_64-367.35/kernel] Error 2
make[1]: Target `modules' not remade because of errors.
make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-143-generic'
make: ...

Read more...

Alberto Milone (albertomilone) wrote :

@Stefan: the first error looks like a bug in the compiler. As for the second error, the 367.35 driver is not in the Ubuntu archive, therefore we have no control over it.

@Alberto, you're right. After talking to him and getting more info I understand he's using an old closed source driver he needs to update.

My apologies.

To post a comment you must log in.