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

---------------
ubuntu-drivers-common (1:0.10.2) plucky; urgency=medium

  [ Simon Chopin ]
  * Replace buggy modalias map caching with simple arg passing (LP: #2092601)

 -- Kuba Pawlak <kuba.paw...@canonical.com>  Thu, 03 Apr 2025 10:30:34
+0200

** Changed in: ubuntu-drivers-common (Ubuntu Plucky)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ubuntu-drivers-common in Ubuntu.
https://bugs.launchpad.net/bugs/2092601

Title:
  ubuntu-drivers list  - Extremely slow

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Oracular:
  Confirmed
Status in ubuntu-drivers-common source package in Plucky:
  Fix Released

Bug description:
  [Impact]
  Some basic operations on ubuntu-drivers are extremely slow (> 1mn) and 
CPU-intensive, to the point that users might think it broken.

  Examples of such operations are
  ubuntu-drivers list
  ubuntu-drivers list-oem

  Both of those operations are used in subiquity. While the performance
  hit there might not be too noticeable due to parallelism with other
  steps of the install, it's still fairly bad.

  And of course users of both the ubuntu-drivers CLI and the software-
  properties panel GUI feel the impact in full.

  [Proposed fix]

  https://github.com/canonical/ubuntu-drivers-common/pull/116

  There is an issue when trying to compute a stable key to cache the
  results of a costly computation (modalias mapping), resulting in a
  write-only cache.

  The fix is to remove the cache entirely, expose the computation method
  as a new public API, and let the caller optionally provide the
  previously cached value.

  Regression risks are minimal: for all the use cases listed above, the
  call sites are within ubuntu-drivers-common and have been inspected
  for correctness of hoisting the modalias mapping out of the loop. Any
  other caller of the changed API doesn't need to be changed as the new
  argument is optional. The removal of the cache is essentially a NOP
  since cached values weren't retrieved anyway due to the original bug.

  [Original report]
  Looking for drivers is extremely slow.
  Verified to exist on multiple systems.

  ----------------
  $ time ubuntu-drivers list
  nvidia-driver-560-open, (kernel modules provided by 
linux-modules-nvidia-560-open-generic-hwe-24.04)
  nvidia-driver-560, (kernel modules provided by 
linux-modules-nvidia-560-generic-hwe-24.04)

  real  1m48.680s
  user  0m26.984s
  sys   1m21.665s
  ----------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/2092601/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to