Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating report fails on Thinkpad X1 Carbon Gen5 #166

Open
azmodude opened this issue Dec 16, 2024 · 2 comments
Open

Generating report fails on Thinkpad X1 Carbon Gen5 #166

azmodude opened this issue Dec 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@azmodude
Copy link

Describe the bug

When trying to generate a JSON report on a - rather old - Thinkpad Carbon X1 facter dies almost instantly with

2024/12/16 17:30:54 root.go:120: failed to scan: failed to scan hardware: failed to read input devices: failed to annotate with udev data: failed to parse bus: rmi does not belong to Bus values

Passing in something minimal like --hardware cpu does not seem to change behavior.

To Reproduce

sudo nix run --option experimental-features "nix-command flakes" nixpkgs#nixos-facter -- --log-level=debug -o facter.json

Expected behavior

A facter.json report is being generated.

System information

  • Thinkpad X1 Carbon Gen5
  • NixOS BUILD_ID="25.05.20241213.3566ab7"

Additional context

Running the same command on my Thinkpad P14s Gen2 on the same software stack works just fine and produces a facter.json report.

@azmodude azmodude added the bug Something isn't working label Dec 16, 2024
@brianmcgee
Copy link
Member

rmi is not a supported value in this Bus enum:

//go:generate enumer -type=Bus -json -text -transform=snake -trimprefix Bus -output=./udev_bus.go
type Bus int //nolint:recvcheck
const (
BusAta Bus = iota // ATA (IDE) devices
BusBluetooth
BusI8042
BusI2c // Inter-Integrated Circuit
BusIeee1394 // Firewire
BusPci
BusPciExpress
BusPcmcia // Personal Computer Memory Card International Association
BusPlatform // Devices on a system's motherboard
BusScsi
BusSerial
BusSerio // Serial interface controller devices
BusSpi // Serial Peripheral Interface connected devices
BusUsb
BusVirtio
)

I can't remember where I got that list from, I believe it was from udev source. I'll find some time in the next couple days to have a closer look and try to ensure full coverage of that field type.

@brianmcgee brianmcgee self-assigned this Dec 17, 2024
@azmodude
Copy link
Author

@brianmcgee thanks a lot. Nothing pressing on my side, just stumbled upon this issue when resurrecting that old laptop from the shelf. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants