Reported-by: Florian Zumbiehl <florz@florz.de> The vendor ("ThinkPad") key on a T20 with latest T22 BIOS only works after a S3 suspend/resume cycle. Tested with direct (no userspace script) S3 sleep. The T20 is running a patched kernel to fix the EC DoS problem. The key is operating in NVRAM polling mode. It breaks again when thinkpad-acpi is unloaded and then reloaded. Driver hotkey state dump: | /sys/bus/platform/devices/thinkpad_acpi/hotkey_all_mask:0x0088080c | /sys/bus/platform/devices/thinkpad_acpi/hotkey_bios_enabled:0 | /sys/bus/platform/devices/thinkpad_acpi/hotkey_bios_mask:0x0000080c | /sys/bus/platform/devices/thinkpad_acpi/hotkey_enable:1 | /sys/bus/platform/devices/thinkpad_acpi/hotkey_mask:0x0088080c | /sys/bus/platform/devices/thinkpad_acpi/hotkey_poll_freq:10 | /sys/bus/platform/devices/thinkpad_acpi/hotkey_recommended_mask:0x0088080c | /sys/bus/platform/devices/thinkpad_acpi/hotkey_report_mode:1 | /sys/bus/platform/devices/thinkpad_acpi/hotkey_source_mask:0x00880000
Suspend to disk (using tuxonice) also makes the key work, so this is not specific to S3.
Some bugs found. I don't have time to fix them right now, so I will document it and fix them later (probably still this week). 1. driver only starts the kthread if the input device is in use, so anyone depending on the deprecated ACPI events over /proc will not get them. 2. driver will not start the kthread if the device open happens before lifecycle is updated, just remove the test as we enforce it by registering the input device late. Suspend/resume fixes it because we always check if we need to start the kthread on resume. To work around bug 2, do "echo 10 > /sys/bus/platform/devices/thinkpad_acpi/hotkey_poll_freq".
Created attachment 24741 [details] Fix polling thread autostart Please test and report if it fixes the issue.
Seems to work, just got this warning during compilation: drivers/platform/x86/thinkpad_acpi.c:2237: warning: 'tpacpi_hotkey_driver_mask_set' defined but not used
test patch is attached, so moving status to RESOLVED, and will move to CLOSED when production patch hits upstream.
commit b589ea4c44170d3f7a845684e2d1b3b9571663af Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Thu Feb 25 21:28:58 2010 -0300 thinkpad-acpi: fix poll thread auto-start shipped in v2.6.33-3-gb589ea4 closed