[Bug 1955047] Re: Nvidia drivers are marked as "auto" at installation and thus removed by `apt autoremove`

Launchpad Bug Tracker 1955047 at bugs.launchpad.net
Mon Aug 8 16:50:22 UTC 2022


This bug was fixed in the package ubuntu-release-upgrader - 1:22.04.13

---------------
ubuntu-release-upgrader (1:22.04.13) jammy; urgency=medium

  [ Simon Chopin ]
  * Add a quirk to resolve an issue where the nvidia driver would get
    suggested for autoremoval. (LP: #1955047)

  [ Steve Langasek ]
  * On upgrade to 22.04, detect the presence of pam_tally* in /etc/pam.d and
    block the upgrade early, to avoid an abort from libpam-modules in the
    middle of the apt upgrade.  LP: #1977493.
  * Run pre-build.sh: updating mirrors and translations.

 -- Steve Langasek <steve.langasek at ubuntu.com>  Tue, 02 Aug 2022
17:15:07 -0700

** Changed in: ubuntu-release-upgrader (Ubuntu Jammy)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1955047

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

Status in ubiquity package in Ubuntu:
  Incomplete
Status in ubuntu-release-upgrader package in Ubuntu:
  Invalid
Status in ubiquity source package in Jammy:
  Incomplete
Status in ubuntu-release-upgrader source package in Jammy:
  Fix Released

Bug description:
  [Impact]
  The installer doesn't install the nvidia-driver-* metadata on 20.04.3 Desktop, which means that on
  upgrade the user will be prompted to remove the actual driver packages as the final step of the install,
  which will likely break their user session.

  [Test plan]

  This test plan is for the fix in ubuntu-release-upgrader:

  On a system with a nvidia GPU:
  * Install 20.04.3 with proprietary drivers enabled:
    https://old-releases.ubuntu.com/releases/focal/ubuntu-20.04.3-desktop-amd64.iso
  * `sudo apt -s autoremove` should list quite a few libnvidia* packages, including libnvidia-gl-*
  * Manually download the -proposed upgrader since jammy isn't available for LTS upgrades yet:
    $ mkdir -p /tmp/u-r-u && wget http://archive.ubuntu.com/ubuntu/dists/jammy-proposed/main/dist-upgrader-all/current/jammy.tar.gz && tar -xaf jammy.tar.gz -C /tmp/u-r-u
    $ cd /tmp/u-r-u
    $ ./jammy
      -> At the end of the upgrade process, the only nvidia packages that should be up for removal are kernel modules for obsolete kernel

  On the nvidia-enabled system (test that the fix doesn't break systems that are working)
  * Install 21.10 with proprietary drivers enabled
    https://old-releases.ubuntu.com/releases/impish/ubuntu-21.10-desktop-amd64.iso
  * Fix the sources.list as noted there: https://help.ubuntu.com/community/EOLUpgrades#Update_sources.list
  * dpkg -l | grep libnvidia-gl- should return one package
  * sudo apt -s autoremove shouldn't list that same package
  * do-release-upgrade -p
    -> fully functional system at the end including nvidia drivers

  [Potential regressions]Potential regressions include:
  * Crashing the upgrader, preventing users from upgrading
  * Installing the nvidia proprietary stack on systems without user consent
  * Totally breaking the graphics stack for desktop users

  [Original report]
  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 at 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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1955047/+subscriptions




More information about the foundations-bugs mailing list