Bug 488139 - No auto-rotate controls shown in KCM
Summary: No auto-rotate controls shown in KCM
Status: REOPENED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kscreen (show other bugs)
Version: 6.0.5
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-07 05:45 UTC by m1vri31c
Modified: 2024-09-08 12:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Display & Monitor Settings no auto-rotate (313.61 KB, image/png)
2024-06-12 12:52 UTC, m1vri31c
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m1vri31c 2024-06-07 05:45:28 UTC
SUMMARY
For some reason there is no way to enable auto-rotate without also enabling a large UI "touch mode". Auto-rotate is not a touchscreen feature, it is a form factor feature. Tablets and 2-in-1s can be rotated easily into portrait mode no matter the input method.

EXPECTED RESULT
Auto-rotate as either a separate setting in System Settings, or, preferably, an option from a system tray widget. It could be its own system tray button, or it could be under Display Configuration or Brightness and Color – which incidentally seem like they could be merged into a single system tray widget for display settings.

SOFTWARE/OS VERSIONS
NixOS 24.11 (unstable channel)
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0 
Qt Version: 6.7.1
Comment 1 Nate Graham 2024-06-07 14:57:00 UTC
Just uncheck the "only when in tablet mode" checkbox that appears under the radio button marked "Automatic".
Comment 2 m1vri31c 2024-06-08 05:22:27 UTC
(In reply to Nate Graham from comment #1)
> Just uncheck the "only when in tablet mode" checkbox that appears under the
> radio button marked "Automatic".

For clarity, are you referring to "Touch Mode"? The options I see are: 
• Automatically enable as needed
• Always enabled (I assume this is the option you are referring to)
• Never enabled
"Always enabled" forces autorotate on, but it also makes the certain parts of the UI large and touch friendly, which is the issue I am bringing up – there is no way to access autorotate without also making certain elements of the UI large. Linking these two features (large UI and autorotate) seems arbitrary and causes problems.

It is also more difficult than it should be to manually disable autorotate if you want to temporarily prevent it from switching orientations accidentally while using it handheld. This requires navigating through System Settings to disable Touch Mode, and then you lose your larger UI. 

A dedicated easily accessible autorotate toggle is ubiquitous on tablets, and pretty standard for desktop OSes that may be run on tablets and 2-in-1s – both Windows and Gnome have this feature (and I'm sure others), with Windows putting it in the "Action Center" in the taskbar; I suggested putting it in the system tray somewhere, a pretty similar solution. 

Maybe I should have submitted this as a feature request rather than a bug?
Comment 3 Nate Graham 2024-06-12 12:43:58 UTC
The checkbox in question lives in System Settings > Display & Monitor, with the other screen rotation settings. You can find it there.
Comment 4 m1vri31c 2024-06-12 12:52:03 UTC
Created attachment 170416 [details]
Display & Monitor Settings no auto-rotate
Comment 5 m1vri31c 2024-06-12 12:52:52 UTC
(In reply to m1vri31c from comment #4)
> Created attachment 170416 [details]
> Display & Monitor Settings no auto-rotate

I do not have that option
Comment 6 m1vri31c 2024-06-12 12:56:51 UTC
(In reply to m1vri31c from comment #5)
> (In reply to m1vri31c from comment #4)
> > Created attachment 170416 [details]
> > Display & Monitor Settings no auto-rotate
> 
> I do not have that option

sorry , my comment seems to have been deleted. I am on NixOS 24.11 Unstable Channel, Microsoft Surface Pro 7. This device uses a custom kernel and the IPTS driver.
Comment 7 Nate Graham 2024-06-12 13:14:38 UTC
Well that's unusual. You are using the Wayland session, right? Do you have the iio-sensor-proxy package (or whatever it's named in your distro) installed?
Comment 8 m1vri31c 2024-06-12 13:47:13 UTC
(In reply to Nate Graham from comment #7)
> Well that's unusual. You are using the Wayland session, right? Do you have
> the iio-sensor-proxy package (or whatever it's named in your distro)
> installed?

Yep, Wayland. I have triple checked iio-sensor-proxy is installed – it was installed automatically with the Surface hardware module in NixOS, and I have also tried manually enabling the option AND installed the package in case that had problems. It was installed in all variations, checked using "$ nixos-option environment.systemPackages". Restarted after each change. Display and Monitor settings remain the same. And I checked again that auto-rotate works when "touch mode" is enabled – it does. Auto-rotate works and is enabled exclusively when "Touch Mode" is enabled.
Comment 9 Nate Graham 2024-06-12 16:40:09 UTC
Ok, bear with me for a second... Can you do this?

1. Open System Settings
2. Click "Display & Monitor" in the sidebar
3. Click "Accessibility" in the sidebar"
4. Click "Display & Monitor" in the sidebar again

Do the auto-rotate controls appear now?
Comment 10 m1vri31c 2024-06-14 10:00:12 UTC
(In reply to Nate Graham from comment #9)
> Ok, bear with me for a second... Can you do this?
> 
> 1. Open System Settings
> 2. Click "Display & Monitor" in the sidebar
> 3. Click "Accessibility" in the sidebar"
> 4. Click "Display & Monitor" in the sidebar again
> 
> Do the auto-rotate controls appear now?

They do not
Comment 11 m1vri31c 2024-06-14 10:01:09 UTC
I also submitted bug 488148. Could these be related?
Comment 12 Nate Graham 2024-06-19 23:12:15 UTC
There is definitely *something* going on with these controls. What I'm seeing is that the auto-rotate controls aren't visible when I open the page, but when I enter tablet mode by flipping my laptop's lid back, the controls appear. Clearly the visibility condition of those controls is buggy, and I suspect the issue you're seeing is related to this.
Comment 13 Nate Graham 2024-06-19 23:15:08 UTC
Looked at the code. Your issue is caused by Bug 488148; when we detect there's no tablet mode available, we disable the UI to control whether auto-rotation happens only in tablet mode. The detection is not working as expected for you; but the code in the KCM is doing the right thing with the data it's getting.
Comment 14 Nate Graham 2024-06-19 23:31:17 UTC
For the issue I've seen, I've opened a new bug report: Bug 488764.

*** This bug has been marked as a duplicate of bug 488148 ***
Comment 15 m1vri31c 2024-06-20 12:01:26 UTC
I see. And presumably the Microsoft Surface Pro 7 I'm using doesn't have a "tablet mode", so there are no conditions under which I can access those settings. Thank you Nate
Comment 16 m1vri31c 2024-09-08 12:05:17 UTC
Not a duplicate of bug 488148. That was caused by a keyd virtual pointer. Auto-rotate controls still do not appear in Display & Monitor even with keyd completely uninstalled, and a pointer should not hide them regardless.

Libinput definitely sees my touchscreen and registers its touch capability. It also sees a stylus input even without a stylus connected – could that be what is disabling my auto-rotate controls? 

Libinput list-devices does not register an accelerometer, but from what I can tell, that is not a sensor it is meant to register?
Comment 17 m1vri31c 2024-09-08 12:18:05 UTC
libinput Bug Report:

https://gitlab.freedesktop.org/libinput/libinput/-/issues/1037