All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: platform-driver-x86@vger.kernel.org
Subject: [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
Date: Wed, 28 Jul 2021 13:20:34 +0000	[thread overview]
Message-ID: <bug-209011-215701-YZL6mAoyJv@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-209011-215701@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=209011

--- Comment #13 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
Thanks, I'm pretty sure I know what is going on here. I'm writing a kernel
patch to fix this now.

If you are curious what is going on here is a comment which I just wrote to
document the code/fix I'm working on:

/*
 * Helper code to detect 360 degree hinges (yoga) style 2-in-1 devices using 2
accelerometers
 * to allow the OS to determine the angle between the display and the base of
the device.
 *
 * On Windows these are read by a special HingeAngleService process which calls
undocumented
 * ACPI methods, to let the firmware know if the 2-in-1 is in tablet- or
laptop-mode.
 * The firmware may use this to disable the kbd and touchpad to avoid spurious
input in
 * tablet-mode as well as to report SW_TABLET_MODE info to the OS.
 *
 * Since Linux does not call these undocumented methods, the SW_TABLET_MODE
info reported
 * by the intel-hid / intel-vbtn drivers is incorrect. These drivers use the
detection
 * code in this file to disable SW_TABLET_MODE reporting to avoid reporting
broken info
 * (instead userspace can derive the status itself by directly reading the 2
accels).
 */

Now I just need to actually write the mentioned detection code, test it on one
of my own devices and then hook it up in the intel-vbtn.c and intel-hid
drivers.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2021-07-28 13:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-209011-215701@https.bugzilla.kernel.org/>
2021-07-26 22:20 ` [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK bugzilla-daemon
2021-07-28 11:39 ` bugzilla-daemon
2021-07-28 12:31 ` bugzilla-daemon
2021-07-28 12:35 ` bugzilla-daemon
2021-07-28 12:43 ` bugzilla-daemon
2021-07-28 13:02 ` bugzilla-daemon
2021-07-28 13:20 ` bugzilla-daemon [this message]
2021-07-28 18:10 ` 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=bug-209011-215701-YZL6mAoyJv@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.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 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.