From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878AbeA0OGD (ORCPT ); Sat, 27 Jan 2018 09:06:03 -0500 Received: from mail-wr0-f172.google.com ([209.85.128.172]:32988 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbeA0OGB (ORCPT ); Sat, 27 Jan 2018 09:06:01 -0500 X-Google-Smtp-Source: AH8x226j+RkHwK/EEDC1J+pUPThXo9HQfsqGuRb1QSL7dwfYmDbQxjurGKUCmMWi2MSUEWguAV0mdw== Date: Sat, 27 Jan 2018 15:05:57 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Oleksandr Natalenko Cc: Mario Limonciello , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Garrett , Darren Hart , Andy Shevchenko , Dmitry Torokhov Subject: Re: Dell Vostro 3360 multimedia keys Message-ID: <20180127140557.xa3bdoouk5whhtbx@pali> References: <5089742.2pBsoxBtzf@natalenko.name> <1716681.OUoELY8X92@natalenko.name> <201711211936.25184@pali> <1629929.m6cr89zbSo@natalenko.name> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ctlu22hkixexsacf" Content-Disposition: inline In-Reply-To: <1629929.m6cr89zbSo@natalenko.name> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ctlu22hkixexsacf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tuesday 21 November 2017 19:58:24 Oleksandr Natalenko wrote: > Hi. >=20 > On =C3=BAter=C3=BD 21. listopadu 2017 19:36:24 CET Pali Roh=C3=A1r wrote: > > Ok, if wmi_requires_smbios_request is really doing nothing, then it > > should not be used. It enables some QSET feature in Dell SMM mode which > > is for 2 laptops. >=20 > It is also used to filter 0xe025 key code which is generated by 3rd key a= nd is=20 > visible via both atkbd and wmi: >=20 > =3D=3D=3D > 343 if (type =3D=3D 0x0000 && code =3D=3D 0xe025 && !wmi_requires_smb= ios_request) > 344 return; > =3D=3D=3D >=20 > (see commit 13f5059ac5a6b) Yes, this filtering is enabled and needed only when QSET feature was activated. And is needed only for machines which need QSET feature. > > Looks like that Dell Vostro 3360 have this meaning for multimedia keys: > >=20 > > first key: Mobility Center > > second key: Dell Support Center > > third key: Dell Instant Launch Manager > >=20 > > (same as other Vostro laptops) >=20 > Likely, yes. At least, for Launch Manager (key "3") there is a record in = the=20 > table: >=20 > =3D=3D=3D > 135 /* Dell Instant Launch key */ > 136 { KE_KEY, 0xe025, { KEY_PROG4 } }, > =3D=3D=3D >=20 > As for Mobility Center, relevant key is commented out and has completely= =20 > different keycode: >=20 > =3D=3D=3D > 150 /* Untested, Windows Mobility Center button on Inspiron 7520 */ > 151 /* { KE_IGNORE, 0xe02a, { KEY_RESERVED } }, */ > =3D=3D=3D >=20 > For Support Center, it is not commented, but still reserved: >=20 > =3D=3D=3D > 189 /* Dell Support Center key */ > 190 { KE_IGNORE, 0xe06e, { KEY_RESERVED } }, > =3D=3D=3D In both cases important is KE_IGNORE, which fully drops those events. So IIRC we used KEY_RESERVED as it is irrelevant which key code is defined for dropped events. > > But do not know what KEY_* are used on other Vostro laptops for those > > keys. It would be great to use same KEY_*... >=20 > So, according to what I see above, it looks like KEY_PROG(X) pattern shou= ld be=20 > followed. >=20 > > > Well, I've tried. The problem is that if I even configure this key > > > via setkeycodes, it doesn't work. > >=20 > > Hm... why it does not work? > >=20 > > CCing Dmitry, can you tell us what needs to be done to "active" key from > > AT Keyboard driver which prints following messages to dmesg? >=20 > Just to note what I did. Here is my custom /etc/udev/hwdb.d/90-dell- > vostro-3360.hwdb: >=20 > =3D=3D=3D > evdev:atkbd:dmi:bvnDellInc.:bvrA18:bd09/25/2013:svnDellInc.:pnVostro3360:= pvr:rvnDellInc.:rn0F5DWF:rvrA00:cvnDellInc.:ct8:cvr0.1: > KEYBOARD_KEY_60=3Dprog4 > =3D=3D=3D >=20 > Here is how this key press is being detected by evtest via atkbd: >=20 > =3D=3D=3D > Event: time 1511289883.083968, type 4 (EV_MSC), code 4 (MSC_SCAN), value = 60 > Event: time 1511289883.083968, type 1 (EV_KEY), code 203 (KEY_PROG4), val= ue 2 > Event: time 1511289883.083968, -------------- SYN_REPORT ------------ > =3D=3D=3D So, it is working fine and there is no problem in kernel. > But xev shows nothing when I press this key. Am I doing something wrong? This is bug in X Server or so. You would need to remap keycode to something different as a workaround for X Server. > > In dell-wmi we filter all key events which are also delivered via PS/2 > > AT Keyboard driver. So filtering PS/2 keys instead of WMI is anti-design > > solution. >=20 > Well, sounds reasonable... >=20 > Thanks. >=20 > Regards, > Oleksandr --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --ctlu22hkixexsacf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCWmyHQgAKCRCL8Mk9A+RD UhbDAJ9GcLSSFejkoifoCcns2LVULapupgCfahtIPH+D4AsspEETgK29eEpioaw= =68TY -----END PGP SIGNATURE----- --ctlu22hkixexsacf--