Traceback during 'ubuntu-drivers list'

Bug #1935070 reported by Jeff Lane 
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Ubuntu Drivers Common
New
Unknown
ubuntu-drivers-common (Ubuntu)
Fix Released
Undecided
Jeff Lane 
Jammy
Fix Released
High
Alberto Milone
Kinetic
Fix Released
High
Alberto Milone

Bug Description

[ Impact ]

 * Calling the ubuntu-drivers tool where the alsa-utils package is not installed (mainly on servers), ubuntu-drivers (through the sl-modem plugin) complains, unnecessarily about the missing aplay binary.

[ Test Plan ]

 * Install the new ubuntu-drivers-common from -proposed, and make sure that alsa-utils is not installed.

 * Run the ubuntu-drivers list command.

 * Check that ubuntu-drivers does not complain about the missing aplay tool.

[ Where problems could occur ]

 * A problem in the ubuntu-drivers tool can cause it to install a driver which
   is not recommended for the detected hardware, or even cause the package
   installation to fail, and prevent users from logging in through the
   graphics interface.

[ Other Info ]
-
_______________
ubuntu@doubletusk:~$ sudo ubuntu-drivers list
ERROR:root:could not open aplay -l
Traceback (most recent call last):
  File "/usr/share/ubuntu-drivers-common/detect/sl-modem.py", line 35, in detect
    aplay = subprocess.Popen(
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'aplay'
nvidia-driver-418-server, (kernel modules provided by nvidia-dkms-418-server)
nvidia-driver-470, (kernel modules provided by nvidia-dkms-470)
nvidia-driver-460-server, (kernel modules provided by nvidia-dkms-460-server)
nvidia-driver-465, (kernel modules provided by nvidia-dkms-465)
nvidia-driver-450-server, (kernel modules provided by nvidia-dkms-450-server)
nvidia-driver-460, (kernel modules provided by nvidia-dkms-460)
ubuntu@doubletusk:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.9.0~0.20.04.1
  Candidate: 1:0.9.0~0.20.04.1
  Version table:
 *** 1:0.9.0~0.20.04.1 500
        500 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.8.6.5~0.20.04.1 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
     1:0.8.1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
ubuntu@doubletusk:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

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
Revision history for this message
Chris Iverach-Brereton (civerachb) wrote :

I was about to file a new bug report about this issue.

It appears the ubuntu-drivers-common package is missing a dependency on alsa-utils (which provides the aplay command).

The problem can be fixed by running

```
sudo apt-get install alsa-utils
```

but ideally the ubuntu-drivers-common package should be modified to:

1) depend on alsa-utils
2) have better exception-handling for situations where `aplay` isn't installed
3) ideally both

Revision history for this message
Jeff Lane  (bladernr) wrote :

I made a PR on github to address the exception handling which I think is the best course here. Adding a dependency on alsa-utils will result in adding further unwanted desktop packages on systems where they don't really belong (anything with Ubuntu Server installed).

Just removing the traceback to clean the output and providing a helpful error message is sufficient, IMO.

Changed in ubuntu-drivers-common (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Jeff Lane  (bladernr)
status: In Progress → Fix Committed
Jeff Lane  (bladernr)
tags: added: servcert-565
Changed in ubuntu-drivers-common:
status: Unknown → New
Changed in ubuntu-drivers-common (Ubuntu Jammy):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Kinetic):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Jammy):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Kinetic):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Jammy):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu Kinetic):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Jeff, or anyone else affected,

Accepted ubuntu-drivers-common into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.6.3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-drivers-common (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Jeff, or anyone else affected,

Accepted ubuntu-drivers-common into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.6.2~0.22.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-drivers-common (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Alberto Milone (albertomilone) wrote :

Hey Timo, unfortunately I had left an unused variable in Jammy and in Kinetic, and that caused the test suite to trigger a FTBFS for both. The unused variable is not there in Lunar.

Please accept my new uploads, so that we can proceed with the testing.

Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Jeff, or anyone else affected,

Accepted ubuntu-drivers-common into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.6.3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Jeff, or anyone else affected,

Accepted ubuntu-drivers-common into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.6.2~0.22.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Alberto Milone (albertomilone) wrote :

Removing the alsa-utils package in Kinetic, I don't get the traceback any more with the package in kinetic-proposed:

:~$ ubuntu-drivers list
ERROR:root:aplay command not found
nvidia-driver-515-open, (kernel modules provided by nvidia-dkms-515-open)
nvidia-driver-510, (kernel modules provided by linux-modules-nvidia-510-generic-hwe-22.04)
nvidia-driver-525-server, (kernel modules provided by linux-modules-nvidia-525-server-generic-hwe-22.04)
nvidia-driver-525-open, (kernel modules provided by linux-modules-nvidia-525-open-generic-hwe-22.04)
nvidia-driver-470-server, (kernel modules provided by linux-modules-nvidia-470-server-generic-hwe-22.04)
nvidia-driver-525, (kernel modules provided by linux-modules-nvidia-525-generic-hwe-22.04)
nvidia-driver-470, (kernel modules provided by linux-modules-nvidia-470-generic-hwe-22.04)
nvidia-driver-515, (kernel modules provided by linux-modules-nvidia-515-generic-hwe-22.04)
nvidia-driver-515-server, (kernel modules provided by linux-modules-nvidia-515-server-generic-hwe-22.04)

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Alberto Milone (albertomilone) wrote :

I did the same thing for Jammy, with the same results:

:~$ ubuntu-drivers list
ERROR:root:aplay command not found
nvidia-driver-525-open
nvidia-driver-515
nvidia-driver-510
nvidia-driver-470-server
nvidia-driver-470
nvidia-driver-525-server
nvidia-driver-515-server
nvidia-driver-525
nvidia-driver-515-open

:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.9.6.2~0.22.04.3
  Candidate: 1:0.9.6.2~0.22.04.3
  Version table:
 *** 1:0.9.6.2~0.22.04.3 500
        500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.9.6.1 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.9.6.3.2) kinetic; urgency=medium

  * UbuntuDrivers/detect.py:
    - Fix "882:5 local variable 'with_nvidia_kms' is assigned to
      but never used" FTBFS (triggered by tests/test_static.py).

ubuntu-drivers-common (1:0.9.6.3.1) kinetic; urgency=medium

  [ Alberto Milone ]
  * debian/rules:
    - Limit the tests to the selected architectures (amd64, arm64).
      This prevents armhf builds from failing.
  * UbuntuDrivers/detect.py:
    - Make sure all -open drivers have a lower priority, regardless
      of whether the --server parameter is passed in or not.
    - Update regex and unify package name parsing in the following
      functions by using the new NvidiaPkgNameInfo class:
      nvidia_desktop_pre_installation_hook,
      _get_headless_no_dkms_metapackage,
      nvidia_desktop_pre_installation_hook,
      get_linux_modules_metapackage.
      This prevents ubuntu-drivers from crashing when dealing with
      the -open NVIDIA drivers (LP: #1993019).
  * tests/test_ubuntu_drivers.py:
    - Add tests so we make sure to keep preferring non-open NVIDIA
      modules over the -open ones, at least until the open modules catch up
      feature wise and performance wise.

  [ gongzhengyang ]
  * UbuntuDrivers/detect.py:
    - Fix local variable 'version' being referenced before assignment
      when catching ValueError (LP: #1993019).

  [ Jeff Lane ]
  * detect-plugins/sl-modem.py:
    - Add some error trapping when aplay is not installed (on servers)
      (LP: #1935070).

 -- Alberto Milone <email address hidden> Wed, 08 Mar 2023 15:57:25 +0000

Changed in ubuntu-drivers-common (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ubuntu-drivers-common has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package ubuntu-drivers-common - 1:0.9.6.2~0.22.04.3

---------------
ubuntu-drivers-common (1:0.9.6.2~0.22.04.3) jammy; urgency=medium

  * UbuntuDrivers/detect.py:
    - Fix "882:5 local variable 'with_nvidia_kms' is assigned to
      but never used" FTBFS (triggered by tests/test_static.py).

ubuntu-drivers-common (1:0.9.6.2~0.22.04.2) jammy; urgency=medium

  [ Alberto Milone ]
  * debian/rules:
    - Limit the tests to the selected architectures (amd64, arm64).
      This prevents armhf builds from failing.
  * UbuntuDrivers/detect.py:
    - Make sure all -open drivers have a lower priority, regardless
      of whether the --server parameter is passed in or not.
    - Update regex and unify package name parsing in the following
      functions by using the new NvidiaPkgNameInfo class:
      nvidia_desktop_pre_installation_hook,
      _get_headless_no_dkms_metapackage,
      nvidia_desktop_pre_installation_hook,
      get_linux_modules_metapackage,
      This prevents ubuntu-drivers from crashing when dealing with
      the -open NVIDIA drivers (LP: #1993019).
  * tests/test_ubuntu_drivers.py:
    - Add tests so we make sure to keep preferring non-open NVIDIA
      modules over the -open ones, at least until the open modules catch up
      feature wise and performance wise.

  [ gongzhengyang ]
  * UbuntuDrivers/detect.py:
    - Fix local variable 'version' being referenced before assignment
      when catching ValueError (LP: #1993019).

  [ Jeff Lane ]
  * detect-plugins/sl-modem.py:
    - Add some error trapping when aplay is not installed (on servers)
      (LP: #1935070).

 -- Alberto Milone <email address hidden> Wed, 08 Mar 2023 16:03:28 +0000

Changed in ubuntu-drivers-common (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
maurirope (maurirope) wrote :

Hello sirs,

Sorry for being so noob. I see comment by janitor says something like:

"in package version 1:0.9.6.2~0.22.04.2 this is fixed."

However I have package version

maurirope@ubuntuserver:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common: date.
  Installed: 1:0.9.6.2~0.22.04.4
  Candidate: 1:0.9.6.2~0.22.04.4
  Version table:
 *** 1:0.9.6.2~0.22.04.4 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.9.6.1 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

And I dont see fix, i still have error.
Thank you very muchs

Revision history for this message
maurirope (maurirope) wrote :

Hello sirs,

I discovered my specific problem was because actually the video card was not initialized at a hardware level in motherboard.

So what happened was that I had Display plugged into Intel motherboard onboard video output.

Linux started and video card was kinda not initialized, so then when running ubuntu-drivers list command there was only the aplay error output which was kinda not expected.

I rebooted system this time plugged into correct display output in video card and it worked.

The reason why I could still see video even though there was video card in PCI is because BIOS was setup to initialize onboard video anyways.

Thanks very much

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.