linuxmint / cinnamon-settings-daemon

The settings daemon for the Cinnamon desktop
GNU General Public License v2.0
57 stars 58 forks source link

Do only rotate if tablet mode is active #359

Open dreng opened 2 years ago

dreng commented 2 years ago
 * Cinnamon version: 5.2.7
 * Distribution - Mint 20.3

Sorry for cross posting, but this one is related to cinnamon and cinnamon-settings-daemon. See also https://github.com/linuxmint/cinnamon/issues/10697

Issue Auto rotate does not honor /sys/bus/platform/drivers/thinkpad_acpi/thinkpad_acpi/hotkey_tablet_mode. The screen rotates even if a Thinkpad Yoga is not in tablet mode (display turned all the way down). The behavior on MS Windows is different and seems to be more logical since automatic rotation does rarely make sense when not in tablet mode.

Steps to reproduce

Expected behaviour

Screen should rotate in tablet mode only (if display is turned down more than 180 degrees, respectively if /sys/bus/platform/drivers/thinkpad_acpi/thinkpad_acpi/hotkey_tablet_mode equals 1).

Other information

dreng commented 2 years ago

I just tried a patched version on my laptop when I realized that this is not the ideal solution. A more elegant way would be to implement an ACPID listener in another thread, as was done with the onscreen keyboard called "onboard". The famous "acpi_listen" could help here.

This has the advantage that not only Thinkpads would benefit. It also allows another important feature to be implemented: When the display is folded back, thereby turning off tablet mode, the screen should automatically rotate back to the "normal" position. If the display is then rotated to "left-up" or "right-up" and tablet mode is activated afterwards by folding the display, this can be detected and the screen can be rotated automatically. This would not be noticed without ACPID Listener.

@cinnamon-settings-daemon dev team What is the default procedure with feature requests here? Do you accept pull requests in general or should one wait for one of you writing like "Yes, we want this implemented but we haven't got any free ressources. Any volunteers?"