SUMMARY Tablet mode is enabled when I flip my convertible tablet (lenovo yoga c940 14), as the keyboard turns off. Auto-rotate works when it is on all the time, as expected. Auto-rotation does not happen when the keyboard turns off and "Auto-rotate in tablet mode" is on. STEPS TO REPRODUCE 1. Enable automatic rotation and "Auto-rotate in Tablet Mode" 2. Flip to convertible mode when the keyboard turns off 3. rotate the screen OBSERVED RESULT No rotation EXPECTED RESULT Screen rotates SOFTWARE/OS VERSIONS Operating System: Garuda Linux KDE Plasma Version: 5.26.5 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.1.9-zen1-1-zen (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz Memory: 11.3 GiB of RAM Graphics Processor: Mesa Intel® Iris® Plus Graphics Manufacturer: LENOVO Product Name: 81Q9 System Version: Yoga C940-14IIL ADDITIONAL INFORMATION This has always happened I think, it is not a regression. Additionally, tablet mode only enables (keyboard disables) when the screen is entirely flipped back. On Windows it enables when the screen passes the plane of the keyboard. How can I see 1. raw iio-sensor information 2. whether KDE thinks it is in tablet mode Furthermore, how can KDE settings be changed from the command line?
https://github.com/alesya-h/linux_detect_tablet_mode gives instructions to run ``` stdbuf -oL libinput debug-events ``` to detect the correct events. It seems that no events are emitted when I flip the screen and the keyboard turns off. So it actually makes sense that it is not enabling. The keyboard disabling must be hardware-enforced? It does work on Windows though; and `iio-sensor-proxy` is installed. It's possible that driver support is not here or something?
A substitute I produced, as I was annoyed by this a long time ago and found nothing, hopefully this can be useful for someone else: ``` sh -c 'rm "/tmp/fake-tablet-mode-rotated" 2>/dev/null && { kscreen-doctor output.1.rotation.none ; } || { kscreen-doctor output.1.rotation.left ; touch /tmp/fake-tablet-mode-rotated ; }' ``` I put this command into a widget in the title bar. The main thing I learned is `kscreen-doctor` existing.
Yeah, this is going to end up being an issue in Libinput, iio-sensor-proxy, or even the kernel. I'd recommend starting with Libinput. Good luck!