All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriele Mazzotta <gabriele.mzt@gmail.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	Alex Hung <alex.hung@canonical.com>
Subject: Re: [Bug 106031] Regression in 4.2.x: in airplane mode each time I open my laptop lid
Date: Fri, 23 Oct 2015 01:29:12 +0200	[thread overview]
Message-ID: <56297148.6060605@gmail.com> (raw)
In-Reply-To: <20151022141710.GD15219@pali>

On 22/10/2015 16:17, Pali Rohár wrote:
> On Thursday 22 October 2015 15:43:46 Gabriele Mazzotta wrote:
>> It's the F2 key. Depending on the value passed to the RBTN, it acts as
>> hw slider or sw toggle.
>
> Ok, we have differences in terminology and everybody understood this
> problem differently.
>
>
> To correct this situation, first define about what we are talking about:
>
> * HW slider: It is hardware slider switch which as two positions ON and
>               OFF. Position exactly defines hardware state of wireless
>               radio devices. Not possible (or should not) to remap.
>
> * SW hotkey toggle button: It is button or key, act in same way as any
>                             other key on keyboard, controlled by SW
>                             (if all drivers are installed, etc).

Sorry for the confusion, I know I've been using "HW slider" improperly,
but I thought it was clear. Although it's a button, the BIOS makes it
behave like an hardware slider when configured to behave as such
through RBTN. The state of radio devices is changed by the BIOS when
the function key is pressed, this state is never changed until the user
presses the function key again (at least if we ignore the fact that we
can perform some special SMI calls), this state is saved in the EC and
both userspace and the kernel don't receive any event other than rfkill
events (if we don't consider the WMI events ignored by dell-wmi).

I think this behavior is closer to the one of an hardware slider
rather than the one of a software hotkey, which I can still request
through the RBTN method.

> Next I think that this hypothesis is truth:
>
> * Every machine on which is binded ACPI dell-rbtn.ko driver has either
>    HW slider or SW toggle. Not both!
>
> Correct?

It depends on how you classify my laptop. The behavior changes
completely depending on the value passed to RBTN.

Obviously it can behave either as HW slider (again, not an actual
slider) or SW toggle, but I can choose between the two.

> Then follows my expected behaviour for HW slider:
>
> * State of HW slider position is exported by kernel as rfkill device.
>
> * In any case HW slider position (ON/OFF) match hard rfkill state device
>    (rfkill device state is correct also after resume, wake from hibernate).
>
> * Immediately after user change position of HW slider, rfkill device
>    reflect it.
>
>
> And then expected behaviour for SW toggle button:
>
> * Every time when user press it, kernel just send input event "wireless
>    key pressed" to userspace.
>
> * Kernel does not send event "wireless key pressed" when user did not
>    pressed it (e.g. after resuming from suspend, waking from hibernate).

Yes, but we don't know exactly when the user pressed the button. As I
said, the BIOS might send an event that triggers an input event even if
the user didn't press anything.

> * Kernel should provide rfkill devices to "soft" block appropriate
>    wireless cards.
>
> * Make sure that BIOS/firmware in any case does not change radio rfkill
>    state of any wireless card and wireless cards stay in same state as
>    before (no enable/disable or changing hard/soft rfkill state).

This is the problem. We can't differentiate notifications sent to
DELLABCE/DELLRBTN by the BIOS because it felt like it was right to do so
(e.g. after resuming) or because the user pressed the function key.

> If last sentence is not truth, then kernel must not send "wireless key
> pressed" event to userspace and act like "no key was pressed".
>
>
> Make this sense? Or are there any objections about this behaviour?
>

  reply	other threads:[~2015-10-22 23:29 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-106031-5380@https.bugzilla.kernel.org/>
     [not found] ` <bug-106031-5380-zVXKHiyrZU@https.bugzilla.kernel.org/>
2015-10-21  8:57   ` [Bug 106031] Regression in 4.2.x: in airplane mode each time I open my laptop lid Darren Hart
2015-10-21  9:19     ` Pali Rohár
2015-10-21 11:00       ` Pali Rohár
2015-10-21 11:12         ` Darren Hart
2015-10-21 11:42           ` Gabriele Mazzotta
2015-10-21 18:53             ` Gabriele Mazzotta
2015-10-22  7:49               ` Darren Hart
2015-10-22  8:26                 ` Gabriele Mazzotta
2015-10-22  8:51                   ` Pali Rohár
2015-10-22 10:44                     ` Gabriele Mazzotta
2015-10-22 10:50                       ` Pali Rohár
2015-10-22 10:54                         ` Gabriele Mazzotta
2015-10-22 13:02                           ` Darren Hart
2015-10-22 13:43                             ` Gabriele Mazzotta
2015-10-22 14:17                               ` Pali Rohár
2015-10-22 23:29                                 ` Gabriele Mazzotta [this message]
2015-10-23  9:00                                   ` Pali Rohár
2015-10-23  9:47                                     ` Gabriele Mazzotta
2015-10-23 11:14                                       ` Pali Rohár
2015-10-23 18:03                                         ` Gabriele Mazzotta
2015-10-26 14:38                                           ` Darren Hart
2015-10-26 14:58                                             ` Pali Rohár
2015-11-20 14:44                                           ` Pali Rohár
2015-12-19  0:12                                             ` Darren Hart
2015-12-20 16:21                                               ` Rafael J. Wysocki
2015-12-21 15:34                                                 ` Gabriele Mazzotta
2015-12-22  0:20                                                   ` Rafael J. Wysocki
2016-01-07 22:35                                                     ` Pali Rohár
2016-03-11  9:45                                                       ` Pali Rohár
2016-03-11 23:30                                                         ` Gabriele Mazzotta
2016-03-14 11:29                                                           ` Pali Rohár
2015-12-22  9:03                                                   ` Alex Hung
2015-10-22  8:17           ` Darren Hart
2015-10-22  8:27             ` Pali Rohár
2015-10-22  8:53               ` Darren Hart
2015-10-22  8:28             ` Gabriele Mazzotta
2015-10-22  8:35               ` Darren Hart
     [not found] <bug-106031-215701@https.bugzilla.kernel.org/>
2022-02-21 21:19 ` bugzilla-daemon
2022-02-21 21:19 ` bugzilla-daemon

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=56297148.6060605@gmail.com \
    --to=gabriele.mzt@gmail.com \
    --cc=alex.hung@canonical.com \
    --cc=dvhart@infradead.org \
    --cc=pali.rohar@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.