All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [not found] <bug-209011-215701@https.bugzilla.kernel.org/>
@ 2021-07-26 22:20 ` bugzilla-daemon
  2021-07-28 11:39 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-26 22:20 UTC (permalink / raw)
  To: platform-driver-x86

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

Julius Lehmann (julius@devpi.de) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julius@devpi.de

--- Comment #6 from Julius Lehmann (julius@devpi.de) ---
Not entirely sure if this is the correct place to post this, but the issue
described is still present on my device. Touchpad and keyboard are disabled in
libinput. Using Archlinux 5.13.5-arch1 on Asus TP412UA. Output of libinput is
pretty much the same as in the first comment. With linux-lts (5.10) there is no
SWITCH_TOGGLE device and keyboard/touchpad are working without issues.

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-28 11:39 UTC (permalink / raw)
  To: platform-driver-x86

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

--- Comment #7 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
Julius, thank you for your bug report.

5.13.5 does contain the fix for the origin bug reported here. For a while now
the kernel's asus-wmi code will only report SW_TABLET_MODE on devices on which
it is explicitly enabled by a DMI match, on all other models the asus-wmi code
will not report SW_TABLET_MODE at all.

So I wonder if the SW_TABLET_MODE is perhaps being reported by another driver
such as the intel-hid or intel-vbtn code.

If you look at the libinput output in comment 0:

-event7   DEVICE_ADDED     Asus WMI hotkeys                  seat0 default
group9  cap:kS
 event7   SWITCH_TOGGLE    +0.000s      switch tablet-mode state 1

Then the "event7" on the beginning of the line is the same for both devices. I
suspect that if you look-up the DEVICE_ADDED line for the "event#" with which
the SWITCH_TOGGLE which you are seeing is prefixed, then it will be another
device then the "Asus WMI hotkeys" device.

If the DEVICE_ADDED with the matching "event#" is the "Asus WMI hotkeys"
device, then something weird is going on with the DMI matching, in that case
please provide the output of: "cat /sys/class/dmi/id/sys_vendor
/sys/class/dmi/id/product_name"

If the DEVICE_ADDED with the matching "event#" is for another device, which I
expect, please provide the following info:

1. Can you please add "wmi.debug_event=1 wmi.debug_dump_wdg=1" to your kernel
commandline (see your distro's documentation) and then reboot and fold the
device into tablet-mode and back to laptop-mode once. After this run "dmesg >
dmesg.txt" and attach the generated dmesg.txt file here.

2. Run "sudo acpidump -o acpidump.txt" and attach the generated acpidump.txt
file here.

3. Run "ls -l /sys/bus/iio/devices > ls-bus-iio.txt" and attach the generated
ls-bus-iio.txt file here.

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-28 12:31 UTC (permalink / raw)
  To: platform-driver-x86

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

--- Comment #9 from Julius Lehmann (julius@devpi.de) ---
Created attachment 298075
  --> https://bugzilla.kernel.org/attachment.cgi?id=298075&action=edit
acpidump - TP412UA

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [not found] <bug-209011-215701@https.bugzilla.kernel.org/>
                   ` (2 preceding siblings ...)
  2021-07-28 12:31 ` bugzilla-daemon
@ 2021-07-28 12:35 ` bugzilla-daemon
  2021-07-28 12:43 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-28 12:35 UTC (permalink / raw)
  To: platform-driver-x86

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

--- Comment #10 from Julius Lehmann (julius@devpi.de) ---
Thank you so much for your reply, it was another device after all. 
Very important detail!

I should add that in 5.10 the device wasn't even added, so this seems to be
originating from something different. Anyway, the DEVICE_ADDED is for an "Intel
Virtual Switch".

Added the dmesg output and acpidump as attachments.

% ls-bus-iio
total 0
lrwxrwxrwx 1 root root 0 Jul 28 14:10 iio:device0 ->
../../../devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-4/i2c-BOSC0200:00/iio:device0
lrwxrwxrwx 1 root root 0 Jul 28 14:10 iio:device1 ->
../../../devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-4/i2c-BOSC0200:base/iio:device1

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [not found] <bug-209011-215701@https.bugzilla.kernel.org/>
                   ` (3 preceding siblings ...)
  2021-07-28 12:35 ` bugzilla-daemon
@ 2021-07-28 12:43 ` bugzilla-daemon
  2021-07-28 13:02 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-28 12:43 UTC (permalink / raw)
  To: platform-driver-x86

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

--- Comment #11 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
Thank you for the logs. I think I know what is going on here.

2 more questions:

1) Did you do "fold the device into tablet-mode and back to laptop-mode once"
before collecting the dmesg.txt ?

2) Can you run "grep . /sys/class/dmi/id/* 2> /dev/null" and copy and paste the
output here ?

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [not found] <bug-209011-215701@https.bugzilla.kernel.org/>
                   ` (4 preceding siblings ...)
  2021-07-28 12:43 ` bugzilla-daemon
@ 2021-07-28 13:02 ` bugzilla-daemon
  2021-07-28 13:20 ` bugzilla-daemon
  2021-07-28 18:10 ` bugzilla-daemon
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-28 13:02 UTC (permalink / raw)
  To: platform-driver-x86

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

--- Comment #12 from Julius Lehmann (julius@devpi.de) ---
Created attachment 298077
  --> https://bugzilla.kernel.org/attachment.cgi?id=298077&action=edit
dmesg output 2 - TP412UA

1) Yes, I did that. To be sure, I redid the 360 turn and posted another dmesg.

2) output of "grep . /sys/class/dmi/id/* 2> /dev/null"

/sys/class/dmi/id/bios_date:07/25/2019
/sys/class/dmi/id/bios_release:5.12
/sys/class/dmi/id/bios_vendor:American Megatrends Inc.
/sys/class/dmi/id/bios_version:TP412UA.308
/sys/class/dmi/id/board_asset_tag:ATN12345678901234567
/sys/class/dmi/id/board_name:TP412UA
/sys/class/dmi/id/board_vendor:ASUSTeK COMPUTER INC.
/sys/class/dmi/id/board_version:1.0
/sys/class/dmi/id/chassis_asset_tag: No  Asset  Tag 
/sys/class/dmi/id/chassis_type:31
/sys/class/dmi/id/chassis_vendor:ASUSTeK COMPUTER INC.
/sys/class/dmi/id/chassis_version:1.0
/sys/class/dmi/id/ec_firmware_release:1.7
/sys/class/dmi/id/modalias:dmi:bvnAmericanMegatrendsInc.:bvrTP412UA.308:bd07/25/2019:br5.12:efr1.7:svnASUSTeKCOMPUTERINC.:pnVivoBookFlip14_ASUSFlipTP412UA:pvr1.0:sku:rvnASUSTeKCOMPUTERINC.:rnTP412UA:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct31:cvr1.0:
/sys/class/dmi/id/product_family:VivoBook Flip
/sys/class/dmi/id/product_name:VivoBook Flip 14_ASUS Flip TP412UA
/sys/class/dmi/id/product_version:1.0
/sys/class/dmi/id/sys_vendor:ASUSTeK COMPUTER INC.
/sys/class/dmi/id/uevent:MODALIAS=dmi:bvnAmericanMegatrendsInc.:bvrTP412UA.308:bd07/25/2019:br5.12:efr1.7:svnASUSTeKCOMPUTERINC.:pnVivoBookFlip14_ASUSFlipTP412UA:pvr1.0:sku:rvnASUSTeKCOMPUTERINC.:rnTP412UA:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct31:cvr1.0:

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [not found] <bug-209011-215701@https.bugzilla.kernel.org/>
                   ` (5 preceding siblings ...)
  2021-07-28 13:02 ` bugzilla-daemon
@ 2021-07-28 13:20 ` bugzilla-daemon
  2021-07-28 18:10 ` bugzilla-daemon
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-28 13:20 UTC (permalink / raw)
  To: platform-driver-x86

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 209011] asus-wmi always reports tablet mode on a ZenBook UX390UAK
       [not found] <bug-209011-215701@https.bugzilla.kernel.org/>
                   ` (6 preceding siblings ...)
  2021-07-28 13:20 ` bugzilla-daemon
@ 2021-07-28 18:10 ` bugzilla-daemon
  7 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2021-07-28 18:10 UTC (permalink / raw)
  To: platform-driver-x86

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

Hans de Goede (jwrdegoede@fedoraproject.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|drivers_platform_x86@kernel |jwrdegoede@fedoraproject.or
                   |-bugs.osdl.org              |g

--- Comment #14 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
Created attachment 298093
  --> https://bugzilla.kernel.org/attachment.cgi?id=298093&action=edit
[PATCH] platform/x86: Add and use a dual_accel_detect() helper

Ok, this patch should fix this for you (I've already tested the BOSC0200
dual-accel detection part on a similar device).

Please build a 5.13 kernel with this patch added and see if that fixes things.

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-28 18:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
2021-07-28 18:10 ` bugzilla-daemon

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.