Kwayland/kscreen: Flip/mirror screen impossible yet

Hi everyone,

Since one of my screens is a teleprompter, that I essentially need for video conferences and presentations, I need the possibility to mirror a screen.

This has not been implemented in Wayland yet and I do not know, how much work has to be invested:

I am excited to learn, how to collectively spend money in sponsored development. But - as a private person - my “possibilities are somehow limited” :wink:

Kind regards,
Peer

Shouldn’t be a lot, and doesn’t require any sponsoring. The reason it isn’t implemented yet is mostly that there wasn’t really any known use cases for it… I’ll look into it next week

3 Likes

Great, thank you very much! :star_struck:

Yes, the use case isn’t that obvious. Due to Corona, there might be a few more people like me with a teleprompter/autocue.

It’s done: in Plasma 6 you’ll be able to make a screen be mirrored on the X axis with kscreen-doctor output.screenname.rotation.flipped (or mirrored on the X axis + rotated by some angle with flipped90, flipped180 or flipped270)

4 Likes

For those finding this later, the way to find the name of the screen is

kscreen-doctor -o

Then at the top of each item it will look something like this:
Output: 1 DP-2
Output: 2 DP-3
Output: 3 HDMI-A-1

In my case, the one I wanted to change was HDMI-A-1 so I made the command kscreen-doctor output.HDMI-A-1.rotation.flipped and that worked.

Thanks Zamundaaa!

Note: the reason I wanted to do this was same as pking, I wanted to flip it for a teleprompter.

Hi Xaver ( @Zamundaaa ),

thank you very much again, but do you know if anything has changed?

Since the update yesterday (kernel update to 6.9.9-arch1-1) flipping fails again. Rotation works as expected but flipping throws an error (see logging).

Command

Explanation:

  • DisplayPort-0 → 90° rotated (monitor in portrait mode)
  • DisplayPort-1 → 180° rotated (monitor upside down)
  • HDMI-A-0 → mirrored (monitor seen on a mirror, teleprompter)
kscreen-doctor                                \
  output.HDMI-A-0.mode.2560x1440@60           \
  output.HDMI-A-0.position.0,0                \
  output.HDMI-A-0.rotation.flipped            \
                                              \
  output.DisplayPort-1.mode.5120x2160@72      \
  output.DisplayPort-1.position.2560,400      \
  output.DisplayPort-1.rotation.inverted      \
  output.DisplayPort-1.priority.1             \
                                              \
  output.DisplayPort-0.mode.2560x1440@60      \
  output.DisplayPort-0.position.7680,0        \
  output.DisplayPort-0.rotation.left          \
                                              \
  output.HDMI-A-0.enable                      \
  output.DisplayPort-1.enable                 \
  output.DisplayPort-0.enable                 \
  output.HDMI-A-1.disable                     \
  output.HDMI-A-1-2.disable

Logging:

kscreen_backend_launcher: kscreen.xrandr: XRandR::setConfig
kscreen_backend_launcher: kscreen.xrandr: Requested screen size is QSize(9120, 2560)
kscreen_backend_launcher: kscreen.xrandr: Needed CRTCs:  3
kscreen_backend_launcher: kscreen.xrandr: Actions to perform:
                                         Priorities: false
kscreen_backend_launcher: kscreen.xrandr:         Change Screen Size: false
kscreen_backend_launcher: kscreen.xrandr:         Disable outputs: false
kscreen_backend_launcher: kscreen.xrandr:         Change outputs: true
kscreen_backend_launcher: kscreen.xrandr:                  QList(83, 85)
kscreen_backend_launcher: kscreen.xrandr:         Enable outputs: false
kscreen_backend_launcher: kscreen.xrandr: RRSetCrtcConfig (change output) 
                                         Output: 83 ( "DisplayPort-0" ) 
                                         CRTC: 78 
                                         Pos: QPoint(7680,0) 
                                         Mode: KScreen::Mode(Id: "88" , Size: QSize(2560, 1440) @ 59.9506 ) Preferred: "88" 
                                         Rotation: KScreen::Output::Left
kscreen_backend_launcher: kscreen.xrandr: XRandRCrtc  78  m_timestamp update  49678791  =>  49799804
kscreen_backend_launcher: kscreen.xrandr:         Result:  0  timestamp:  49799804
kscreen_backend_launcher: kscreen.xrandr: XRandROutput 83 update 
                                         m_connected: 0 
                                         m_crtc XRandRCrtc(0x59c4ea4806e0) 
                                         CRTC: 78 
                                         MODE: 88 
                                         Connection: 0
kscreen_backend_launcher: kscreen.xrandr: RRSetCrtcConfig (change output) 
                                         Output: 85 ( "HDMI-A-0" ) 
                                         CRTC: 80 
                                         Pos: QPoint(0,0) 
                                         Mode: KScreen::Mode(Id: "88" , Size: QSize(2560, 1440) @ 59.9506 ) Preferred: "88" 
                                         Rotation: KScreen::Output::Flipped
kscreen_backend_launcher: kscreen.xrandr:         Result: unknown (error)
kscreen_backend_launcher: kscreen.xrandr: RRSetOutputPrimary 
                                         New priority: 3
kscreen_backend_launcher: kscreen.xrandr: RRSetOutputPrimary 
                                         New priority: 1
kscreen_backend_launcher: kscreen.xrandr: RRSetOutputPrimary 
                                         New priority: 2
kscreen_backend_launcher: kscreen.xrandr: RRSetOutputPrimary 
                                         New priority: 0
kscreen_backend_launcher: kscreen.xrandr: RRSetOutputPrimary 
                                         New priority: 0
kscreen_backend_launcher: kscreen.xrandr: XRandR::setConfig done!

Nothing has changed, but you’re using Xorg. This is only supported on Wayland

1 Like

Wow, very fast :smile: thank you … and :astonished: :flushed: yes you are right: I remembered, that I accidentially clicked on that area but did not recognitze that I changed anything. Since it was the first start after updating I thought it was somehow related with the update and that the kscreen.xrandr messages were some new developments.

Setting back to wayland: Everything as expected :smiley: :smiley:

Thanks again :blush: