Patreon Logo Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal Logo PayPal. You can also buy games using our partner links for GOG and Humble Store.
Title: Is it possible to assign a "primary monitor" in a Plasma Wayland session? Games always show up on left monitor...
ridge 2 Oct 2021
Edit: This is trivial on today's Plasma desktop, you just assign it in the KDE settings GUI :)

Original post:

Spoiler, click me
So I'll start this out with simply, I know Nvidia + Wayland + KDE is far from perfect, but at this point it's SO CLOSE to becoming my daily driver, and I wonder if this final issue can be resolved to allow that to actually happen.

I use an Nvidia GTX 1060 with three monitors, Manjaro testing branch, KDE Plasma 5.23 Beta. When I log into a Wayland session and try to run a fullscreen game, it shows up on my left monitor instead of the middle, which is assigned as my primary in X11 sessions.

But MAN, is Wayland SILKY smooth! It's such a shame to always have to clench my teeth and go back to X11 when I want to play something. Native, Wine, Proton, doesn't matter, anything running in fullscreen shows up on the left monitor. I've tried making a window rule to force games to position 1920,0 (since my monitors are all 1080p), what's weird is Plasma just crashes, goes completely black when I click save in Plasma settings. Sure they get saved but the rule doesn't work, sadly.

Is there a way?! Can I have my cake and eat it too now, by way of making fullscreen apps appear on the center monitor, or is it too early? Thanks in advance, everyone! ^^

Last edited by ridge on 12 Mar 2023 at 3:08 pm UTC
This topic has an answer marked - jump to answer.
Eike 3 Oct 2021
  • Supporter Plus
KDE's "special settings for window" also have a force monitor setting - on my old KDE with X.
In my old KDE it in system settings, window behaviour, window rules.
(You could try something like "window class" "contains" "steam_app" to match all games.)
ridge 3 Oct 2021
Quoting: EikeKDE's "special settings for window" also have a force monitor setting - on my old KDE with X.
In my old KDE it in system settings, window behaviour, window rules.
(You could try something like "window class" "contains" "steam_app" to match all games.)
You'd think this would be the temporary catch-all solution to solve aforementioned woes, couldn't get force position on monitor to work on my machine tho. Thanks for posting this however, others should definitely try this just in case!

By the way, I see you have an Nvidia card. You say old KDE with X, are you using Wayland now or have used it? Does saving changes to Plasma settings make the entire DE crash for you as well?

Last edited by ridge on 4 Oct 2021 at 6:17 pm UTC
Eike 3 Oct 2021
  • Supporter Plus
Quoting: ridge
Quoting: EikeKDE's "special settings for window" also have a force monitor setting - on my old KDE with X.
In my old KDE it in system settings, window behaviour, window rules.
(You could try something like "window class" "contains" "steam_app" to match all games.)
You'd think this would be the temporary catch-all solution to solve aforementioned woes, couldn't get force position on monitor to work on my machine tho. Thanks for posting this tho, other should definitely try this just in case!

By the way, I see you have an Nvidia card. You say old KDE with X, are you using Wayland now or have used it? Does saving changes to Plasma settings make the entire DE crash for you as well?
I'm very conservative with respect to software at the moment: Debian buster, X server. Never tried Wayland. (Too little time for experiments nowadays...)
ridge 3 Oct 2021
Quoting: EikeI'm very conservative with respect to software at the moment: Debian buster, X server. Never tried Wayland. (Too little time for experiments nowadays...)
Completely understandable! Thanks for getting back to me.
Sojiro84 3 Oct 2021
For now, you need to set the monitor through the terminal.

I made a script so that it always pick's the monitor with the right resolution, which for me is 2560x1440. My other monitor is vertical so that one never gets picked now. I have another script that I sometimes run when I want to game in the TV that has a 4K resolution.

xrandr --output "$(xrandr --query | grep 'connected.*2560x1440' | grep -o 'XWAYLAND[0-9]*')" --primary

Another way is to check what for number your monitor is. You do "xrandr" first in the terminal and find your monitor, then you can do:

xrandr --output XWAYLAND1 --primary

Where XWAYLAND1 is your monitor.

But yeah, there definitely needs to be a solution implemented so that we don't have to keep doing this.
ridge 4 Oct 2021
Quoting: Sojiro84For now, you need to set the monitor through the terminal.

I made a script so that it always pick's the monitor with the right resolution, which for me is 2560x1440. My other monitor is vertical so that one never gets picked now. I have another script that I sometimes run when I want to game in the TV that has a 4K resolution.

xrandr --output "$(xrandr --query | grep 'connected.*2560x1440' | grep -o 'XWAYLAND[0-9]*')" --primary

Another way is to check what for number your monitor is. You do "xrandr" first in the terminal and find your monitor, then you can do:

xrandr --output XWAYLAND1 --primary

Where XWAYLAND1 is your monitor.

But yeah, there definitely needs to be a solution implemented so that we don't have to keep doing this.
YOU ARE A SAINT! Thank you so much!
That script is great, for me tho just setting my monitor as primary with xrandr was enough, fullscreen apps now start on the correct monitor and gameplay is SO smooth.

I can't thank you enough :grin:
pete910 4 Oct 2021
I just set the primary monitor in system settings.

Or is this a Nvidia thing ?
ridge 4 Oct 2021
Quoting: pete910I just set the primary monitor in system settings.

Or is this a Nvidia thing ?
Not sure if it's Nvidia specific, which version of KDE software are you on? When I'm in a Wayland session, I can't specify primary screen in settings. I can on X11 however.
pete910 4 Oct 2021
Quoting: ridge
Quoting: pete910I just set the primary monitor in system settings.

Or is this a Nvidia thing ?
Not sure if it's Nvidia specific, which version of KDE software are you on? When I'm in a Wayland session, I can't specify primary screen in settings. I can on X11 however.
5.22 , it's always worked both on X11 and wayland. Have to admit though I've only been using wayland for the last few months.
ridge 5 Oct 2021
Quoting: pete9105.22 , it's always worked both on X11 and wayland. Have to admit though I've only been using wayland for the last few months.
Hmm, maybe it is then, I'm on the same version. But hey, maybe that means it's close to being added :)
PeeK1e 18 Oct 2021
Quoting: ridgeNot sure if it's Nvidia specific, which version of KDE software are you on? When I'm in a Wayland session, I can't specify primary screen in settings. I can on X11 however.
Nope, its not NVIDIA specific, I'm using an AMD Radeon RX 6800 XT and I'm experiencing the same issue. It seems this is weird behavior with Wayland and KDE
Sojiro84 18 Oct 2021
Quoting: pete910I just set the primary monitor in system settings.

Or is this a Nvidia thing ?
No, at the moment KDE on Wayland does not have a primary monitor option.

Let's hope it will be added in the future, since that would fix some issues with some programs.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon Logo Patreon. Plain Donations: PayPal Logo PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register