Bug 427217 - Screen autorotate under wayland fails to detect tablet-mode on a convertible laptop
Summary: Screen autorotate under wayland fails to detect tablet-mode on a convertible ...
Status: RESOLVED DUPLICATE of bug 428626
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.19.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-01 18:34 UTC by Benjamin Hennion
Modified: 2021-07-08 14:58 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Hennion 2020-10-01 18:34:13 UTC
On a Wayland session, when screen autorotate is enabled only in tablet-mode, it does not work at all.
The automatic rotation does work perfectly if I do not tick the box "Only in tablet-mode".

The switch to tablet-mode seems to be detected by Plasma: when entering tablet-mode the icons in the tray become bigger.

The tablet-mode is also detected properly by libinput and evtest outputs
Event: time 1601576158.041596, type 5 (EV_SW), code 1 (SW_TABLET_MODE), value 1
Event: time 1601576158.041596, -------------- SYN_REPORT ------------
when flipping the screen to enter tablet-mode.


STEPS TO REPRODUCE
1. Open kcm in under Wayland and enable automatic screen rotation only in tablet mode.
2. Flip the screen to get into tablet mode and tilt the laptop on the side

OBSERVED RESULT
The screen does not rotate.

EXPECTED RESULT
The screen rotates.

SOFTWARE/OS VERSIONS
Linux: Archlinux kernel 5.8.11 (with a patch for libinput to properly detect the tablet-mode switch)
KDE Plasma Version: 5.19.5
Qt Version: 5.15.1

ADDITIONAL INFORMATION
The virtual keyboard is not enabled by switching to tablet mode either (as it used to be on a Surface Pro 3 I used to have). The bug may not be in kscreen itself. I don't know for sure.
Comment 1 Alan 2020-11-02 11:25:17 UTC
Hi,

On my Wayland session, screen autorotate doesn't work anymore. I flip the screen everywhere and nothing happens (convertible laptop in PC mode). I tried in plasma session only and it works without problem in PC mode (auto screen rotation is OK). So, it must be a bug in the Wayland session.

Tested in Manjaro KDE 20.1.2 with KDE plasma 5.20.2 and Qt version 5.15.1. Kernel 5.9.2 installed.
Comment 2 Aitor 2021-03-16 22:55:00 UTC
(In reply to Benjamin Hennion from comment #0)
> On a Wayland session, when screen autorotate is enabled only in tablet-mode,
> it does not work at all.
> The automatic rotation does work perfectly if I do not tick the box "Only in
> tablet-mode".
> 
I see same behaviour on OpenSUSE Tumbleweed:
Operating System: openSUSE Tumbleweed 20210315
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.11.4-1-default
OS Type: 64-bit
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa DRI Intel® UHD Graphics 620
Comment 3 Thiago Sueto 2021-07-08 14:58:05 UTC

*** This bug has been marked as a duplicate of bug 428626 ***