Skip to content

Do only rotate if tablet mode is active #10697

Description

@dreng
 * 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 linuxmint/cinnamon-settings-daemon#359

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

  • Take a Lenovo Thinkpad Yoga, e.g. X390 or X13
  • Turn Auto Rotate on in display settings
  • Have a look at /sys/bus/platform/drivers/thinkpad_acpi/thinkpad_acpi/hotkey_tablet_mode -> 0
  • Rotate display and watch the screen rotate automagically
  • Rotate back
  • Turn display at least 180 degrees down
  • Have a look at /sys/bus/platform/drivers/thinkpad_acpi/thinkpad_acpi/hotkey_tablet_mode again -> 1
  • Rotate display again -> screen rotates like seen before

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

  • The fix has to take place in cinnamon-settings-daemon/plugins/orientation/csd-orientation-manager.c
  • A new GSettingsSwitch like "orientation-lock-tablet-mode" in org.cinnamon.settings-daemon.peripherals.touchscreen should be implemented
  • Display settings: A new switch should be implemented in cinnamon/files/usr/share/cinnamon/cinnamon-settings/modules/cs_display.py like "Rotate in tablet mode only"
  • More information about thinkpad-acpi hotkey_tablet_mode: https://www.kernel.org/doc/html/latest/admin-guide/laptops/thinkpad-acpi.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions