Bug 434094 - Plasmashell loads broken profile on login when an external monitor is connected
Summary: Plasmashell loads broken profile on login when an external monitor is connected
Status: RESOLVED DUPLICATE of bug 370180
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-multiscreen (show other bugs)
Version: 5.21.2
Platform: Manjaro Linux
: NOR minor
Target Milestone: 1.0
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-07 08:54 UTC by jan.claussen10
Modified: 2021-08-16 23:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
attachment-3406-0.html (913 bytes, text/html)
2021-03-10 19:36 UTC, jan.claussen10
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jan.claussen10 2021-03-07 08:54:26 UTC
SUMMARY
Well, I am experiencing issues in Latte which only dissolve after I restart plasmashell. Namely the desktop icon dodging and panel icon painting functions. 
See: https://bugs.kde.org/show_bug.cgi?id=424356#add_comment

These issues usually occur after booting and are dissolved by killing and restarting plasmashell and latte-dock afterwards. Only restarting latte-dock doesn't help, so I guess it is related to plasmashell.

STEPS TO REPRODUCE
1. Boot the system with latte-dock loading automatically

OBSERVED RESULT
Icons are not dodging and icon painting based on wallpaper are not working


SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Comment 1 Marco Martin 2021-03-08 15:27:57 UTC
when it happens, can you from a terminal:
* launch xprop
* click on the lattedock panel
* paste here what the command tells about that window
Comment 2 jan.claussen10 2021-03-08 15:37:56 UTC
_NET_WM_USER_TIME(CARDINAL) = 47302
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STRUT(CARDINAL) = 0, 0, 32, 0
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 32, 0, 0, 0, 0, 0, 0, 2559, 0, 0
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE, _NET_WM_STATE_STAYS_ON_TOP, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _KDE_NET_WM_STATE_SKIP_SWITCHER
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 14459
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "latte-dock"
_NET_WM_ICON(CARDINAL) =        Icon (16 x 16)
        Icon (22 x 22):
        Icon (32 x 32):
        Icon (48 x 48):
        Icon (64 x 64):
        Icon (128 x 128):
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "#view#1"
_NET_WM_NAME(UTF8_STRING) = "#view#1 — Latte Dock"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x2e0001c
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: False
                window id # of group leader: 0x2e0001c
WM_CLIENT_MACHINE(STRING) = "X380-Yoga"
_NET_WM_PID(CARDINAL) = 1959
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 48234523
WM_CLASS(STRING) = "latte-dock", "lattedock"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 0
                user specified size: 2560 by 32
                program specified minimum size: 2560 by 32
                program specified maximum size: 2560 by 32
                window gravity: Static
Comment 3 jan.claussen10 2021-03-10 19:36:14 UTC
Created attachment 136563 [details]
attachment-3406-0.html

I think I have found the source of the problem but no solution yet. When I boot the laptop all of my widgets are gone an old wallpaper is shown. When I then quit and restart plasmashell, the widgets are there, the new wallpaper is set and Latte works again. What could be the reason that plasmashell loads an old profile at boot?

On März 8 2021, at 4:27 pm, Marco Martin <bugzilla_noreply@kde.org> wrote:
> https://bugs.kde.org/show_bug.cgi?id=434094
>
> --- Comment #1 from Marco Martin <notmart@gmail.com> ---
> when it happens, can you from a terminal:
> * launch xprop
> * click on the lattedock panel
> * paste here what the command tells about that window
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 4 jan.claussen10 2021-03-11 18:25:58 UTC
Hmm this is really weird. I tried deleting all the files in ~/.cache/plasmashell and also ~/.cache/icon-cache.kcache and I get exactly the same behavior.
Comment 5 jan.claussen10 2021-03-11 20:23:16 UTC
So it seems like there are two session profiles. A fault one is loaded at login and the working one that contains all the applets from ~/.config/plasma-org.kde.plasma.desktop-appletsrc loads after reloading plasmashell by entering plasmashell —-replace

Why could this be? I know it is probably a configuration error, but I don‘t want to reinstall the system because of it or create a new user just yet
Comment 6 jan.claussen10 2021-03-19 08:49:53 UTC
I discovered yesterday that this only happens, when there is an external monitor is connected. It seems like plasmashell first loads a secondary profile for the secondary monitor. After replacing the shell it loads the first monitor profile. I just don't understand why the secondary profile is broken and Latte dock cannot load.
Comment 7 csibesz995 2021-07-06 19:28:24 UTC
Hi, same problem here.
I only wanted KDE to use my second HDMI monitor, not the built-on laptop.
Obervations: 
 - desktop icons load but not at the place i left them
 - Task manager does not load at all (possibly thinks it should be on first monitor)
 - plasmashell —-replace & fixes task manager and icons
 - but not the desktop effects like blur, transparency 
So i tried all the kde display configs possible etc
Now that seems to work is configuring /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
    Identifier "VGA-1-2"
    Option "Ignore" "true"
EndSection

Section "Monitor"
    Identifier "LVDS1"
    Option "Ignore" "true"
EndSection

Trick is ignoring built-in monitor (LVDS1) in X before KDE has chance to detect it. (Somewhy i had VGA too so ignored that one too).
You can look up monitor id with xrandr.
Hope this info helps someone like me.
Comment 8 Nate Graham 2021-08-16 23:12:12 UTC

*** This bug has been marked as a duplicate of bug 356225 ***
Comment 9 Nate Graham 2021-08-16 23:13:36 UTC
Oops, wrong one.

*** This bug has been marked as a duplicate of bug 370180 ***