fwupdtool reports an error (KERNEL BUG) when refreshing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Fix Released
|
Medium
|
|||
fwupd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
when running the "refresh" command I get the following message
$ sudo fwupdtool refresh
Loading… [******
Loading… [- ]
Downloading… [******
Downloading… [******
Downloading… [******
Not sure if it's just a warning or an actual error.
ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: fwupd 1.8.4-2
ProcVersionSign
Uname: Linux 5.19.0-16-generic x86_64
NonfreeKernelMo
ApportVersion: 2.23.0-0ubuntu1
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: GNOME
Date: Sun Sep 18 09:43:50 2022
InstallationDate: Installed on 2022-09-11 (6 days ago)
InstallationMedia: Ubuntu 22.10 "Kinetic Kudu" - Alpha amd64 (20220829)
SourcePackage: fwupd
UpgradeStatus: No upgrade log present (probably fresh install)
---
ProblemType: Bug
ApportVersion: 2.23.0-0ubuntu1
Architecture: amd64
CRDA: N/A
CasperMD5CheckR
CurrentDesktop: GNOME
DistroRelease: Ubuntu 22.10
InstallationDate: Installed on 2022-09-11 (7 days ago)
InstallationMedia: Ubuntu 22.10 "Kinetic Kudu" - Alpha amd64 (20220829)
MachineType: LENOVO 21AHCTO1WW
NonfreeKernelMo
Package: linux (not installed)
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 20220831.
Tags: kinetic wayland-session
Uname: Linux 5.19.0-16-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip libvirt lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 09/13/2022
dmi.bios.release: 1.5
dmi.bios.vendor: LENOVO
dmi.bios.version: N3MET08W (1.05 )
dmi.board.
dmi.board.name: 21AHCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: Not Defined
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.ec.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: ThinkPad T14 Gen 3
dmi.product.name: 21AHCTO1WW
dmi.product.sku: LENOVO_
dmi.product.
dmi.sys.vendor: LENOVO
Changed in fwupd (Ubuntu): | |
status: | New → Invalid |
Changed in linux (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in linux: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in linux: | |
status: | Confirmed → Fix Released |
The firmware-attributes documentation ( https:/ /www.kernel. org/doc/ Documentation/ ABI/testing/ sysfs-class- firmware- attributes) indicates that all drivers that support firmware-attributes need to support the 'type' attribute.
This is important for userspace software to know how to interact with the driver.
fwupd 1.8.4 added support for the firmware-attributes class API, but since lenovo-thinklmi doesn't meet it shows the following error on every boot.
KERNEL BUG: 'type' attribute not exported: (failed to load type: Failed to open file “/sys/class/ firmware- attributes/ thinklmi/ attributes/ MCRUSBHeader/ type”: No such file or directory)
A workaround has been landed in fwupd to avoid this attribute and hardcode the known behavior of the current driver when it finds it.
It seems like all the attributes are actually "enumeration", so the lenovo-thinklmi kernel driver should probably just export a type sysfs file with "enumeration" hardcoded for all attributes.
Also though, the possible_values key is not populated either. Instead the values are put into the "current_value" string. On a Lenovo P620 the following happens:
$ sudo cat /sys/class/ firmware- attributes/ thinklmi/ attributes/ NUMA/current_ value NPS1,NPS2, NPS4,Auto] firmware- attributes/ thinklmi/ attributes/ NUMA/possible_ values firmware- attributes/ thinklmi/ attributes/ NUMA/possible_ values: Operation not supported
Auto;[Optional:
$ sudo cat /sys/class/
cat: /sys/class/
That is the userspace software tears apart the current_value string and instead puts it into what the possible_values are. This should be the responsibility of the kernel driver. Even if the firwmare returns all that in current_value, the kernel driver should be doing the splitting so that userspace doesn't need to carry quirks for different kernel drivers behaving differently.