Dasharo / dasharo-issues

The Dasharo issue tracker
https://dasharo.com/
25 stars 0 forks source link

Include the graphics VBT file in DTS HCL log dumps #1118

Closed filipleple closed 1 week ago

filipleple commented 3 weeks ago

The problem you're addressing (if any)

One crucial component of firmware is the graphics VBT file. Right now, we either have to extract it from stock firmware (and usually guess which one to use), or boot Linux and obtain the working file ourselves.

Describe the solution you'd like

We can find the active, working VBT in debugfs, at /sys/kernel/debug/dri/0/*_vbt, for example i915_vbt. This can be automatically copied and included in the HCL dumps.

Where is the value to a user, and who might that user be?

It would reduce time spent on a trivial, repetitive activity and make the HCL dumps even more useful

Describe alternatives you've considered

No response

Additional context

No response

mkopec commented 3 weeks ago

+1, I've also recently wished we dumped the active VBT in HCL reports

miczyg1 commented 2 weeks ago

Can be done. But I noticed the VBT from sysfs is 3 bytes smaller than should be... Not sure what is the cause of this.

m-iwanicki commented 1 week ago

Is copying all /sys/kernel/debug/dri/*/*_vbt files ok just in case there are more or not under /dri/0?

bash-5.2# ls logs/*vbt
logs/dri_0_i915_vbt
###################################################################|

[OK]            PCI configuration space and topology
[UNKNOWN]       USB devices and topology
[OK]            Super I/O configuration
[UNKNOWN]       EC configuration
[ERROR]         MSRs
[OK]            SMBIOS tables
[OK]            BIOS information
[OK]            CMOS NVRAM
[UNKNOWN]       Intel configuration registers
[OK]            GPIO configuration C header files
[OK]            kernel dmesg
[OK]            ACPI tables
[UNKNOWN]       Audio devices configuration
[OK]            CPU info
[OK]            I/O ports
[OK]            Input bus types
[OK]            Firmware image
[UNKNOWN]       I2C bus
[UNKNOWN]       ACPI tables
[OK]            Touchpad information
[ERROR]         DIMMs information
[OK]            CBMEM table information
[OK]            CBMEM console
[UNKNOWN]       TPM information
[ERROR]         AMT information
[OK]            ME information
[UNKNOWN]       Graphics VBT
Results of getting data:

Legend:
[OK]             Data get successfully
[UNKNOWN]        Result is unknown
[ERROR]          Error during getting data

Creating archive with logs...
miczyg1 commented 1 week ago

We are only interested in i915 VBT I think, others may only make the report unnecessarily larger.

@mkopec WDYT?

mkopec commented 1 week ago

I'm pretty sure VBT is Intel specific so it doesn't make sense to look for anything other than i915_vbt

The bigger issue is that the intel GPU may get a different device number than 0, for example depending on kernel version, so I'd set the wildcard like this:

/sys/kernel/debug/dri/*/i915_vbt