https://bugs.kde.org/show_bug.cgi?id=524493
Bug ID: 524493
Summary: Primary display priority is swapped and persisted
after displays have been inactive
Classification: Plasma
Product: kwin
Version First 6.6.6
Reported In:
Platform: Kubuntu
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: output configuration
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
Created attachment 195302
--> https://bugs.kde.org/attachment.cgi?id=195302&action=edit
Archive containing the mentioned outputs
DESCRIPTION
On a three-monitor Wayland setup, KWin changes which monitor has priority 1
after the displays have been inactive for a few hours.
The intended primary display is the middle monitor (DP-3). When the issue
occurs, DP-1 becomes priority 1 and DP-3 becomes priority 2. The rest of the
display configuration remains unchanged.
The incorrect priorities are also written to ~/.config/kwinoutputconfig.json,
so this is not only a temporary mismatch in the live output state.
I have screen locking and system sleep disabled. The displays themselves are
configured in Plasma to turn off after 30 minutes of inactivity. I have not
been able to reproduce the problem simply by running kscreen-doctor --dpms off;
it has so far only happened organically after the computer has been left
inactive for a longer period.
STEPS TO REPRODUCE
Unfortunately I don't currently have a 100% reliable (or more importantly,
quick) way to reproduce this on demand.
1. Use a three-monitor DisplayPort setup under Plasma Wayland.
2. Set the middle monitor (DP-3) as the primary display.
3. Configure the displays to turn off after 30 minutes of inactivity. System
sleep and screen locking are disabled.
4. Leave the computer inactive for a few hours.
5. Wake the displays again.
On most wake-ups (ones that have had the computer inactive for well over the
30-minute screen-off trigger), the left monitor (DP-1) has become the primary
display.
Manually running `kscreen-doctor --dpms off` and waking the displays shortly
afterwards does *not* appear to reproduce the problem.
OBSERVED RESULT
The display priority changes from:
- DP-3: priority 1, middle/primary
- DP-1: priority 2, left
- DP-2: priority 3, right
to:
- DP-1: priority , left/now primary
- DP-3: priority 2, middle
- DP-2: priority 3,right
The monitor positions, resolutions, rotations and identities stay unchanged.
The same change is persisted in ~/.config/kwinoutputconfig.json.
Diff between the configuration immediately after the problem occurred and the
correct configuration (see attachment for more details):
```
--- /tmp/kwin-correct.json 2026-08-20 17:56:32.996125905 +0300
+++ /tmp/kwin-broken.json 2026-08-20 17:55:27.097716428 +0300
@@ -187,7 +187,7 @@
"x": 0,
"y": 380
},
- "priority": 2,
+ "priority": 1,
"replicationSource": ""
},
{
@@ -207,7 +207,7 @@
"x": 1920,
"y": 199
},
- "priority": 1,
+ "priority": 2,
"replicationSource": ""
}
]
```
Changes are reflected in the system settings as expected, and can be manually
reversed via the screen priority configurator. Manually restoring the
priorities with `kscreen-doctor output.DP-3.priority.1 output.DP-1.priority.2
output.DP-2.priority.3` also immediately restores the intended primary display.
EXPECTED RESULT
DP-3 should remain priority 1 / the primary display across display power-off
and wake cycles unless I explicitly change the display configuration.
DISPLAY CONFIGURATION
All three displays are connected using DisplayPort.
DP-1 — left
UUID: e8547ded-144f-4c76-b9e1-040eb1b6637d
Resolution: 1920×1080 @ 60 Hz
Position: 0,380
Rotation: normal
Scale: 1
Intended priority: 2
DP-3 — middle / intended primary
UUID: af3a9ceb-4527-4ebf-ab5b-373058bd6b41
Resolution: 2560×1440 @ 164.80 Hz
Position: 1920,199
Rotation: normal
Scale: 1
Intended priority: 1
DP-2 — right
UUID: fbe10986-fb83-40ef-bf80-eb1916a00dc5
Resolution: 1920×1080 @ 60 Hz
Position: 4480,0, resulting in 1080×1920 due to rotation
Rotation: 90 degrees
Scale: 1
Intended priority: 3
The connector names and UUIDs remain the same before and after the issue
occurs.
SOFTWARE/OS VERSIONS
Operating System: Kubuntu 26.04 LTS
KDE Plasma Version: 6.6.6
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 7.0.0-29-generic (64-bit)
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce RTX 3060
Kwin version: 6.6.6
ADDITIONAL INFORMATION
This looks similar to bug 516611 ("Screen priority/ordering thrown off by power
profiles"), which was fixed in Plasma 6.6.2:
https://bugs.kde.org/show_bug.cgi?id=516611However, this system is running
Plasma/KWin 6.6.6.
I don't know whether the root cause is related. One difference that may be
useful is that in this case the incorrect priority values are actually
persisted into kwinoutputconfig.json.
Like said, I also tested manually turning the displays off with kscreen-doctor
--dpms off. A normal off/on cycle this way did not cause the priorities to
change, so there seems to be some additional condition involved in the organic
failures.
I could not find a "DisplayPort Deep Sleep" or similar option in the monitors'
own settings. The monitor is an MSI MAG272CQR, and as far as I can find the
specs on the internet, it does not have that as a feature.
I have attached:
kscreen-doctor -o with the correct display configuration.
kscreen-doctor -o immediately after the problem occurred.
kwinoutputconfig.json with the correct configuration
kwinoutputconfig.json immediately after the problem occured.
I can collect additional KWin/PowerDevil logs around the next occurrence if
there is a particular logging category or debug information that would be
useful.
--
You are receiving this mail because:
You are watching all bug changes.