Hi,
I read your messages regarding hkeyv 0x200 Thinkpads...
I would like to contribute to this topic as well.
I believe (don't know, just guessing) that we should not make the
feature "has_adaptive_kbd" depend on hkeyv 0x200. Instead we should use
the "MHKA" method to evaluate if there is a flags mask set for the
adaptive keyboard. I assume that if we pass "1" to the MHKA method we
will get the hotkey_all_mask. If we pass "2" to the MHKA mask we will
get the hotkey_all_adaptive_mask. Thats my assumption which is based on
the observation of current Lenovo Skylake devices and the Thinkpad X1
Carbon (2014).
I checked it with T460, T460p, T460s, T560, X260 and X1 Tablet (2016).
All of these devices return 0 in that case. Only the X1 Carbon (2014)
will return 0x1FFFFFFF. The Thinkpads L460 and L560 are not covered by
this because they have hkeyv 0x100.
I prepared a patch which does what I described above (attachment). This
works fine in my case with kernel >= 4.3 until 4.6-rc3 for T460, T460p,
T460s, T560, X260. All hkeyv 0x100 Thinkpads should not be affected by
this change. Whats your opinion about this patch?
Testing this with Lenovo Thinkpad X1 Tablet (2016) will make the hotkeys
generate an event but currently there seems to be a mapping issue
because the most events are "KEY_UNKNOWN".
Additionally I observed that the new Skylake Thinkpads have no HKEY
methods GDFR, STRW, GTRW, SBMI, SVOI, GVOI, GCGI, GHOV, NALL, SAPI,
GAPI, SMNC, GMNC, SCMI, GCMI, SCMD, GCMD, GMMS, UAND, DGBL, SDHK, GDHK,
SDFL, GDFL, SDAM, GDAM in contrast to X1 Carbon (2014) with HKEY 0x200.
Best regards,
Dennis
> On Sat, Apr 09, 2016 at 01:54:01PM -0300, Henrique de Moraes Holschuh
> wrote:
> > On Sun, 03 Apr 2016, Yrjan Skrimstad wrote:
> > > I get the following message when booting 4.6-rc1 on my Thinkpad T460s:
> > [ 4.067246] thinkpad_acpi: unknown version of the HKEY interface:
0x200
> > > [ 4.068819] thinkpad_acpi: please report this to ibm-acpi-devel@...
> > >
> > > I also have a number of hotkeys that will not work unless I change the
> > > code. The code changes I did to test this was very similar to this
> > > patch from 2014:
> > >
> > >
https://sourceforge.net/p/ibm-acpi/mailman/ibm-acpi-devel/thread/531F0073.7060103%40canonical.com/#msg32086976
> > >
> > > However, this patch was never merged and I cannot find the reason for
> > > this. Is there a chance this patch or a similar patch could be
> > > accepted?
> >
> > Yes, but it needs someone that accepts to be responsible for it
(i.e. handle
> > bug reports by helping with the testing) at least until I get a thinkpad
> > that has HKEY 0x200...
> I would very much like to assist here. I'm currently using the patch
on 4.6-rc2, but I wouldn't mind testing it anywhere else it might be needed.
> > > On a sidenote: the feature "has_adaptive_kbd" gets set on this laptop
> > > (possibly all hkeyv 0x200 Thinkpads?). This laptop does not have an
> > > adaptive keyboard, so this seems unintentional. Would there be a way
> > > to better detect if there is an adaptive keyboard?
> >
> > Probably it can be detected through either ACPI method calls, or the
> > presence or non-presence of some ACPI identifier/method.
> >
> > Fix this requires the cooperation of someone with HKEY 0x200 and an
> > adaptative keyboard, and someone with HKEY 0x200 without an adaptative
> > keyboard.
> >
> > Also, it is possible that the thinkpad does have an adaptative
keyboard as
> > far as the firmware is concerned, but no hardware interfaces that
expose it.
> > In that case, you'd have to test the resulting behavior, and report
it in
> > details. Worse comes to worst case, we can add a
whitelist/blacklist to the
> > driver and keep it up-to-date. I hope the behavior is "it doesn't do
> > anything nasty" so it becomes a cosmetic issue...
> I have not seen anything nasty that I suspect have anything to do with
this other than errors like this:
> [ 1259.945126] thinkpad_acpi: Cannot read adaptive keyboard mode.
>
> and this:
>
> [ 1260.910584] thinkpad_acpi: Cannot set adaptive keyboard mode.
|