numtide / nixos-facter

Declarative hardware configuration for NixOS [maintainer=@numtide]
https://numtide.github.io/nixos-facter/
Other
164 stars 4 forks source link

Review how we detect gpu #62

Closed brianmcgee closed 2 months ago

brianmcgee commented 2 months ago

I think we are currently capturing it, but check how we are. For example I see my own graphics card coming up as a display and it's saying "unknown graphics card hardware"

brianmcgee commented 2 months ago

hwinfo pulls ids from various public sources and has a script for updating them: https://github.com/openSUSE/hwinfo/tree/master/src/ids

It looks like usb and pci ids were last updated in 2021. After running the update script I could see my graphics card listed.

I have created a PR upstream: https://github.com/openSUSE/hwinfo/pull/144 and will testing with my fork https://github.com/brianmcgee/hwinfo

brianmcgee commented 2 months ago

@Mic92 see above

brianmcgee commented 2 months ago

It appears when I introduced the --hardware-features flag to reduce the default list of things that hwinfo probes, I introduced a bug with how we resolve model names and so on. If you run nixos-facter -f all -o report.json you will see that we resolve model names and other lookups fine. But with the default probe list nixos-facter -o report.json you start to see a lot of unknown hardware entries in the report.

I'm reviewing how hwinfo uses the lib to identify how we should be using it better. For now, running it with -f all seems to resolve the issue.

@Mic92 this could also explain why you weren't seeing a lot of things with their model names and hardware classes properly resolved

Mic92 commented 2 months ago

Okay