Wayland: Display rotation is not reset when re-entering laptop mode
Affected version
- Fedora 34
- Mutter 40.3
- gnome-shell 40.3
- Wayland; on xorg auto-rotation is enabled/disabled manually from the shell
- ThinkPad X390 Yoga (chassis_type 31)
Bug summary
In a Wayland session, autorotation in automatically enabled when entering tablet mode and disabled when in laptop mode. This results in the display getting locked in the wrong orientation with no easy way to restore it, other than navigating to settings upside-down/sideways, or re-entering tablet mode, switching to another wrong orientation and finally to the right one, as screen rotation only happens after an orientation change in tablet mode.
Steps to reproduce
- Enter tablet mode by turning the laptop into a "tent"
- Exit tablet mode quickly enough for the screen to not rotate (easier to repro by turning sideways and then entering laptop mode)
What happened
The screen retains its rotation.
What did you expect to happen
The screen rotation resets when entering laptop mode. Had the user wanted to retain the rotation, they could've locked it.
Edited by Matti C