driver installation might not build initramfs then cause dark screen after switching to nvidia

Bug #1717151 reported by Alex Tu
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Critical
Alex Tu
nvidia-graphics-drivers-384 (Ubuntu)
Fix Released
High
Alberto Milone
Xenial
Fix Released
High
Alberto Milone
Zesty
Fix Released
High
Alberto Milone
Artful
Fix Released
High
Alberto Milone

Bug Description

SRU Request:

[Impact]
When power saving mode is enabled, the initramfs will not be update, thus leading to a potential API mismatch between kernelspace and userspace.

[Test Case]

1) Make sure the nvidia packages are installed, and enable power saving mode:
sudo prime-select intel

2) Enable the -proposed repository, and install the new "nvidia-384"

3) Check that the initramfs is updated.

4) Restart your computer and see if the driver works correctly (you should be able to access the desktop session)

[Regression Potential]
Low, as updating the initramfs is always the (intended) default behaviour.
_______________________________

Note: without fix be landed , nvidia driver online update could be failed.

nvidia-375.postinst not always build initramfs by default:
"
        ALTERNATIVE=$(readlink /etc/alternatives/x86_64-linux-gnu_gl_conf)
        if [ "$ALTERNATIVE" = "/usr/lib/nvidia-375/ld.so.conf" ]; then
            # Update initramfs so that the blacklist ends up in the initramfs
            if [ -x /usr/sbin/update-initramfs ]; then
                /usr/sbin/update-initramfs -u
"

it the case of user who are using intel then update driver from nvidia-375.20 to nvidia-375.82 will get screen dark after prime-select nvidia later.

syslog:
"
NVRM: loading NVIDIA UNIX x86_64 Kernel Module 375.20 Tue Nov 15 16:49:10 PST 2016 (using threaded interrupts)
......
NVRM: API mismatch: the client has the version 375.82, but
NVRM: this kernel module has the version 375.20. Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.
"

The root cause is the nvidia kernel module in initramfs not be updated in this case.

impacted issues:
LP: #1653592

CVE References

Revision history for this message
Alex Tu (alextu) wrote :

the patch I proposed would be to force update initramfs:

diff --git a/debian/templates/nvidia-graphics-drivers.postinst.in b/debian/templates/nvidia-graphics-drivers.postinst.in
index 06242bb..e7933e3 100644
--- a/debian/templates/nvidia-graphics-drivers.postinst.in
+++ b/debian/templates/nvidia-graphics-drivers.postinst.in
@@ -208,15 +208,13 @@ case "$1" in
         NEWEST_KERNEL=$(get_newest_kernel "$KERNELS")

         ALTERNATIVE=$(readlink /etc/alternatives/#DEB_HOST_MULTIARCH#_gl_conf)
- if [ "$ALTERNATIVE" = "#LDSOCONF#" ]; then
- # Update initramfs so that the blacklist ends up in the initramfs
- if [ -x /usr/sbin/update-initramfs ]; then
- /usr/sbin/update-initramfs -u
-
- if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
- # This can fail when dealing with a chroot see LP: #556653
- /usr/sbin/update-initramfs -u -k $CURRENT_KERNEL
- fi
+ # Update initramfs so that the blacklist ends up in the initramfs
+ if [ -x /usr/sbin/update-initramfs ]; then
+ /usr/sbin/update-initramfs -u
+
+ if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
+ # This can fail when dealing with a chroot see LP: #556653
+ /usr/sbin/update-initramfs -u -k $CURRENT_KERNEL
             fi
         fi

Changed in oem-priority:
assignee: nobody → Alex Tu (alextu)
importance: Undecided → Critical
status: New → Confirmed
Alex Tu (alextu)
description: updated
tags: added: xenial
Alex Tu (alextu)
description: updated
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

@albertomilone, can you check this bug ?

tags: added: risk
Revision history for this message
Alberto Milone (albertomilone) wrote :

I thought I had already fixed this.

I'm ok with the change Alex proposed, and I'll include it soon.

Changed in nvidia-graphics-drivers-375 (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
affects: nvidia-graphics-drivers-375 (Ubuntu) → nvidia-graphics-drivers-384 (Ubuntu)
Changed in nvidia-graphics-drivers-384 (Ubuntu):
importance: Undecided → High
status: New → In Progress
Changed in nvidia-graphics-drivers-384 (Ubuntu Xenial):
status: New → In Progress
Changed in nvidia-graphics-drivers-384 (Ubuntu Zesty):
status: New → In Progress
Changed in nvidia-graphics-drivers-384 (Ubuntu Artful):
status: New → In Progress
Changed in nvidia-graphics-drivers-384 (Ubuntu Xenial):
importance: Undecided → High
Changed in nvidia-graphics-drivers-384 (Ubuntu Zesty):
importance: Undecided → High
Changed in nvidia-graphics-drivers-384 (Ubuntu Artful):
importance: Undecided → High
Changed in nvidia-graphics-drivers-384 (Ubuntu Xenial):
assignee: nobody → Alberto Milone (albertomilone)
Changed in nvidia-graphics-drivers-384 (Ubuntu Zesty):
assignee: nobody → Alberto Milone (albertomilone)
Changed in nvidia-graphics-drivers-384 (Ubuntu Artful):
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-384 - 384.90-0ubuntu6

---------------
nvidia-graphics-drivers-384 (384.90-0ubuntu6) bionic; urgency=medium

  * debian/templates/nvidia-graphics-drivers.postinst.in:
    - Make sure to update the initramfs regardless of the power
      profile (LP: #1717151).

 -- Alberto Milone <email address hidden> Fri, 17 Nov 2017 09:27:59 +0100

Changed in nvidia-graphics-drivers-384 (Ubuntu):
status: In Progress → Fix Released
description: updated
description: updated
Alex Tu (alextu)
Changed in oem-priority:
status: Confirmed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Alex, or anyone else affected,

Accepted nvidia-graphics-drivers-384 into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-384/384.90-0ubuntu3.17.10.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-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

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

Changed in nvidia-graphics-drivers-384 (Ubuntu Artful):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-artful
Changed in nvidia-graphics-drivers-384 (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed-zesty
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Alex, or anyone else affected,

Accepted nvidia-graphics-drivers-384 into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-384/384.90-0ubuntu0.17.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-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

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

Changed in nvidia-graphics-drivers-384 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Alex, 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.90-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, details of your testing will help us make a better decision.

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

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

This bug was fixed in the package nvidia-graphics-drivers-384 - 384.111-0ubuntu0.17.04.1

---------------
nvidia-graphics-drivers-384 (384.111-0ubuntu0.17.04.1) zesty; urgency=medium

  * SECURITY UPDATE:
    - CVE-2017-5753 (LP: #1741807).
  * New upstream release:
    - Added support for the following GPUs:
      o GeForce MX130
      o GeForce MX110
      o GeForce GTX 1050 Ti with Max-Q Design
      o Quadro P500
    - Fixed a regression that prevented displays connected via some
      types of passive adapters (e.g. DMS-59 to VGA or DVI) from
      working correctly. The regression was introduced with driver
      version 384.98.
    - Fixed a bug that caused Quadro M2200 GPUs to enter the lowest
      available PowerMizer performance level when under load.
  * debian/templates/control.in:
    - Add Replaces/Conflicts/Provide for libcuda-9.0-1.
      Thanks to Graham Inggs for his contribution.
  * debian/templates/dkms_nvidia.conf.in:
    - Drop buildfix_kernel_4.14.patch.

 -- Alberto Milone <email address hidden> Mon, 08 Jan 2018 15:44:40 +0100

Changed in nvidia-graphics-drivers-384 (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-384 - 384.111-0ubuntu0.16.04.1

---------------
nvidia-graphics-drivers-384 (384.111-0ubuntu0.16.04.1) xenial; urgency=medium

  * SECURITY UPDATE:
    - CVE-2017-5753 (LP: #1741807).
  * New upstream release:
    - Added support for the following GPUs:
      o GeForce MX130
      o GeForce MX110
      o GeForce GTX 1050 Ti with Max-Q Design
      o Quadro P500
    - Fixed a regression that prevented displays connected via some
      types of passive adapters (e.g. DMS-59 to VGA or DVI) from
      working correctly. The regression was introduced with driver
      version 384.98.
    - Fixed a bug that caused Quadro M2200 GPUs to enter the lowest
      available PowerMizer performance level when under load.
  * debian/templates/control.in:
    - Add Replaces/Conflicts/Provide for libcuda-9.0-1.
      Thanks to Graham Inggs for his contribution.
  * debian/templates/dkms_nvidia.conf.in:
    - Drop buildfix_kernel_4.14.patch.

 -- Alberto Milone <email address hidden> Mon, 08 Jan 2018 15:42:11 +0100

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

This bug was fixed in the package nvidia-graphics-drivers-384 - 384.111-0ubuntu0.17.10.1

---------------
nvidia-graphics-drivers-384 (384.111-0ubuntu0.17.10.1) artful; urgency=medium

  * SECURITY UPDATE:
    - CVE-2017-5753 (LP: #1741807).
  * New upstream release:
    - Added support for the following GPUs:
      o GeForce MX130
      o GeForce MX110
      o GeForce GTX 1050 Ti with Max-Q Design
      o Quadro P500
    - Fixed a regression that prevented displays connected via some
      types of passive adapters (e.g. DMS-59 to VGA or DVI) from
      working correctly. The regression was introduced with driver
      version 384.98.
    - Fixed a bug that caused Quadro M2200 GPUs to enter the lowest
      available PowerMizer performance level when under load.
  * debian/templates/control.in:
    - Add Replaces/Conflicts/Provide for libcuda-9.0-1.
      Thanks to Graham Inggs for his contribution.
  * debian/templates/dkms_nvidia.conf.in:
    - Drop buildfix_kernel_4.14.patch.

 -- Alberto Milone <email address hidden> Mon, 08 Jan 2018 15:46:54 +0100

Changed in nvidia-graphics-drivers-384 (Ubuntu Artful):
status: Fix Committed → Fix Released
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.