You are not logged in.
Hi there,
I have a graphics adapter with three outputs: DisplayPort, HDMI and DVI. The monitor connected to DisplayPort is the primary one and that's perfect.
When I move a window, via keyboard shortcut, from one display to another, the DVI display is the second and the HDMI display is the third.
Is there any way I can switch their order, so when I move a window from the primary display it goes to the HDMI display, then to the DVI?
KDE with Plasma 5.27.4 here. Bellow is xrandr output, if that helps:
Screen 0: minimum 320 x 200, current 5760 x 2160, maximum 16384 x 16384
DisplayPort-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
3840x2160_50.00_rb2 50.00*+
3840x2160_60.00_rb2 60.00
1920x2160 59.99
2560x1440 59.95
1920x1080 60.00 50.00 59.94
1680x1050 59.95
1280x1024 60.02
1440x900 59.89
1280x960 60.00
1280x720 60.00 50.00 59.94
1024x768 60.00
800x600 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 60.00 59.94
HDMI-A-0 connected 1920x1080+3840+0 inverted (normal left inverted right x axis y axis) 352mm x 198mm
1920x1080 60.00*+ 60.00 59.94
1680x1050 60.00
1600x900 60.00
1280x1024 60.02
1440x900 60.00
1280x800 60.00
1152x864 59.97
1280x720 60.00
1024x768 60.00
800x600 60.32
640x480 60.00 59.94
DVI-D-0 connected 1920x1080+3840+1080 (normal left inverted right x axis y axis) 352mm x 198mm
1920x1080 60.00*+ 60.00 59.94
1680x1050 60.00
1600x900 60.00
1280x1024 60.02
1440x900 60.00
1280x800 60.00
1152x864 59.97
1280x720 60.00
1024x768 60.00
800x600 60.32
640x480 60.00 59.94 Thanks in advance.
Last edited by mdcclxv (2023-04-15 12:36:17)
Offline
Drag the screens in the settings view to the order you want.
You can also use xrandr with switches like --left-of (check the man page)
Offline
The physical order is ok, their internal numbering is wrong. The DP display is a 4K, left, then the HDMI is a full HD, placed top-right, and the DVI is also a full HD, placed bottom right, See the xrandr ouput. Yet their numbering is DP=1, DVI=2, HDMI=3. It's counter-clockwise, I need it to be clockwise.
Current setup
+--------------------+ +----------+
| 1 DP | | 3 HDMI |
| | | |
| | +----------+
| | +----------+
| | | 2 DVI |
| | | |
+--------------------+ +----------+How I need it, mind the numbering
+--------------------+ +----------+
| 1 DP | | 2 HDMI |
| | | |
| | +----------+
| | +----------+
| | | 3 DVI |
| | | |
+--------------------+ +----------+Last edited by mdcclxv (2023-04-14 23:48:06)
Offline
I think your case and shortcuts setting,
there are these options in gnome, I use kde more, I'm sure it's keyboard shortcut configuration,
now if you are going to change the position screens, invert the position of the monitor,
sudo pacman -S arandr do it for you.
Offline
I checked the keyboard shortcuts, they are correct. I cannot physically switch the monitors, they are screwed and cabled, it's a lot of work. I would rather convince KDE/Plasma to use the correct numbering.
Offline
I checked the keyboard shortcuts, they are correct
What does this mean? They're clearly not doing what you want, so how are they correct?
Xorg and Xrandr don't have any concept of the monitor "number"*. Each output just has a position, and then there is one "primary" - but there is no "secondary" or "tertiary". Determining what it means to move to the "next" or "previous" monitor is entirely implemented within the window manager. Right now you have a key shortcut that will move a window from DP to DVI (apparently), but you want it to move from DP to HDMI - so that shortcut is not correct.
*note: it's possible that KDE assigns numbers based on the order in which they are listed by xrandr - but doing this without the option of changing those numbers (in some KDE settings) would be a poor design, as this is not an order a user typically has any (convenient) control of. That said, if this is in fact what KDE does and you need to "trick" it to use a different ordering, it might be possible to use either a udev rule or a module load order to force the different video outputs to be enumerated differently by xrandr.
Last edited by Trilby (2023-04-15 00:53:53)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
mdcclxv wrote:I checked the keyboard shortcuts, they are correct
What does this mean? They're clearly not doing what you want, so how are they correct?
The hot key I'm talking about listed in KWin hotkey list as "Window to Next Screen". So yes, it's the correct one.
Right now you have a key shortcut that will move a window from DP to DVI (apparently), but you want it to move from DP to HDMI - so that shortcut is not correct.
No, I have a shortcut that will move to the next screen, which ever that is, which is the whole point of this thread. I have no shortcut defined for moving from DP to DVI.
*note: it's possible that KDE assigns numbers based on the order in which they are listed by xrandr - but doing this without the option of changing those numbers (in some KDE settings) would be a poor design, as this is not an order a user typically has any (convenient) control of. That said, if this is in fact what KDE does and you need to "trick" it to use a different ordering, it might be possible to use either a udev rule or a module load order to force the different video outputs to be enumerated differently by xrandr.
KDE definitely does some internal numbering, because the order of the displays doesn't change from one boot to another, so it's not random. This might be an actual answer to my issue. Could you please elaborate on this?
Last edited by mdcclxv (2023-04-15 11:02:50)
Offline
Online
Now it all adds up, because I did not have this issues until recently.
Thank you Seth, thank you Inspector. I guess I'll wait for a fix. Until then, it just hit me, since I have only three displays I can use the "Windows to Previous Screen" instead of "... Next ..." to achieve the same outcome. Had I had 4 or more, I would be in no luck.
Offline
it just hit me, since I have only three displays I can use the "Windows to Previous Screen" instead of "... Next ..." to achieve the same outcome.
That's what I meant by your shortcuts being "wrong". You had a "move to next" binding for a key combination that you wanted to actually move the window to the monitor that KDE considers "previous" (and vice versa). This would be the same regardless of the number of monitors (though you might need to bind a key to "move next" twice to get your intended results in that case).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
This a hack, no matter how you want to put it. And it's true only for displays placed in a circular manner. Have four of them physically placed in the order 1,3,2,4 and you're screwed. And since this used to work until recently and there is an official bug, my keys definitely were not wrong.
EDIT: What I just posted is a stupid idea, apologies.
Last edited by mdcclxv (2023-04-15 13:10:32)
Offline