← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2127480] Re: lshw incorrectly detects frame buffer devices

 

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.]

** Tags added: patch

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to lshw in Ubuntu.
https://bugs.launchpad.net/bugs/2127480

Title:
  lshw incorrectly detects frame buffer devices

Status in lshw package in Ubuntu:
  New
Status in lshw source package in Focal:
  New
Status in lshw source package in Jammy:
  New
Status in lshw source package in Noble:
  New
Status in lshw source package in Plucky:
  New
Status in lshw source package in Questing:
  New

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
               description: Ethernet interface
               product: Ethernet Controller XXV710 for 25GbE SFP28
               vendor: Intel Corporation
               physical id: 0
               bus info: pci@0000:5e:00.0
               logical name: enp94s0f0
               logical name: /dev/fb0
               version: 02
               serial: 50:7c:6f:45:ca:23
               capacity: 25Gbit/s
               width: 64 bits
               clock: 33MHz
               capabilities: pm msi msix pciexpress vpd bus_master cap_list rom ethernet physical fibre 25000bt-fd autonegotiation fb
               configuration: autonegotiation=off broadcast=yes depth=32 driver=i40e driverversion=5.15.0-107-generic duplex=full firmware=9.50 0x8000f251 23.0.8 latency=0 link=yes mode=1024x768 multicast=yes slave=yes visual=truecolor xres=1024 yres=768
               resources: iomemory:38c00-38bff iomemory:38c00-38bff irq:36 memory:38c000000000-38c000ffffff memory:38c002800000-38c002807fff memory:b8800000-b887ffff memory:38c002000000-38c0023fffff memory:38c002810000-38c00290ffff

   * 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:
             *-display
                  description: 3D controller
                  product: NVIDIA Corporation
                  vendor: NVIDIA Corporation
                  physical id: 0
                  bus info: pci@0000:01:00.0
                  logical name: /dev/fb0
                  version: a1
                  width: 64 bits
                  clock: 33MHz
                  capabilities: pm msi pciexpress bus_master cap_list rom fb
                  configuration: depth=32 driver=nvidia latency=0 mode=1920x1200 visual=truecolor xres=1920 yres=1200
                  resources: iomemory:600-5ff iomemory:620-61f irq:180 memory:be000000-beffffff memory:6000000000-61ffffffff memory:6200000000-6201ffffff ioport:3000(size=128)
          *-display
               description: VGA compatible controller
               product: Intel Corporation
               vendor: Intel Corporation
               physical id: 2
               bus info: pci@0000:00:02.0
               logical name: /dev/fb0
               version: 04
               width: 64 bits
               clock: 33MHz
               capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
               configuration: depth=32 driver=i915 latency=0 resolution=1920,1200

  With fix:
             *-display
                  description: 3D controller
                  product: NVIDIA Corporation
                  vendor: NVIDIA Corporation
                  physical id: 0
                  bus info: pci@0000:01:00.0
                  version: a1
                  width: 64 bits
                  clock: 33MHz
                  capabilities: pm msi pciexpress bus_master cap_list rom
                  configuration: driver=nvidia latency=0
                  resources: iomemory:600-5ff iomemory:620-61f irq:180 memory:be000000-beffffff memory:6000000000-61ffffffff memory:6200000000-6201ffffff ioport:3000(size=128)
          *-display
               description: VGA compatible controller
               product: Intel Corporation
               vendor: Intel Corporation
               physical id: 2
               bus info: pci@0000:00:02.0
               logical name: /dev/fb0
               version: 04
               width: 64 bits
               clock: 33MHz
               capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
               configuration: depth=32 driver=i915 latency=0 mode=1920x1200 visual=truecolor xres=1920 yres=1200
               resources: iomemory:620-61f iomemory:400-3ff irq:181 memory:6288000000-6288ffffff memory:4000000000-400fffffff ioport:4000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff

  
  [ 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://github.com/lyonel/lshw/pull/106
  [1] - https://ezix.org/src/pkg/lshw/commits/branch/master af7c69e1b6 8798c9f1a2

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



References