lshw incorrectly detects frame buffer devices
| Affects | Status | Importance | Assigned to | Milestone | ||
|---|---|---|---|---|---|---|
| lshw (Ubuntu) | Status tracked in Resolute | |||||
| Focal |
Confirmed
|
Undecided
|
Unassigned | |||
| Jammy |
Confirmed
|
Undecided
|
Unassigned | |||
| Noble |
Confirmed
|
Undecided
|
Unassigned | |||
| Plucky |
Confirmed
|
Undecided
|
Unassigned | |||
| Questing |
Confirmed
|
Undecided
|
Unassigned | |||
| Resolute |
Confirmed
|
Undecided
|
Nick Rosbrook | |||
Bug Description
[ Impact ]
* Executing lshw can provide incorrect output for devices if frame buffer (fb) devices are present in the system.
* Issue happens when lshw parses fb devices, internally it tries to look for a PCI device which matches a set of requirements (it's looking for iommu address ranges for device based on data from FB device IOCTL). If a device is matched it will append it's metadata to it and later print it.
Problem is in logic used to detect fb devices metadata. As a result the first device on the list with iommu resource can be correlated with fb device.
* In following example, fb metadata has been added to network adapter.
*-network:0
bus info: pci@0000:5e:00.0
width: 64 bits
clock: 33MHz
* More discussion on the issue in [0]
[ Test Plan ]
* FB (/dev/fb0) device is required to reproduce the issue, then run "lshw" and check output of all devices.
In my local local laptop fb data is added to 3D controller device:
bus info: pci@0000:01:00.0
*-display
bus info: pci@0000:00:02.0
width: 64 bits
clock: 33MHz
With fix:
bus info: pci@0000:01:00.0
*-display
bus info: pci@0000:00:02.0
width: 64 bits
clock: 33MHz
[ Where problems could occur ]
* Fix is written in a way that if new way of detecting fb metadata does not work it will fall back to previous method.
* Worst case scenario is that fb data will not be printed
[ Other Info ]
* To workaround the problem disable fb detection by adding -disable fb
* Upstream patches [1]
[0] - https:/
[1] - https:/
| Changed in lshw (Ubuntu Resolute): | |
| assignee: | nobody → Nick Rosbrook (enr0n) |

The attachment "focal debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]