public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Alex Hung <alex.hung@canonical.com>,
	Mario Limonciello <mario_limonciello@dell.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	platform-driver-x86@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	libsmbios-devel@lists.us.dell.com
Subject: Re: [PATCH 1/3] dell_wmi: Support new hotkeys on the XPS 13 Skylake
Date: Tue, 17 Nov 2015 09:36:07 +0100	[thread overview]
Message-ID: <201511170936.08646@pali> (raw)
In-Reply-To: <CALCETrWss=zCWhNkR2S_oi_m3W1xNO+UL_-uOnOVeLh5WHsDgQ@mail.gmail.com>

[-- Attachment #1: Type: Text/Plain, Size: 3490 bytes --]

On Saturday 14 November 2015 18:07:57 Andy Lutomirski wrote:
> [lots of people added]
> 
> On Sat, Nov 14, 2015 at 8:13 AM, Pali Rohár <pali.rohar@gmail.com>
> wrote:
> > On Saturday 14 November 2015 16:48:25 Andy Lutomirski wrote:
> >> On Nov 14, 2015 1:27 AM, "Pali Rohár" <pali.rohar@gmail.com> wrote:
> >> > On Friday 13 November 2015 21:49:30 Andy Lutomirski wrote:
> >> > > The XPS 13 Skylake has an rfkill button and a switchvideomode
> >> > > button that aren't enumerated in the DMI table AFAICT.  Add a
> >> > > table listing extra un-enumerated hotkeys.  To avoid breaking
> >> > > things that worked before, these un-enumerated hotkeys won't
> >> > > be used if the DMI table maps them to something else.
> >> > 
> >> > Do you have any (Dell) documentation which specify list of these
> >> > wmi codes send to dell-wmi driver?
> >> 
> >> No.  Do you know where to get that documentation?
> > 
> > Time to time Dell release some documentation or example code. You
> > could ask Dell people on LKML (e.g. Mario Limonciello is active)
> > or on smbios mailing list libsmbios-devel@lists.us.dell.com.
> > 
> > But currently there there are open questions about WMI hotkeys on
> > Dell Vostro V131 which we cannot fix yet :-(
> 
> On the Dell XPS 13 Skylake (XPS 13 9350), upstream Linux doesn't
> support the rfkill button.
> 
> There seem to be three WMI events that aren't reflected in the OEM
> type 178 DMI table:
> 
> 0x151: Fn-lock (no action needed by OS)
> 0x152: Switch video mode (should send KEY_SWITCHVIDEOMODE, but
> currently just warns)
> 0x153: rfkill -- currently warns, and see below.
> 
> On several Dell models, there's the dell_rbtn (DELRBTN / DELLABCE)
> device.  It's here in the DSDT, too, but it seems to be disabled if
> _OSI reports "Windows 2012" or "Windows 2013", so _STA returns zero.
> (It also shows up as DELLRBC6, but I haven't tried all the _OSI
> hackery that seems to be needed in order to test the driver.)
> 

Hi!

In your ASL code is:

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If ((OIDE () < One))
                {
                    Return (0x0F)
                }

                Return (Zero)
            }

OIDE() returns 1 for Windows 8.

This is quite interesting, on my Latitude E6440 is this ASL code:

            Method (_STA, 0, NotSerialized)
            {
                If (LLess (OIDE (), One))
                {
                    Return (Zero)
                }

                Return (0x0F)
            }

And again OIDE() returns 1 for Windows 8. So behaviour is negated.

Can you check if you have latest version of BIOS? Maybe Dell written 
that condition incorrectly?

Can you try to add "DELLRBC6" into dell-rbtn.c acpi table and boot 
kernel with acpi_osi="!Windows 2012" acpi_osi="!Windows 2013" what 
happens?

> My proposal is to modify dell_wmi to handle 0x151 (ignore), 0x152
> (send KEY_SWITCHVIDEOMODE), and 0x153 (send KEY_RFKILL), but only if
> there isn't something else mapped to them in the DMI table.
> 
> I've attached dmidecode output and the DSDT.
> 

Can you please provide debug output from dell-wmi module when you press 
those hotkeys? Specially I want to see wmi buffer for each pressed 
hotkey. In debug dmesg it starts with "Received WMI event" and "Process 
buffer". Look into dell-wmi.c source code.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2015-11-17  8:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1447479930.git.luto@kernel.org>
     [not found] ` <db83b63cc163ecc640d5d1c5554f8aa87beaadfc.1447479930.git.luto@kernel.org>
     [not found]   ` <20151114092704.GA25957@pali>
2015-11-14 15:48     ` [PATCH 1/3] dell_wmi: Support new hotkeys on the XPS 13 Skylake Andy Lutomirski
2015-11-14 16:13       ` Pali Rohár
     [not found]         ` <CALCETrWss=zCWhNkR2S_oi_m3W1xNO+UL_-uOnOVeLh5WHsDgQ@mail.gmail.com>
2015-11-17  8:36           ` Pali Rohár [this message]
2015-11-17 19:03             ` Andy Lutomirski
2015-11-18  3:44               ` Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201511170936.08646@pali \
    --to=pali.rohar@gmail.com \
    --cc=alex.hung@canonical.com \
    --cc=libsmbios-devel@lists.us.dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mario_limonciello@dell.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox