Public bug reported:
When Nvidia drivers are installing, they are only rebuilding the
initramfs for the currently running kernel and/or the newest kernel when
installed. Unfortunately, that means that if one has two kernel flavors
installed (such as -generic and -lowlatency) this means that the
initramfs is only getting rebuild for the currently installed kernel
flavor and its newest version. When a user then switches to the other
kernel flavor, their video fails because the kernel they switched to
does not have the kernel module in the initramfs despite the kernel
module being compiled and available.
The root cause seems to be in nvidia-kernel-common-*.postinst and
nvidia-dkms-*.postinst:
# 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
Instead of looking for the conditions to be met, this should be
rebuilding for *all* installed kernels, despite the longer amount of
time needed to do so in some cases. The rationale is that systems should
work as expected and saving time, in this case, can cause that not to
happen. As such the postinst scripts should do the following in lieu of
the above:
/usr/sbin/update-initramfs -u -k all
This ensures that all installed kernel initramfs images get rebuilt,
which adds increased safety at the expense of speed during the install.
This will also prevent a race condition where, if a kernel and the
nvidia driver are updated at the same time, that the proper initramfs
image will exist despite which order the nvidia driver and kernel get
installed.
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: nvidia-driver-470 470.74-0ubuntu1
ProcVersionSignature: Ubuntu 5.13.0-19.19-lowlatency 5.13.14
Uname: Linux 5.13.0-19-lowlatency x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset
nvidia
ApportVersion: 2.20.11-0ubuntu70
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Wed Oct 13 13:12:23 2021
InstallationDate: Installed on 2021-03-20 (206 days ago)
InstallationMedia: Ubuntu-Studio 21.04 "Hirsute Hippo" - Alpha amd64 (20210320)
SourcePackage: nvidia-graphics-drivers-470
UpgradeStatus: Upgraded to impish on 2021-06-13 (122 days ago)
** Affects: nvidia-graphics-drivers-470 (Ubuntu)
Importance: Undecided
Status: New
** Affects: nvidia-graphics-drivers-470 (Ubuntu Bionic)
Importance: Undecided
Status: New
** Affects: nvidia-graphics-drivers-470 (Ubuntu Focal)
Importance: Undecided
Status: New
** Affects: nvidia-graphics-drivers-470 (Ubuntu Hirsute)
Importance: Undecided
Status: New
** Affects: nvidia-graphics-drivers-470 (Ubuntu Impish)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug impish oem-priority third-party-packages
** Also affects: nvidia-graphics-drivers-470 (Ubuntu Hirsute)
Importance: Undecided
Status: New
** Also affects: nvidia-graphics-drivers-470 (Ubuntu Bionic)
Importance: Undecided
Status: New
** Also affects: nvidia-graphics-drivers-470 (Ubuntu Impish)
Importance: Undecided
Status: New
** Also affects: nvidia-graphics-drivers-470 (Ubuntu Focal)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1947043
Title:
nvidia drivers do not update initramfs properly
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-470/+bug/1947043/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs