Bug 506815 - Tablet mode enables itself when the laptop is rotated
Summary: Tablet mode enables itself when the laptop is rotated
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.4.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-09 17:06 UTC by Riccardo Robecchi
Modified: 2025-09-08 12:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2025-07-09 17:06:39 UTC
SUMMARY
I have a 2-in-1 HP Spectre x360 which can be used both as laptop and tablet. Tablet mode correctly enables when I open the keyboard to the point the device becomes a tablet. When using it as a laptop, however, tablet mode incorrectly turns itself on (and disables both keyboard and touchpad) when the laptop is sat sideways. While this is definitely a "room-heating spacebar" kind of scenario, I use the laptop while on the sofa and I often have it sideways, which makes it impossible to use.

STEPS TO REPRODUCE
1. Have a 2-in-1 laptop with an accelerometer
2. While having the keyboard open in "laptop mode", turn the device sideways

OBSERVED RESULT
Tablet mode is enabled.

EXPECTED RESULT
Tablet mode is not enabled since the device is not acting like a tablet.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Endeavour OS (Arch Linux)
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Comment 1 Zamundaaa 2025-09-01 11:39:20 UTC
Please run
> sudo libinput debug-events
and tilt eh laptop sideways. Does the tablet mode switch trigger when you do that?
Comment 2 Riccardo Robecchi 2025-09-07 09:39:55 UTC
Yes, it looks like it does:
-event2   DEVICE_ADDED                 Power Button                      seat0 default group1  cap:k
-event14  DEVICE_ADDED                 Video Bus                         seat0 default group2  cap:k
-event1   DEVICE_ADDED                 Power Button                      seat0 default group3  cap:k
-event0   DEVICE_ADDED                 Lid Switch                        seat0 default group4  cap:S
-event4   DEVICE_ADDED                 ELAN2514:00 04F3:2597             seat0 default group5  cap:t  size 284x164mm ntouches 10 calib
-event7   DEVICE_ADDED                 ELAN2514:00 04F3:2597 Stylus      seat0 default group5  cap:T  size 296x165mm left calib
-event10  DEVICE_ADDED                 Intel Virtual Buttons             seat0 default group6  cap:k
-event11  DEVICE_ADDED                 Intel Virtual Switches            seat0 default group7  cap:S
-event3   DEVICE_ADDED                 AT Translated Set 2 keyboard      seat0 default group8  cap:k
-event8   DEVICE_ADDED                 SynPS/2 Synaptics TouchPad        seat0 default group9  cap:pg  size 117x57mm tap (dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwtp-on
-event9   DEVICE_ADDED                 Wireless hotkeys                  seat0 default group10 cap:k
-event13  DEVICE_ADDED                 HP WMI hotkeys                    seat0 default group11 cap:kS
-event11  SWITCH_TOGGLE                +0.000s  switch tablet-mode state 1
 event11  SWITCH_TOGGLE                +5.701s  switch tablet-mode state 0
Comment 3 Zamundaaa 2025-09-08 12:34:51 UTC
Okay, then it's almost certainly just something the driver or more likely the firmware does. You can maybe ask at https://gitlab.freedesktop.org/libinput/libinput/-/issues for help about this, but if it's a firmware issue, I'm not sure there's anything that can be done on the OS side.