numtide / nixos-facter

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

failed to scan: failed to add to smbios report: language field is already set #125

Open rcambrj opened 4 days ago

rcambrj commented 4 days ago

Describe the bug

failed to scan: failed to add to smbios report: language field is already set

To Reproduce

sudo nixos-facter --hardware bios

Expected behavior

nixos-facter generates a valid facter.json

System information

Running on a Topton 4-port x86_64 Celeron N5105. image

Additional context

The error seems to come from this line. The output of dmidecode seems to indicate that indeed, the language is supplied twice. I don't know what this really means, but hopefully it helps.

sudo dmidecode -t bios
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
    Vendor: American Megatrends International, LLC.
    Version: 5.19
    Release Date: 04/24/2022
    Address: 0xF0000
    Runtime Size: 64 kB
    ROM Size: 8 MB
    Characteristics:
        PCI is supported
        BIOS is upgradeable
        BIOS shadowing is allowed
        Boot from CD is supported
        Selectable boot is supported
        BIOS ROM is socketed
        EDD is supported
        5.25"/1.2 MB floppy services are supported (int 13h)
        3.5"/720 kB floppy services are supported (int 13h)
        3.5"/2.88 MB floppy services are supported (int 13h)
        Print screen service is supported (int 5h)
        Serial services are supported (int 14h)
        Printer services are supported (int 17h)
        ACPI is supported
        USB legacy is supported
        BIOS boot specification is supported
        Targeted content distribution is supported
        UEFI is supported
    BIOS Revision: 5.19

Handle 0x0017, DMI type 13, 22 bytes
BIOS Language Information
    Language Description Format: Long
    Installable Languages: 1
        en|US|iso8859-1
    Currently Installed Language: en|US|iso8859-1

Handle 0x005E, DMI type 13, 22 bytes
BIOS Language Information
    Language Description Format: Abbreviated
    Installable Languages: 1
        enUS
    Currently Installed Language: enUS
brianmcgee commented 4 days ago

It wasn't 100% clear if language was a scalar or a vector. In the end we decided to make it scalar and assert so we would know if someone encountered this in the wild.

You just confirmed it should be a vector 🙃🙂

rcambrj commented 4 days ago

Thanks for the quick response. Woohoo! I'm very happy to have been the guinea pig 🥳

brianmcgee commented 4 days ago

I can have a look at this tomorrow, it's a straightforward change.

I highly doubt anyone is relying on this field in their nix config yet, so we can probably just push it out.

@Mic92 do you agree?

rcambrj commented 4 days ago

No rush! all-hardware.nix fills the gap in the meantime.