Xrandr --primary not working for some weeks (X not Wayland)

Hi folks,

I have a little script to set my motniros just in case detection does not work and I can’t see anything. Set it to a keyboard shortcut to e. g. switch to internal right as main with big external left.

It used to work properly until (?) may be beginning of the year. Since detection in plasma is more reliable now I haven’t been using the script for a long while…

Problem now is that xrandr does not switch the Main Screen Flag anymore in Plasma.

Scenario.
internal Laptop screen “eDP”
external Dell screen “Display-Port-0”

I set e. g. main screen to Dell via dialog. Works.

If I want to set the main screen to Laptop later on (showing Taskbar etc.) I submit sth like
xrandr --output eDP --primary
No errors, but no effect also.

Has there been a change in xrandr or in Plasma that Plasma always superseeds xrandr setting with it’s own? Is there now acli command I can submit to switch the main screen?

Thanks for any ideas.

Found it.

I added the following after the xrandr command in my switch script (removed --primary option from xrandr as not working)

kscreen-doctor config output.DisplayPort-0.primary

or
kscreen-doctor config output.eDP.primary

when needed on my laptop.

kscreen-doctor --outputs gives you the proper Display names.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.