Nvidia drivers are marked as "auto" at installation and thus removed by `apt autoremove`

Bug #1955047 reported by quazgar
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Incomplete
Critical
Unassigned
Jammy
Incomplete
Critical
Unassigned
ubuntu-release-upgrader (Ubuntu)
Confirmed
Critical
Unassigned
Jammy
Confirmed
Critical
Unassigned

Bug Description

When installing Ubuntu 20.04 LTS and choosing the proprietary Nvidia drivers, they seem to be marked as "auto". Consequently, any subsequent `apt` commands recommend to call `apt autoremove`:

```
root@ubuntu-nvidia:~# apt-get install htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
htop is already the newest version (2.2.0-2build1).
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libatomic1:i386 libbsd0:i386 libdrm-amdgpu1:i386
libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386 libelf1:i386
libexpat1:i386 libffi7:i386 libglvnd0:i386 libgstreamer-plugins-bad1.0-0 libllvm12:i386
libnvidia-cfg1-390 libnvidia-common-390 libnvidia-compute-390:i386 libnvidia-decode-390
libnvidia-decode-390:i386 libnvidia-encode-390 libnvidia-encode-390:i386 libnvidia-fbc1-390
libnvidia-gl-390 libnvidia-gl-390:i386 libnvidia-ifr1-390 libpciaccess0:i386 libsensors5:i386
libstdc++6:i386 libva-wayland2 libvulkan1:i386 libwayland-client0:i386 libx11-6:i386
libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386
libxcb-present0:i386 libxcb-randr0:i386 libxcb-shm0:i386 libxcb-sync1:i386 libxcb-xfixes0:i386
libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxnvctrl0 libxshmfence1:i386
libxxf86vm1:i386 mesa-vulkan-drivers:i386 nvidia-compute-utils-390 nvidia-kernel-source-390
nvidia-prime nvidia-settings nvidia-utils-390 screen-resolution-extra xserver-xorg-video-nvidia-390
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 142 not upgraded.
```

Calling `apt autoremove`, of course results in removal of drivers which are necessary for X11 to start. At the next boot attempt, the user will be presented with just a black screen and possibly some information about a successful fsck on /dev/sda2.

Revision history for this message
quazgar (quazgar) wrote :

Workaround: Install the Nvidia package manually, for example `apt install nvidia-384` (or whichever version works best for your hardware).

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1955047/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → ubiquity (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

this is going to require follow-up handling in ubuntu-release-upgrader to fix the state on upgrade to 22.04.

Changed in ubiquity (Ubuntu):
importance: Undecided → Critical
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → Critical
Steve Langasek (vorlon)
tags: added: fr-1937
Revision history for this message
Steve Langasek (vorlon) wrote :

Please attach the contents of /var/log/installer from the affected system.

Changed in ubiquity (Ubuntu Jammy):
status: New → Incomplete
Revision history for this message
Brian Murray (brian-murray) wrote (last edit ):

I tested an installation of Focal using the Ubuntu 20.04.3 installation media (and choosing to install restricted software) and while I didn't have nvidia hardware some packages were suggested for auto-removal - chromium-codecs-ffmpeg-extra, gstreamer1.0-vaapi, libgstreamer-plugins-bad1.0-0 and libva-wayland2. These were also in the autoremove list for the reporter.

Revision history for this message
Brian Murray (brian-murray) wrote :

Attached is /var/log/installer/syslog

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

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

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

Testing this again today I discovered that "ubuntu-restricted-addons" was not installed on the resultant system and that by installing it nothing was autoremovable anymore.

Revision history for this message
Brian Murray (brian-murray) wrote :

I tested a daily install of Ubuntu 20.04 from 20220131 and no packages are suggested for autoremoval and ubuntu-restricted-addons was installed after the reboot. However, I didn't test with nvidia hardware so its possible the bug in the original description still exists.

Additionally, Steve's point about this needing fixing in ubuntu-release-upgrader might still apply in that systems that install from Ubuntu 20.04.3 media may have had packages autoremoved that should not have been.

Revision history for this message
Simon Chopin (schopin) wrote :

I installed a new Focal desktop on a machine with a NVidia discrete GPU yesterday using a daily ISO, and the resulting system didn't have any package marked to autoremove. The nvidia-driver-510 package was marked as manually installed, but its dependencies were correctly marked as auto-installed.

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

Other bug subscribers

Bug attachments