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

Bug #1717151 reported by Alex Tu on 2017-09-14
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Critical
Alex Tu
nvidia-graphics-drivers-384 (Ubuntu)
High
Alberto Milone
Xenial
High
Alberto Milone
Zesty
High
Alberto Milone
Artful
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

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) on 2017-09-14
description: updated
tags: added: xenial
Alex Tu (alextu) on 2017-11-07
description: updated
Yuan-Chen Cheng (ycheng-twn) wrote :

@albertomilone, can you check this bug ?

tags: added: risk
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)
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) on 2017-11-28
Changed in oem-priority:
status: Confirmed → Fix Released

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
Ł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
Ł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!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers