Bug 475072 - Apps are displayed on the wrong screen
Summary: Apps are displayed on the wrong screen
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.8
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-30 22:35 UTC by gregmadman
Modified: 2023-10-17 19:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gregmadman 2023-09-30 22:35:11 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Have a two screens setup (or more)
2. Have the primary screen on the right

OBSERVED RESULT
All the opened apps and games are launched and displayed on the most left screen even if it is not set as primary

EXPECTED RESULT
All the opened apps and games should be launched and displayed on the primary screen

SOFTWARE/OS VERSIONS
Linux: OpenSUSE Tumbleweed 20230927 
KDE Plasma Version: 5.27.8
KDE Frameworks Version:  5.110.0
Qt Version: 5.15.10
Kernel Version : 6.5.4-1-default (64 bits)
Graphical Platform : Wayland
Comment 1 Nate Graham 2023-10-11 19:38:57 UTC
Primary-ness doesn't affect which screen apps are launched on.
Comment 2 gregmadman 2023-10-11 23:06:53 UTC
(In reply to Nate Graham from comment #1)
> Primary-ness doesn't affect which screen apps are launched on.

So what is the good use?
Comment 3 Nate Graham 2023-10-12 21:35:30 UTC
Your Primary screen is the one with your first Plasma desktop and any panels on it.

As the explanatory text in the Display and Monitor page says:

"This determines which screen your main desktop appears on, along with any Plasma Panels in it. Some older games also use this setting to decide which screen to appear on. It has no effect on what screen notifications or other windows appear on."
Comment 4 gregmadman 2023-10-12 21:46:36 UTC
Ok, thank you for your answer. So I did not understand what beeing "primary" involved for a screen. Is there a graphical way to oblige the games and apps in général to be displayed on a chosen screen ? 

I have fixed the "problem" by using this command `xrandr --output DP-3 --primary` , but I am not sure that an option does exist in KDE + Wayland to set this parameter.
Comment 5 Nate Graham 2023-10-12 22:18:18 UTC
You can set which screen is primary on the Display and Monitor page in System Settings.

In general on Wayland apps and windows open on the screen with the mouse on it. If you'd like to change this you can do so in System Settings > Window Behavior, or using the "Window Rules" feature to force them to always appear on a particular screen.
Comment 6 gregmadman 2023-10-15 19:31:11 UTC
(In reply to Nate Graham from comment #5)
> You can set which screen is primary on the Display and Monitor page in
> System Settings.
> 
> In general on Wayland apps and windows open on the screen with the mouse on
> it. If you'd like to change this you can do so in System Settings > Window
> Behavior, or using the "Window Rules" feature to force them to always appear
> on a particular screen.

I have set my screen as primary this way using "Display and Monitor" section.

Moreover, inside of "Windows behavior", I have added a kwin script called "Always open on primary screen". When activated, all the apps opening on the wrong screen (the lefmost one). If disabled, some of the scripts are displayed on the primary one, and some others (like games) on the leftmost. In my case, some of the apps (including games) are definitely not opening where my mouse cursor is.
Comment 7 Nate Graham 2023-10-16 18:10:58 UTC
I can't comment on what might be going wrong with that 3rd-party script, sorry. I'd recommend that you follow up at https://discuss.kde.org/c/help/6.
Comment 8 gregmadman 2023-10-17 19:58:14 UTC
(In reply to Nate Graham from comment #7)
> I can't comment on what might be going wrong with that 3rd-party script,
> sorry. I'd recommend that you follow up at https://discuss.kde.org/c/help/6.

I have opened a ticket. Obviously, this script does not work so I have given up. But if I am trying to find a solution using 3rd-party scripts or something else, it is just because the thing is not natively working :/