Bug 442158 - primary display in wayland
Summary: primary display in wayland
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kscreen (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: wayland
: 392578 429657 438265 445108 447927 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-08 04:57 UTC by barinov274
Modified: 2022-01-12 19:55 UTC (History)
12 users (show)

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


Attachments
info center displays number (98.42 KB, image/png)
2021-09-09 10:16 UTC, barinov274
Details

Note You need to log in before you can comment on or make changes to this bug.
Description barinov274 2021-09-08 04:57:07 UTC
I have two displays and I can't choose primary one in wayland session. 
Can you add "Use as a primary display" button in displays settings?
Comment 1 Nate Graham 2021-09-08 22:41:17 UTC
Wayland has no concept of a primary display, so we cannot add a UI for it, sorry. We are currently working on exposing a better way of allowing you to move panels and desktops around, which is what I suspect you are trying to do by setting the primary display. This won't get into Plasma 5.23, but hopefully 5.24 will have it.
Comment 2 barinov274 2021-09-09 10:16:44 UTC
Created attachment 141418 [details]
info center displays number
Comment 3 barinov274 2021-09-09 10:16:59 UTC
But when I swap displays(connect to another hdmi), panel appears on another display and when I launch games or full screen applications, they appear on the display where panel appeared.
This is a problem. I don't need to move the panel. I need my games to run on the *primary* display of my choice.
When I open wayland Info Center, I see my first display and second display. And display '0' is the display where the panel is located and where the games launch. If wayland doesn't has a concept of primary displays then what is it?
Comment 4 Nate Graham 2021-09-14 14:56:59 UTC
"First display" and "primary display" are different concepts.

Given the degree to which people seem to want to consider and designate one of the displays as the primary one, we may end up re-introducing the concept on Way;and, even though it is not based on any underlying feature in Wayland itself (as it is on X11).

That discussion is currently happening in https://invent.kde.org/plasma/plasma-workspace/-/issues/21.
Comment 5 Nate Graham 2021-09-21 21:51:11 UTC
*** Bug 442608 has been marked as a duplicate of this bug. ***
Comment 6 Méven Car 2021-09-27 07:27:01 UTC
(In reply to barinov274 from comment #3)
> But when I swap displays(connect to another hdmi), panel appears on another
> display and when I launch games or full screen applications, they appear on
> the display where panel appeared.
> This is a problem. I don't need to move the panel. I need my games to run on
> the *primary* display of my choice.
> When I open wayland Info Center, I see my first display and second display.
> And display '0' is the display where the panel is located and where the
> games launch. If wayland doesn't has a concept of primary displays then what
> is it?

A way to circumvent this, is by default kwin_wayland will launch the app on the current screen. So make sure to launch your games from an app or icon in the screen you want your game to launch.
Comment 7 Nicolas Fella 2021-11-04 16:12:24 UTC
*** Bug 392578 has been marked as a duplicate of this bug. ***
Comment 8 Nicolas Fella 2021-11-04 16:15:32 UTC
*** Bug 438265 has been marked as a duplicate of this bug. ***
Comment 9 Nicolas Fella 2021-11-04 16:19:55 UTC
*** Bug 429657 has been marked as a duplicate of this bug. ***
Comment 10 Zamundaaa 2021-11-08 08:24:09 UTC
*** Bug 445108 has been marked as a duplicate of this bug. ***
Comment 12 Philipp A. 2021-11-13 11:09:27 UTC
How can I turn this off?

I love being able to open things on the desktop I currently care about. “Primary” is really not a concept that makes sens if you have e.g. a projector.

I hate having to change the primary monitor through settings when wanting to play a game on my projector.
Comment 13 Mikhail Ramendik 2021-11-15 16:04:58 UTC
*** Bug 383067 has been marked as a duplicate of this bug. ***
Comment 14 Bernd Steinhauser 2021-11-15 17:42:36 UTC
(In reply to Philipp A. from comment #12)
> How can I turn this off?
> 
> I love being able to open things on the desktop I currently care about.
> “Primary” is really not a concept that makes sens if you have e.g. a
> projector.
> 
> I hate having to change the primary monitor through settings when wanting to
> play a game on my projector.

You shouldn't have to. Or at least only once. Then upon plug/unplug or switch on/off kscreen should switch the layout automatically changing the primary to the one that you selected.
Alternatively the "Display Configuration" entry in the systray could have a layout selection of nameable layouts that you pre-configured.
e.g. "Projector Gaming" where the projector is then primary and "Normal Desktop", where the projector is off.

While Windows generally sucks for multi-monitor use, this is one of the few things they get right.
I only configured my working laptop once for the 3 environments I use (Office with 2 external screens, Home with 1 external screen and mobile with only the laptop screen) and it switches automatically and reliably between the three if the corresponding external screens are available.
Plasma on the other hand is a real pain when it comes to multi-monitor. Even nowadays it keeps shifting around backgrounds and screens after a couple of sessions even without any hardware changes.
This is so annoying that I basically gave up doing much configuration of the desktop/panel/etc. because it'll be obsolete soon enough anyway.
Comment 15 Philipp A. 2021-12-16 14:19:18 UTC
Yeah, that’s exactly what changing the “primary monitor” means for plasma currently. I want my panels to stay on the physical monitor I put them on and I only want fullscreen apps to launch on the projector.

This is effortlessly provided by the previous Wayland behavior of “apps launch on the screen where the cursor is”, and impossible with the new behavior even with profiles.

I therefore want an option to revert plasma’s behavior to what it did before 5.24.
Comment 16 Bernd Steinhauser 2021-12-16 15:24:59 UTC
(In reply to Philipp A. from comment #15)
> Yeah, that’s exactly what changing the “primary monitor” means for plasma
> currently. I want my panels to stay on the physical monitor I put them on
> and I only want fullscreen apps to launch on the projector.
> 
> This is effortlessly provided by the previous Wayland behavior of “apps
> launch on the screen where the cursor is”, and impossible with the new
> behavior even with profiles.
> 
> I therefore want an option to revert plasma’s behavior to what it did before
> 5.24.

Did try with Plasma yet, but on X11, this is accomplished by the option "Active screen follows mouse" in Systemsettings/Workspace/Window Behavior. If you activate that, programs will open on the screen your cursor is currently on.
Comment 17 Philipp A. 2021-12-16 17:30:44 UTC
I have that on, but most games place themselves on the “primary screen”. That’s why I was happy that up until now on Wayland, all APIs for that returned the active screen.
Comment 18 Bernd Steinhauser 2021-12-17 15:06:59 UTC
(In reply to Philipp A. from comment #17)
> I have that on, but most games place themselves on the “primary screen”.
> That’s why I was happy that up until now on Wayland, all APIs for that
> returned the active screen.

Then I would assume that it is a (separate) bug you should report. ;)
It could be related to bug 383067 that reported a couple of years ago for a specific widget, but it could also be unrelated.
Comment 19 Nate Graham 2022-01-12 19:55:55 UTC
*** Bug 447927 has been marked as a duplicate of this bug. ***