Bug 527445 - Panel cloned to another monitor does not stay there after restarting plasmashell
Summary: Panel cloned to another monitor does not stay there after restarting plasmashell
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: 6.8.0
Platform: CachyOS Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen, regression
: 527358 527542 528024 528531 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-10-19 20:54 UTC by Damun
Modified: 2026-11-14 10:15 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.8.3
Sentry Crash Report:


Attachments
Log file (1.99 KB, text/plain)
2026-10-20 14:47 UTC, Damun
Details
Log when cloning the panels (41.25 KB, text/plain)
2026-10-20 15:41 UTC, Ichiro Maikuma
Details
Log of plasma starting after cloning (18.47 KB, text/plain)
2026-10-20 15:42 UTC, Ichiro Maikuma
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damun 2026-10-19 20:54:03 UTC
DESCRIPTION
Adding a default panel to a non primary display will not save where it is, after restarting plasmashell or the system it will move over to the primary display as a duplicate. I have been able to reproduce this even on a fresh install of CachyOS

STEPS TO REPRODUCE
1. Create default panel to non primary display. 
2. Restart system or plasmashell

OBSERVED RESULT
Moves to primary display as a duplicate.

EXPECTED RESULT
Panel should still be on the non primary display

SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a terminal window): CachyOS 
KDE Plasma Version: 6.8
KDE Frameworks Version: 6.31.0
Qt Version:  6.12.0

ADDITIONAL INFORMATION
Comment 1 Marco Martin 2026-10-20 09:46:19 UTC
can you try to reproduce with some debug information?
try in a terminal:

systemctl --user stop plasma-plasmashell
QT_LOGGING_RULES="kde.plasmashell.debug=true;kde.plasmashell.screenpool.debug=true" plasmashell 2>log.txt

this restarts plasmashell making it write a lot of log messages in log.txt
then reproduce the problem (if plasma starts right there with the panel on the wrong screen is already ok)
then stop plasma again with Ctrl+C (you can restart it normally with systemctl --user start plasma-plasmashell)
and attach here log.txt
Comment 2 Damun 2026-10-20 14:47:18 UTC
Created attachment 197409 [details]
Log file

Here you go
Comment 3 Ichiro Maikuma 2026-10-20 15:41:40 UTC
Created attachment 197411 [details]
Log when cloning the panels

This is the log when I clone the panels to another monitor.
Comment 4 Ichiro Maikuma 2026-10-20 15:42:57 UTC
Created attachment 197412 [details]
Log of plasma starting after cloning

And this is the log right after I have cloned the panels and restarted plasma.
Comment 5 Bug Janitor Service 2026-10-20 18:41:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/7264
Comment 6 Bug Janitor Service 2026-10-20 18:41:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/7264
Comment 7 Nate Graham 2026-10-20 19:08:47 UTC
*** Bug 527358 has been marked as a duplicate of this bug. ***
Comment 8 Marco Martin 2026-10-21 14:28:18 UTC
*** Bug 527542 has been marked as a duplicate of this bug. ***
Comment 9 Méven 2026-10-29 13:44:01 UTC
Git commit c41f62dcc6002e095969b142abdc56459d27a028 by Méven Car.
Committed on 29/10/2026 at 11:44.
Pushed by meven into branch 'master'.

shellcorona: give a cloned panel the screen it is cloned to

A panel cloned to another screen moved its view to that screen but kept no screen of its own.
It saved 4294967295 as its screen, so after a restart it opened on the first screen, next to the panel it was copied from.

The clone now gets the screen it is made for before its view is created.

M  +25   -0    shell/autotests/shelltest.cpp
M  +3    -0    shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/c41f62dcc6002e095969b142abdc56459d27a028
Comment 10 Méven 2026-10-29 13:44:02 UTC
Git commit fb75a2825021d944c2ff9c761512bbc6f73d5195 by Méven Car.
Committed on 29/10/2026 at 11:44.
Pushed by meven into branch 'master'.

scripting: keep the screen that addPanel chose for a new panel

The "Default Panel" template and other layout scripts add a panel through ShellCorona::addPanel(), which puts it on the active screen.
The script engine then wrote lastScreen=0 to the panel configuration and restored it.
Since the screen of a containment is read from lastScreen, the panel opened on the first screen after a restart, on top of the panel already there.

The script engine now writes the screen that addPanel() chose.

The shell autotests are built without the scripting engine.
shelltest-scripting builds shelltest with it and runs the case for a panel that a script adds.

M  +28   -1    shell/autotests/CMakeLists.txt
M  +38   -0    shell/autotests/shelltest.cpp
M  +2    -4    shell/scripting/scriptengine.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/fb75a2825021d944c2ff9c761512bbc6f73d5195
Comment 11 Niccolò Venerandi 2026-10-30 08:45:01 UTC
*** Bug 528024 has been marked as a duplicate of this bug. ***
Comment 12 Méven 2026-10-30 09:26:04 UTC
Git commit 7104821888593950dd081086609779863b92557c by Méven Car.
Committed on 29/10/2026 at 13:48.
Pushed by meven into branch 'Plasma/6.8'.

shellcorona: give a cloned panel the screen it is cloned to

A panel cloned to another screen moved its view to that screen but kept no screen of its own.
It saved 4294967295 as its screen, so after a restart it opened on the first screen, next to the panel it was copied from.

The clone now gets the screen it is made for before its view is created.


(cherry picked from commit c41f62dcc6002e095969b142abdc56459d27a028)

Co-authored-by: Méven Car <meven@kde.org>

M  +25   -0    shell/autotests/shelltest.cpp
M  +3    -0    shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/7104821888593950dd081086609779863b92557c
Comment 13 Méven 2026-10-30 09:56:38 UTC
Plasma 6.8.3 scheduled for November 10th,  will fix the issue origin, but won't fix the symptom once a plasma 6.8.2 or earlier started and changed the plasma panels states.

Affected users  will have to fix it once. You can clone panels for instance and remove the redundant one after.
Comment 14 Niccolò Venerandi 2026-11-14 10:15:11 UTC
*** Bug 528531 has been marked as a duplicate of this bug. ***