Hello
On Sun, Nov 2, 2014 at 8:26 AM, Garreau, Alexandre galex-713@galex-713.eu wrote:
Where do come from the numbers used in the two scripts you showed? I suppose there’s a code for each XFree86 keysym, right?
IIRC, it's just a linear function of the keysym: there is a difference by about 80
Talking about /sys/devices/platform/thinkpad_acpi: do you have the file “hotkey_tablet_mode”? I need it to detect when the screen is turned in tablet mode so that I can automatically rotate the screen. Do it need to be implemented in coreboot too?
No, this is due to missing DSDT entries in coreboot that thinkpad-acpi uses:
2058 static int hotkey_get_tablet_mode(int *status) 2059 { 2060 int s; 2061 2062 if (!acpi_evalf(hkey_handle, &s, "MHKG", "d")) 2063 return -EIO; 2064 2065 *status = ((s & TP_HOTKEY_TABLET_MASK) != 0); 2066 return 0; 2067 }
However, with the latest patch from φcoder, you should have the ACPI events directly
Nothing more :/ I already did the “echo 0xffffffff”, it did active some
things like Fn+Space or Fn+PgUP (ThinkLight) within acpi, but nothing else. There’s still no way to access Fn+Print or Fn+Pause… I think we need coreboot to implement it, so we can detect it with acpi, right?
Yes, some function key seem to be missing. I do not understand why even after I investigated a bit more.
Basically, after checking up with more buttons, I can't get Fn+F6, Fn+F8, Fn+F10, Fn+insert, Fn+delete to generate acpi events, even if I use a kernel supporting /proc/acpi/event (or acpid with input support flag)
Fn+F6 and F8 show up in cat /dev/input/event4, give me keysyms with xev (199 XF86TouchpadToggle and 220 XF86WebCam), but no acpi event, which makes me believe it's something that could be fixed.
More problematic, Fn+F10, Fn+insert, Fn+delete are dead as can be - regardless of the /sys/devices/platform/thinkpad_acpi/hotkey_mask
According to http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work#Triggering_key... :
"By disassembling and editing the DSDT, more events can be added. HKEY events are triggered by calls to the MKHQ function, e.g. _SB.PCI0.LPC.EC.HKEY.MHKQ(0×1007) will trigger "ibm/hotkey HKEY 00000080 00001007". Most of these can be found in _Qxx methods within the DSDT, which are executed on embedded controller events, e.g. _Q10 is triggered by pressing Fn-F7. You can add a call to MKHQ into an existing _Qxx method to get it recognized by thinkpad-acpi as well as creating new _Qxx methods, which if you're lucky will correspond to an EC event that IBM never used (e.g. A 770 will send Fn-Home/End/PgUp/PgDn to thinkpad-acpi if hacked in this fashion). For example, this is a modified block of DSDT for a G40 http://www.wormnet.eu/ibm-g40/morebuttons.dsl."
(dead link, cf http://jamie.lentin.co.uk/computers/ibm-g40/add_buttons.dsl.diff)
Yet in src/ec/lenovo/h8/acpi/ec.asl, I do see Fn+10, Fn+Insert, Fn+Delete and also Fn+Backspace, ie everything has been added, but thinkpad-acpi shows nothing in /dev/input/event4 Am I missing something?
My best idea at the moment is that the EC gives different Q codes than those in the DSDT for the keys that do not generate ACPI events.
Thanks Charles
PS: Do you have a PGP key?
I do, but for public communication (ex: mailing list) I don't use it.
You can get it with: host -t TXT charles._pka.devereaux.org
(it's also published in various key servers)