https://bugs.kde.org/show_bug.cgi?id=517499
--- Comment #1 from Branislav Klocok <[email protected]> --- Summary Panel/taskbar remains on the laptop's built-in display (eDP-1) instead of the external monitor, even though kscreen-doctor confirms the external monitor has priority 1. The issue occurs when switching between locations with different external monitors. Setting the primary manually in System Settings works, but the panel reverts to eDP-1 when docking at a different location. Steps to Reproduce Laptop with built-in display (eDP-1) docked at Location A with external Monitor A via DisplayPort (DP-4) Set Monitor A (DP-4) as primary in System Settings → Display & Monitor → Apply Panel moves to DP-4 correctly — verified with kscreen-doctor -o showing DP-4 as priority 1 Undock and move to Location B with a different external Monitor B (also connects as DP-4) Log in / dock at Location B Actual Result kscreen-doctor -o shows DP-4 as priority 1 (correct) KWin maps Screen 0 = eDP-1, Screen 1 = DP-4 Panel/taskbar appears on eDP-1 (Screen 0) despite DP-4 having priority 1 Setting the primary again in System Settings fixes it until the next location change Expected Result The panel should appear on whichever display has priority 1 (the primary), regardless of which specific external monitor is connected. When docking at a new location, the panel should follow the screen priority setting. Root Cause Analysis Investigation revealed two issues: 1. Stale ScreenConnectors mapping in plasmashellrc The [ScreenConnectors] section in ~/.config/plasmashellrc accumulates old connector mappings from every monitor ever connected: [ScreenConnectors] 0=DP-4 1=DP-3 2=HDMI-1 3=:0.0 4=DP-1 5=HDMI-A-1 6=eDP-1 This conflicts with KWin's actual screen ordering (Screen 0 = eDP-1, Screen 1 = DP-4). Plasmashell uses the stale mapping to place the panel, while KWin uses the real output order. The panel ends up on the wrong screen. Manually cleaning [ScreenConnectors] to match KWin's current reality fixes the issue at the current location, but breaks again at the next location because the mapping is static and doesn't adapt to different monitor combinations. 2. plasma-kscreen.service not saving profiles The plasma-kscreen.service was found inactive (dead), and even after starting it, no profile files are written to ~/.local/share/kscreen/ when changing display settings via kscreen-doctor or System Settings. The OutputRetention=1 setting in kscreenrc does not help. This means display preferences cannot persist per-arrangement. Environment Operating System: openSUSE Tumbleweed KDE Plasma Version: 6.6.2 KDE Frameworks Version: (current Tumbleweed) Graphics Platform: Wayland Hardware: Lenovo ThinkPad X1 Carbon 6th Gen GPU: Intel UHD 620 Displays: eDP-1 (built-in 1920x1080) + various external monitors via USB-C/DisplayPort dock Packages: kscreen6-6.6.2-1.1.x86_64 libkscreen6-plugin-6.6.2-1.1.x86_64 libKF6Screen8-6.6.2-1.1.x86_64 libKF6ScreenDpms8-6.6.2-1.1.x86_64 Diagnostic Output kscreen-doctor -o (at time of issue) Output: 1 eDP-1 [uuid] enabled, connected, priority 2, Panel Geometry: 0,0 1536x864, Scale: 1.25 Output: 2 DP-4 [uuid] enabled, connected, priority 1, DisplayPort Geometry: 1536,0 1536x864, Scale: 1.25 KWin screen mapping Screen 0: eDP-1 Geometry: 0,0,1536x864 Screen 1: DP-4 Geometry: 1536,0,1536x864 Panel config (plasma-org.kde.plasma.desktop-appletsrc) [Containments][3] lastScreen=0 ← should follow priority, but stays on Screen 0 (eDP-1) location=4 plugin=org.kde.panel kscreen profile directory ~/.local/share/kscreen/ — empty, no profiles being written Additional Notes In Plasma 5, the "Save settings for only this specific display arrangement" feature handled this use case. It was removed in Plasma 6 (noted as "too buggy and nearly impossible to fix"). The use case of a laptop user docking at different locations (home, office, etc.) with different external monitors is very common, especially with ThinkPad docks. The plasmashell [ScreenConnectors] mapping does not update dynamically when the actual screen configuration changes, creating a persistent mismatch with KWin's output ordering. A proper fix would either: (a) re-introduce per-arrangement profiles in a more robust form, or (b) make plasmashell always resolve the panel screen from KWin's current priority/ordering rather than relying on a static connector-to-number map. -- You are receiving this mail because: You are watching all bug changes.
