I am tracing the asus-laptop driver from 4.17.1 because my keyboard backlight control keys not working. And, I found the driver cannot be loaded, it always reported "No such device". Then I found it's because the add() method (asus_acpi_add) of the acpi driver never got entered. At least some previous kernel version such as 4.4.14 also have the same problem and I have not yet found a working version.

Does anyone have a clue? Thanks. -woody

migrated from serverfault.com Jul 9 '18 at 6:59

This question came from our site for system and network administrators.


Once the module is loaded, the asus_acpi_add function should be called by the ACPI subsystem if the firmware indicates the system includes a device with a PNP ID of ATK0100 or ATK0101. This is arranged by the module initialization calling acpi_bus_register_driver with the address of static struct acpi_driver asus_acpi_driver as a parameter. This structure includes as its .ids element a table of PNP/ACPI IDs recognized by this driver.

So, the first thing to check would be, if your system has ATK0100 or ATK0101 device IDs.

Please run:

cat /sys/bus/pnp/devices/*/id

The result should be a list of PNP IDs, one per line. If the list does not include ATK0100 nor ATK0101, then there's a good reason why the module is not getting loaded: the ACPI firmware does not claim to have the interface this module would use.

In your other question on Stack Overflow, you mention that the asus_wmi module does get auto-detected on your laptop. The WMI interface this module accesses seems to have a lot of miscellaneous functionality, including keyboard backlight control. The features supported by the hardware are apparently indicated by the SFUN value; however, the meaning of only a few bits of the SFUN value is know to the asus_wmi developers.

As a result, the asus-nb-wmi.c source code file has a list of Asus notebook models and specific settings for the control key driver for each model. It appears that the FX503 is not yet listed in there; if you can compile your own kernels, you might try adding your notebook model to the list and test the quirk values of other Asus notebook models with similar functionality; with luck and persistence, you might find workable settings that way if the hardware/firmware implementation is not too different.

If you manage to do that, please report your results to the author of the asus_wmi driver: that way your work will also benefit others who have the same model as yours. You'll also get your name added to the long list of Linux kernel contributors.

You might also want to just email the developer of that driver to ask for advice: s/he probably can suggest more specific things to try, if you are willing to make the effort.

  • cat /sys/bus/pnp/devices/*/id is not listing any ATK* devices, just something like 'PNP0c02, INT3f0d, ...'. Does this mean I need to update some kernel firmware for the laptop? For the asus-nb-wmi.c topic, I like to take some time to add an entry into asus_quirks[] array and make it match my laptop model (FX503VD), and I will see what it will bring. Even though my system does not have ATK*** interfaces, do you think the effort of adding asus_quirks entry still make sense? Thanks. – Woody Wu Jul 9 '18 at 13:36
  • The asus_laptop module uses the old ACPI PNP interface, while asus_wmi uses newer WMI. They are two separate interfaces, and it seems the WMI interface might be preferred on newer hardware. The fact that the asus_wmi module gets auto-loaded and reports the BIOS WMI version and the SFUN value both indicate that your laptop definitely does have the WMI interface, so trying to find the appropriate quirks for it definitely makes sense. – telcoM Jul 9 '18 at 15:02
  • Thank you telcoM. One question is, I did not find any word like 'SFUN' in the wmi source code. What's that? – Woody Wu Jul 9 '18 at 15:25
  • You'll find it in <kernel source>/drivers/platform/x86/asus-wmi.c. That's the main driver source file for the asus_wmi driver, and the asus-nb-wmi driver depends on it. The SFUN value apparently identifies the WMI-controllable FUNctionalities a particular Asus laptop model has, but the problem is, the developer had no documentation on how to interpret that value, so the driver has a hard-coded table of model-specific quirks instead of trying to interpret the SFUN value. With a list of laptop models, their SFUN values and corresponding features, it might be allow feature auto-detection. – telcoM Jul 9 '18 at 17:33
  • I added quirk entry in the asus-nb-wmi.c. I then got dmesg output which seemed to say my model FX503VD had been recognized (matched with my newly added entry, I think). The information is: Initialization: 0x01; BIOS WMI version 8.1; SFUN value: 0x4a0061. But my keyboard backlight function keys still have no response and I still have no ATK*** entry found in /sys/bus/pnp/*/id. – Woody Wu Jul 10 '18 at 9:02

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