Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do only rotate if tablet mode is active #10697

Closed
dreng opened this issue Mar 7, 2022 · 5 comments
Closed

Do only rotate if tablet mode is active #10697

dreng opened this issue Mar 7, 2022 · 5 comments

Comments

@dreng
Copy link

dreng commented Mar 7, 2022

 * 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
@mtwebster
Copy link
Member

Hi, instead of adding another setting, perhaps it would make more sense to turn the other 'disable autorotate' switch into a combobox:

Automatic screen rotation:

  • Disabled (currently the default)
  • Enabled
  • Tablet mode only

There'd need to be some additional work in c-s-d as well of course.

I don't use any hardware these settings would be useful on - maybe I'm not seeing a reason to leave that setting separate.

@mtwebster
Copy link
Member

@mtwebster
Copy link
Member

I discovered today that in the next release the orientation manager's job will be done by muffin (some of it's being rebased off of upstream changes) - it already uses the iio-sensor-proxy interface. We'll hold off on this for now to see if the behavior changes.

linuxmint/muffin#601

@dreng
Copy link
Author

dreng commented May 20, 2022

What a disappointing comment! More than 2 months ago I opened this bug report and asked in c-s-d what the procedure for PRs is here. I didn't even get a response. I then decided to sort out the problem and created a PR here and in c-s-d. Again, no reaction. Now, 2 months later, the first response is that you don't accept the PR but wait for something else that does not solve the problem.

Cinnamon's behaviour with convertables is quite embarrassing and that's a shame because the product itself is very good. For example, the screen rotates but the input devices do not. This is simply unusable. I was going to address that problem as well, but let it go because of the poor communication here. You shouldn't treat anyone who wants to contribute to the project like this, or write in the README "We don't want any help. Don't even try." I suggest someone else takes care of these problems then. I'm out.

Sorry for the harsh tone, but I'm really disappointed with how people are treated here.

@clefebvre
Copy link
Member

It's sad but it's a bit out of our control. We planned the muffin rebase on mutter 3.36 two cycles ago, it's a huge amount of work. GNOME got rid of the orientation plugin in GSD to put it in mutter, so we're inheriting the same design change here as part of the rebase.

There's no orientation plugin anymore, as a result. Ideally communication would have been much better, your work would have been merged in March but the outcome would have been the same, this plugin, along with the fix would have disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants