ubuntu-drivers changes kernel flavour when installing nvidia

Bug #1873867 reported by Dimitri John Ledkov on 2020-04-20
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
Focal
Undecided
Unassigned
nvidia-graphics-drivers-440 (Ubuntu)
Undecided
Unassigned
Focal
Undecided
Unassigned
ubiquity (Ubuntu)
Undecided
Unassigned
Focal
Undecided
Unassigned
ubuntu-drivers-common (Ubuntu)
Undecided
Alberto Milone
Focal
Undecided
Alberto Milone
ubuntu-meta (Ubuntu)
Undecided
Unassigned
Focal
Undecided
Unassigned

Bug Description

$ dpkg-query -W linux-image-*
linux-image-5.4.0-25-generic 5.4.0-25.29
linux-image-generic-hwe-20.04 5.4.0.25.31

$ ubuntu-drivers list
nvidia-driver-390
nvidia-driver-435
nvidia-driver-440

$ sudo ubuntu-drivers install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libnvidia-cfg1-440 libnvidia-common-440 libnvidia-compute-440 libnvidia-decode-440 libnvidia-encode-440 libnvidia-extra-440 libnvidia-fbc1-440 libnvidia-gl-440 libnvidia-ifr1-440
  linux-image-5.4.0-25-lowlatency linux-modules-5.4.0-25-lowlatency linux-modules-nvidia-440-5.4.0-25-lowlatency linux-modules-nvidia-440-lowlatency-hwe-20.04 nvidia-compute-utils-440 nvidia-kernel-common-440
  nvidia-kernel-source-440 nvidia-prime nvidia-settings nvidia-utils-440 screen-resolution-extra xserver-xorg-video-nvidia-440
Suggested packages:
  fdutils linux-doc | linux-source-5.4.0 linux-tools linux-headers-5.4.0-25-lowlatency
Recommended packages:
  libnvidia-compute-440:i386 libnvidia-decode-440:i386 libnvidia-encode-440:i386 libnvidia-ifr1-440:i386 libnvidia-fbc1-440:i386 libnvidia-gl-440:i386
The following NEW packages will be installed:
  libnvidia-cfg1-440 libnvidia-common-440 libnvidia-compute-440 libnvidia-decode-440 libnvidia-encode-440 libnvidia-extra-440 libnvidia-fbc1-440 libnvidia-gl-440 libnvidia-ifr1-440
  linux-image-5.4.0-25-lowlatency linux-modules-5.4.0-25-lowlatency linux-modules-nvidia-440-5.4.0-25-lowlatency linux-modules-nvidia-440-lowlatency-hwe-20.04 nvidia-compute-utils-440 nvidia-driver-440
  nvidia-kernel-common-440 nvidia-kernel-source-440 nvidia-prime nvidia-settings nvidia-utils-440 screen-resolution-extra xserver-xorg-video-nvidia-440
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.

I was expecting for it to pick linux-modules-nvidia-440-generic-hwe-20.04 not linux-modules-nvidia-440-lowlatency-hwe-20.04

As if it sorted things and picked last one?

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1873867

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: focal
Changed in linux (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Changed in linux (Ubuntu):
assignee: Alberto Milone (albertomilone) → nobody
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

also we have wrong / non-matching lrm modules in the pool seed.

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

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

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Confirmed
Changed in ubuntu-meta (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

with old pool (missing right modules)

1. offline install "succeeds" but doesn't install any nvidia stuff in target, no errors otherwise.

2. online install "stalls", generates crashreport pop-up (failing to install lowlatency).

Possible workarounds:
- fix ubuntu-drivers to detect kernel flavour correctly
- switch to linux-generic flavour
- oem + nvidia is probably still broken regardless

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Oh, and online too, doesn't install any nvidia in target.

Changed in ubuntu-meta (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

nvidia-driver-440 also currently has this dependency:

  nvidia-dkms-440 (= 440.64-0ubuntu3) | nvidia-dkms-440 (= 440.82+really.440.64-0ubuntu4)

The first branch is satisfied by the lrm packages and the second branch is satisfied by the real nvidia-dkms-440 package, which means that apt install nvidia will always select some lrm provider but not necessarily the one that matches your kernel.

We should reverse this order so that apt picks the "safe" default of the real nvidia-dkms package.

This will become obsolete with the next upload of nvidia, since the real and virtual package versions will again line up.

Changed in nvidia-graphics-drivers-440 (Ubuntu Focal):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-440 - 440.82+really.440.64-0ubuntu5

---------------
nvidia-graphics-drivers-440 (440.82+really.440.64-0ubuntu5) focal; urgency=medium

  * Reverse the order of the versions of nvidia-dkms-440 in the dependency
    list, so that apt will default to the real package instead of picking an
    lrm package at "random" which won't necessarily match the target kernel.
    LP: #1873867.

 -- Steve Langasek <email address hidden> Tue, 21 Apr 2020 08:17:20 -0700

Changed in nvidia-graphics-drivers-440 (Ubuntu Focal):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 20.04.15

---------------
ubiquity (20.04.15) focal; urgency=medium

  [ Dimitri John Ledkov ]
  * check-kernels: install the right nvidia modules for the OEM kernel.
    (LP: #1873867)

  [ Iain Lane ]
  * language, partman, prepare: Factor out sensible-browser launching and use it
    (LP: #1874070)

 -- Dimitri John Ledkov <email address hidden> Tue, 21 Apr 2020 16:07:58 +0100

Changed in ubiquity (Ubuntu Focal):
status: Confirmed → Fix Released
Steve Langasek (vorlon) on 2020-04-22
Changed in ubuntu-drivers-common (Ubuntu Focal):
status: Confirmed → Fix Committed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I am very happy with the new ubuntu-drivers-common and l-r-m in proposed! Installed all the right things, with latelink=false on the host system, and latelink=true in target.

Just need all of these to migrate, respin, retest, ship.

Changed in linux (Ubuntu Focal):
status: Incomplete → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.8.1

---------------
ubuntu-drivers-common (1:0.8.1) focal; urgency=medium

  [ Alberto Milone ]
  * UbuntuDrivers/detect.py,
    UbuntuDrivers/kerneldetection.py,
    tests/test_ubuntu_drivers.py,
    ubuntu-drivers:
    - Add tests for the -generic-hwe-20.04 flavour and for
      the -oem-20.04 linux flavour.
    - Add detection logic to get the linux metapackage and
      linux-modules for -hwe-20.04 (LP: #1873867).
    - List the modules provider when it is either a dkms package
      or a linux-modules package.
    - Install linux-modules packages when available.
      This makes the NVIDIA drivers work with Secure Boot.

  [ Dimitri John Ledkov ]
  * UbuntuDrivers/detect.py,
    UbuntuDrivers/kerneldetection.py:
    - Use exact matching in find_reverse_deps() with both
      installed and candidate.

 -- Alberto Milone <email address hidden> Tue, 21 Apr 2020 21:14:15 +0200

Changed in ubuntu-drivers-common (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers