1

My system is running on a minimal kernel config (based on make defconfig).

Now I'm trying to figure out which extra acpi device drivers I have to enable to get everything on my system working. To find a matching driver I could enable it, build & restart, observe dmesg. This is a tedious and error-prone process, and I'd like to be able to choose the correct drivers based on system information.

For PCI or USB devices I was able to utilize lspci -nn and searched for the vendorId:deviceId in LKDDb.

I have seen ACPI entrys in this database too, but cannot figure out how to extract ACPI device information from my system.

2

The solution is to dump and decompile the ACPI DSDT (Differentiated System Description Table) from the BIOS. This includes code for ACPI device initialization specific to the used system, and therefore also includes the necessary device ids.

Decompile the DSDT with the following commands (iasl must be installed)

cp /sys/firmware/acpi/tables/DSDT dsdt.dat
iasl -d dsdt.dat

Then query the decompiled code for device ids

grep '_HID.*"' dsdt.dsl

The output will include all lines where a device is declared, and the respective device ids. Finally utilize LKDDb to find the necessary kernel acpi drivers for the devices.

For a quick extraction of the relevant lines you can use this:

wget https://cateee.net/sources/lkddb/lkddb.list
for i in $(grep '_HID.*"' dsdt.dsl | grep -o '"[A-Z0-9]*"'); do grep "$i" lkddb.list; done | sort -u > relevant

Furthermore list all CONFIG_* variables from the output:

cat relevant | grep -o 'CONFIG[A-Z0-9_]*' | sort -u

Note that this list is only a guidance, and does not guarantee to be free of false positives or false negatives. If you want to be sure about what you are doing, you should investigate the dsdt.dsl yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.