I only used KDE Plasma with X11; setting the primary display was simple because System Settings has a setting for that, as @GolDNenex shown.
Reading https://www.baeldung.com/linux/primary-monitor-x-wayland, I learned that Wayland does not have the concept of primary screen.
Unlike changing the primary monitor in X, Wayland does not have the concept of a primary display. Instead, the primary monitor must be implemented by the compositor.
It also explains that KDE Plasma supports Wayland with its KWin compositor and how to set the primary monitor with kscreen-doctor
.
KDE Plasma supports Wayland using its own compositor, KWIn. Let’s use the kscreen-doctor
command, part of the libkscreen package, to set the primary display. We can start by printing information about our various outputs using the –outputs
flag with kscreen-doctor
:
$ kscreen-doctor --outputs
Output: 1 Hewlett Packard HP 22cwa/6CM6501C14 enabled connected HDMI Modes: 0:1920x1080@60*! 1:1920x1080@60
...
Output: 2 Acer Technologies Acer H226HQL/LX2AA0024210 enabled connected primary DVI Modes: 0:1920x1080@60*!
If we want to assign a different primary monitor, we may use the command kscreen-doctor output.”${Name}”.primary
with ${Name}
being the section outputted by kscreen-doctor –outputs
indicating manufacturer, model name, and serial number (i.e. Hewlett Packard HP 22cwa/6CM6501C14).
Let’s try assigning this monitor as the primary display using this format:
$ kscreen-doctor output.'Hewlett Packard HP 22cwa/6CM6501C14'.primary
kscreen.doctor: setop exec returned KScreen::Config(
KScreen::Output(1, "Hewlett Packard HP 22cwa/6CM6501C14", connected enabled primary, ... )
KScreen::Output(2, "Acer Technologies Acer H226HQL/LX2AA0024210", connected enabled, ... ))
I take that setting is not show in System Settings because it is a setting for the used compositor.