Bug 428626 - Auto screen rotation doesn't work anymore unless "only in tablet mode" is unchecked
Summary: Auto screen rotation doesn't work anymore unless "only in tablet mode" is unc...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kscreen (show other bugs)
Version: 5.20.2
Platform: Manjaro Linux
: HI major
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: regression, wayland
: 427217 434209 441490 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-03 01:58 UTC by Alan
Modified: 2021-10-11 16:33 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan 2020-11-03 01:58:33 UTC
SUMMARY

On my Wayland session, auto screen rotation doesn't work anymore.

STEPS TO REPRODUCE
1. Install iio-sensor-proxy
2. Install all the elements for plasma wayland session
3. Login plasma wayland session

OBSERVED RESULT

I flip the screen everywhere and nothing happens (convertible laptop in PC mode). I tried in plasma session only and it works without problem in PC mode (auto screen rotation is OK). So, it must be a bug in the Wayland session.
I haven't got an option in system settings to enable auto screen rotation in tablet mode.


EXPECTED RESULT

Auto screen rotation must working if I flip the screen everywhere in my plasma wayland session.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro 20.1.2
KDE Plasma Version: 5.20.2
Qt Version: 5.15.1
Comment 1 Justin Zobel 2020-11-03 05:53:16 UTC
Confirmed on KDE Neon User Edition wayland session.

Checked monitor-sensor from iio-sensor-proxy and it's detecting the screen orientation changes but the display is not changing.
Comment 2 Alan 2020-11-09 00:34:02 UTC
Hi,

I wanted to quickly let you know about this bug report I posted. I actually managed to get the automatic screen rotation to work under Wayland. I understood why it was not working for me before. Here are the explanations:

I am using qtvkbd which is a virtual keyboard (QT application) working only under xorg. I found a way to make it work under Wayland by using the command QT_QPA_PLATFORM = xcb in the / etc / environment file (which allows to force the use of X11 to be able to use this software). What I didn't know was that by using this method, the automatic screen rotation, as well as the option (in system configuration -> display screen), to activate this automatic rotation under wayland, disappears. . By removing this method, I can't use qtvkbd anymore, but I get the automatic screen rotation back under Wayland.

Sorry to have reported this bug which obviously does not have one. Justin Zobel seems to have another problem, but for me on Manjaro, it's ok.
Comment 3 Alan 2020-11-09 00:39:13 UTC
I missed to say I didn't tested automatic screen rotation in tablet mode. So I don't know if auto screen rotation works in tablet mode under wayland.
Comment 4 Thiago Sueto 2021-07-08 14:58:05 UTC
*** Bug 427217 has been marked as a duplicate of this bug. ***
Comment 5 Thiago Sueto 2021-07-08 14:58:14 UTC
*** Bug 434209 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-09-08 00:00:40 UTC
*** Bug 441490 has been marked as a duplicate of this bug. ***
Comment 7 Aleix Pol 2021-09-09 01:08:25 UTC
Since I don't really have a device at hand that can figure this one out, could you please run these commands when you'd be expecting to have the tablet mode working?

$ dbus-send --session --print-reply --dest=org.kde.KWin /org/kde/KWin org.freedesktop.DBus.Properties.GetAll string:"org.kde.KWin.TabletModeManager"
$ kscreen-doctor -j | grep tabletMode

Thanks!
Comment 8 Justin Zobel 2021-09-09 01:41:23 UTC
method return time=1631151447.810057 sender=:1.3 -> destination=:1.90 serial=534 reply_serial=2
   array [
      dict entry(
         string "tabletMode"
         variant             boolean true
      )
      dict entry(
         string "tabletModeAvailable"
         variant             boolean true
      )
   ]


    "tabletModeAvailable": true,
    "tabletModeEngaged": true
Comment 9 Aleix Pol 2021-09-14 12:54:10 UTC
We had some bugs fixed related to rotation in master, can anyone test if you see any progress here?

On the pinephone (which uses the same concepts as this) it's working fine as far as I can tell.
Comment 10 Nate Graham 2021-09-14 20:23:36 UTC
Still broken for me with today's git master everything. I can confirm that Kirigami sees that we've entered tablet mode properly when I flip over my laptop's screen because the list items in System Settings' sidebar get bigger. But KScreen does not seem to notice.
Comment 11 Nate Graham 2021-09-14 20:24:37 UTC
   array [
      dict entry(
         string "tabletMode"
         variant             boolean false
      )
      dict entry(
         string "tabletModeAvailable"
         variant             boolean true
      )
   ]


64:    "tabletModeAvailable": true,
65:    "tabletModeEngaged": false
Comment 12 Nate Graham 2021-09-14 20:25:59 UTC
Actually sorry, that was the output of those commands when I'm *not* in tablet mode. When I am in tablet mode, the output of those commands is identical to what Justin posted.
Comment 13 Bug Janitor Service 2021-10-10 15:47:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/36
Comment 14 John Clark 2021-10-10 19:19:26 UTC
Git commit c21f2b52999f7127c08c03ace11901c4b356cc93 by Johnathon Clark.
Committed on 10/10/2021 at 15:36.
Pushed by iasensio into branch 'master'.

Fix autorotate when "only in tablet mode" is selected

The setTabletModeAvailable and setTabletModeEngaged properties
were not copied across in Config::apply.

M  +3    -0    src/config.cpp

https://invent.kde.org/plasma/libkscreen/commit/c21f2b52999f7127c08c03ace11901c4b356cc93
Comment 15 Aleix Pol 2021-10-11 00:19:52 UTC
Git commit ed3247db3059a46404d853f3386c32119cc172a6 by Aleix Pol Gonzalez, on behalf of Johnathon Clark.
Committed on 11/10/2021 at 00:19.
Pushed by apol into branch 'Plasma/5.23'.

Fix autorotate when "only in tablet mode" is selected

The setTabletModeAvailable and setTabletModeEngaged properties
were not copied across in Config::apply.


(cherry picked from commit c21f2b52999f7127c08c03ace11901c4b356cc93)

M  +3    -0    src/config.cpp

https://invent.kde.org/plasma/libkscreen/commit/ed3247db3059a46404d853f3386c32119cc172a6