FS#52918 - [linux] HP_WMI bad report on tablet mode

Attached to Project: Arch Linux
Opened by Itay Lavie (ItayXD) - Friday, 10 February 2017, 14:36 GMT
Last edited by Toolybird (Toolybird) - Saturday, 27 May 2023, 07:57 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Hi, I'm trying to get the 'SW_TABLET_MODE' event to work correctly on my HP Spectre X360.
I think I got most of the peaces of the puzzle, but I need help putting them together.

*hp-wmi is suppose to trigger this event, but has some error on startup, here is dmesg:
```
[ 2.711444] input: HP WMI hotkeys as /devices/virtual/input/input14
[ 2.714634] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20160831/dsopcode-236)
[ 2.714643] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8da6c60c1730), AE_AML_BUFFER_LIMIT (20160831/psparse-543)
[ 2.714654] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8da6c60c3690), AE_AML_BUFFER_LIMIT (20160831/psparse-543)
[ 2.714715] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20160831/dsopcode-236)
[ 2.714719] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8da6c60c1730), AE_AML_BUFFER_LIMIT (20160831/psparse-543)
[ 2.714728] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8da6c60c3690), AE_AML_BUFFER_LIMIT (20160831/psparse-543)

```

*I believe that the problem is related to a [known problem](https://wiki.archlinux.org/index.php/HP_Spectre_x360_13-4231ng#Issues), where the airplane mode key is spammed because everytime I open the computer to more than 180* and close it again to normal I get another spam of airplane mode keys
*I believe the problem is acpi related.
*If I cat the event of INT33D6 ```
cat /dev/input/by-path/platform-INT33D6:00-event
```
I get garbage output `XXXX+X+` when over 180* (tablet state) and when back to normal (laptop state)
*I think there is a mixup of INT33D3 and INT33D6, because INT33D3 (or PNP0C60) is suppose to be incharge of laptop mode see here:
[https://msdn.microsoft.com/library/windows/hardware/dn457868](https://msdn.microsoft.com/library/windows/hardware/dn457868)
[https://patchwork.kernel.org/patch/9306475/](https://patchwork.kernel.org/patch/9306475/)
I also decompiled my DSDT, here is the relevant part (I think):
```
Scope (_SB)
{
Device (VBPA)
{
Name (_HID, "INT33D6" /* Intel Virtual Buttons Device */) // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If ((OSYS >= 0x07DD))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}

Name (VBST, Zero)
Method (VBDL, 0, NotSerialized)
{
If ((^^PCI0.LPCB.EC0.ECOK == One))
{
If ((^^PCI0.LPCB.EC0.CVTS == Zero))
{
VBST = 0x40
}
Else
{
VBST = Zero
}
}
}

Method (VGBS, 0, NotSerialized)
{
If ((^^PCI0.LPCB.EC0.ECOK == One))
{
If ((^^PCI0.LPCB.EC0.CVTS == Zero))
{
VBST = 0x40
}
Else
{
VBST = Zero
}
}

Return (VBST) /* \_SB_.VBPA.VBST */
}
}

Device (CIND)
{
Name (_HID, "INT33D3" /* Intel GPIO Buttons */) // _HID: Hardware ID
Name (_CID, "PNP0C60" /* Display Sensor Device */) // _CID: Compatible ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If ((OSYS >= 0x07DD))
{
Return (0x0B)
}
Else
{
Return (Zero)
}
}
}
}
```

*Putting the the computer at tablet state and back at laptop state result in the folllowing messages on dmesg:
```
[ 4320.122389] intel-vbtn INT33D6:00: unknown event index 0xcc
[ 4320.171779] atkbd serio0: Unknown key pressed (translated set 2, code 0xd8 on isa0060/serio0).
[ 4320.171782] atkbd serio0: Use 'setkeycodes e058 <keycode>' to make it known.
[ 4320.179630] atkbd serio0: Unknown key released (translated set 2, code 0xd8 on isa0060/serio0).
[ 4320.179631] atkbd serio0: Use 'setkeycodes e058 <keycode>' to make it known.
[ 4329.585035] intel-vbtn INT33D6:00: unknown event index 0xcd

```

*I can't read the output of hp-wmi:
```
ls -la /sys/devices/platform/hp-wmi  9:13PM
total 0
drwxr-xr-x 3 root root 0 פבר 9 19:20 .
drwxr-xr-x 22 root root 0 פבר 9 19:20 ..
-rw-r--r-- 1 root root 4096 פבר 9 21:12 als
-r--r--r-- 1 root root 4096 פבר 9 21:12 display
-r--r--r-- 1 root root 4096 פבר 9 21:12 dock
lrwxrwxrwx 1 root root 0 פבר 9 19:20 driver -> ../../../bus/platform/drivers/hp-wmi
-rw-r--r-- 1 root root 4096 פבר 9 21:12 driver_override
-r--r--r-- 1 root root 4096 פבר 9 21:12 hddtemp
-r--r--r-- 1 root root 4096 פבר 9 21:12 modalias
-rw-r--r-- 1 root root 4096 פבר 9 21:12 postcode
drwxr-xr-x 2 root root 0 פבר 9 21:11 power
lrwxrwxrwx 1 root root 0 פבר 9 19:26 subsystem -> ../../../bus/platform
-r--r--r-- 1 root root 4096 פבר 9 21:12 tablet
-rw-r--r-- 1 root root 4096 פבר 9 21:12 uevent

```

```

sudo cat /sys/devices/platform/hp-wmi/tablet  9:12PM
cat: tablet: Invalid argument

```

After trying to read it I get these messages on dmesg:
```
[12025.122317] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20160831/dsopcode-236)
[12025.122323] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8da6c60c1730), AE_AML_BUFFER_LIMIT (20160831/psparse-543)
[12025.122332] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8da6c60c3690), AE_AML_BUFFER_LIMIT (20160831/psparse-543)

```

*xev output is identical when pressing airplane mode key and when switching from laptop to tablet and vise versa:
```
MappingNotify event, serial 35, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

```

Additional info:
Kernel virsion 4.9.6-1
Logs included at the description

Steps to reproduce:
Switch between tablet state and laptop state with HP Spectre X360
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 27 May 2023, 07:57 GMT
Reason for closing:  No response
Additional comments about closing:  Plus it's old and stale. If still an issue, please report upstream.
Comment by Jürgen Wich (jwich) - Sunday, 23 April 2017, 09:47 GMT
I've got exactly the same problem with HP Spectre x360 and Fedora25 (Kernel 4.10.10-200.fc25.x86_64). If I wait in GDM for about 10 seconds before login, I don't get flight mode spam. So, I think it's not only an Arch related problem. Maybe it's a wrong implementation of ACPI in HP Spectre?
Has someone an idea how to workaround/solve this problem?
I can also provide log files if necessary.
Comment by mattia (nTia89) - Sunday, 27 February 2022, 09:04 GMT
I cannot reproduce the issue. Is it still valid for you?

Loading...