Bug 351079 - Spontaneously adding desktop containments at startup
Summary: Spontaneously adding desktop containments at startup
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.3.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-08-08 07:46 UTC by Antonino Sergi
Modified: 2018-10-27 02:01 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
.config/plasma-org.kde.plasma.desktop-appletsrc (3.77 KB, text/plain)
2015-08-08 07:59 UTC, Antonino Sergi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonino Sergi 2015-08-08 07:46:50 UTC
Fedora 22 as virtualbox guest.
I have a set of widgets on the desktop, which often "disappear" at startup; I tracked down the reason to plasmashell adding a further desktop containment (a wallpaper), covering them.
It looks like a race condition, because sometimes I can recover the widgets by restoring the config (cp .config/plasma-org.kde.plasma.desktop-appletsrc.bak .config/plasma-org.kde.plasma.desktop-appletsrc) and restarting plasmashell (killall plasmashell; kstart plasmashell); it doesn't always work, because sometimes the config gets changed again when plasmashell starts.

Reproducible: Sometimes

Steps to Reproduce:
1. Have widgets on your desktop
2. Login
3.

Actual Results:  
diff -u .config/plasma-org.kde.plasma.desktop-appletsrc.bak .config/plasma-org.kde.plasma.desktop-appletsrc
--- .config/plasma-org.kde.plasma.desktop-appletsrc.bak 2015-08-07 14:27:20.510812284 +0100
+++ .config/plasma-org.kde.plasma.desktop-appletsrc     2015-08-08 08:41:25.955999792 +0100
@@ -94,6 +94,19 @@
 [Containments][1][General]
 AppletOrder=2;5
 
+[Containments][20]
+activityId=116ea599-b800-453e-b6e9-62f0e7c2024a
+formfactor=0
+immutability=1
+lastScreen=0
+location=0
+plugin=org.kde.desktopcontainment
+wallpaperplugin=org.kde.image
+
+[Containments][20][Wallpaper][org.kde.image][General]
+height=975
+width=1920
+
 [Containments][7]
 activityId=00000000-0000-0000-0000-000000000000
 formfactor=0



restarting plasmashell from konsole:

[ ~]$ killall plasmashell; kstart plasmashell
kstart(3526) main: Omitting both --window and --windowclass arguments is not recommended 
KActivities: Database can not be opened in WAL mode. Check the SQLite version (required >3.7.0). And whether your filesystem supports shared memory
unversioned plugin detected, may result in instability
Falling back to legacy separed QQmlEngine for applet "org.kde.panel"
unversioned plugin detected, may result in instability
unversioned plugin detected, may result in instability
Falling back to legacy separed QQmlEngine for applet "org.kde.plasma.systemtray"
unversioned plugin detected, may result in instability
Falling back to legacy separed QQmlEngine for applet "org.kde.plasma.folder"
unversioned plugin detected, may result in instability
unversioned plugin detected, may result in instability
unversioned plugin detected, may result in instability
Falling back to legacy separed QQmlEngine for applet "org.kde.plasma.pager"
unversioned plugin detected, may result in instability
Falling back to legacy separed QQmlEngine for applet "org.kde.desktopcontainment"
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:69: TypeError: Cannot read property 'overflowing' of null
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:64: TypeError: Cannot read property 'overflowing' of null
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:64: TypeError: Cannot read property 'overflowing' of null
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:69: TypeError: Cannot read property 'overflowing' of null
Service started, version: 
KActivities: FATAL ERROR: Failed to contact the activity manager daemon
file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/main.qml:394:24: Unable to assign [undefined] to double
file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/main.qml:393:21: Unable to assign [undefined] to double
Known plasmoid ids: QHash(("org.kde.plasma.notifications", 11)("org.kde.plasma.printmanager", 12)("org.kde.plasma.bluetooth", 17)("org.kde.plasma.battery", 14)("org.kde.plasma.networkmanagement", 16)("org.kde.plasma.devicenotifier", 10)("org.kde.plasma.pkupdates", 13)("org.kde.ktp-contactlist", 15)("org.kde.plasma.clipboard", 9))
unversioned plugin detected, may result in instability
unversioned plugin detected, may result in instability
Falling back to legacy separed QQmlEngine for applet "org.kde.plasma.notifications"
unversioned plugin detected, may result in instability
unversioned plugin detected, may result in instability                                                                                                                                                                                       
file:///usr/share/plasma/plasmoids/org.kde.plasma.pkupdates/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                                     
file:///usr/share/plasma/plasmoids/org.kde.plasma.pkupdates/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                                     
file:///usr/share/plasma/plasmoids/org.kde.plasma.pkupdates/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                                     
file:///usr/share/plasma/plasmoids/org.kde.plasma.pkupdates/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                                     
unversioned plugin detected, may result in instability                                                                                                                                                                                       
unversioned plugin detected, may result in instability                                                                                                                                                                                       
Falling back to legacy separed QQmlEngine for applet "org.kde.plasma.bluetooth"                                                                                                                                                              
unversioned plugin detected, may result in instability                                                                                                                                                                                       
Falling back to legacy separed QQmlEngine for applet "org.kde.plasma.battery"                                                                                                                                                                
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/TaskDelegate.qml:141: TypeError: Cannot read property 'icon' of null                                                                                                
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/TaskDelegate.qml:142: TypeError: Cannot read property 'toolTipMainText' of null                                                                                     
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/TaskDelegate.qml:144: TypeError: Cannot read property 'location' of null                                                                                            
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/StatusNotifierItem.qml:131:13: QML Image: Failed to get image from provider: image://icon/                                                                          
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                             
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                             
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                             
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                             
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.                                                                             
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "Devices"
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/TaskDelegate.qml:65:30: Unable to assign [undefined] to int
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/TaskDelegate.qml:92:18: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/TaskDelegate.qml:100:18: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/TaskDelegate.qml:142:19: Unable to assign [undefined] to QString
Comment 1 Antonino Sergi 2015-08-08 07:59:01 UTC
Created attachment 93944 [details]
.config/plasma-org.kde.plasma.desktop-appletsrc
Comment 2 David Edmundson 2015-08-08 13:29:27 UTC
Thanks, can you also describe your screen configuration and provide the output of 
xrandr -q
Comment 3 Antonino Sergi 2015-08-08 18:33:59 UTC
It's not clear to me what you mean by screen configuration, but it's a single screen with 9 virtual desktops and only 1 activity (the default one).

xrandr -q
Screen 0: minimum 64 x 64, current 1920 x 975, maximum 32766 x 32766
VGA-0 connected primary 1920x975+0+0 0mm x 0mm
   1920x975      60.00*+
   2560x1600     60.00  
   2560x1440     60.00  
   2048x1536     60.00  
   1920x1600     60.00  
   1920x1080     60.00  
   1600x1200     60.00  
   1680x1050     60.00  
   1400x1050     60.00  
   1280x1024     60.00  
   1024x768      60.00  
   800x600       60.00  
   640x480       60.00
Comment 4 Fredy Neeser 2015-10-20 11:55:09 UTC
Also on Fedora 22, I recently had similar symptoms (no widgets on desktop) at first KDE login until I upgraded to KDE frameworks 5.15, see

  https://bugzilla.redhat.com/show_bug.cgi?id=1269004
  plasma-workspace 5.4.1-3-fc22 has a delay over 20 seconds upon login
Comment 5 Fredy Neeser 2015-10-21 13:50:24 UTC
(In reply to Fredy Neeser from comment #4)
> Also on Fedora 22, I recently had similar symptoms (no widgets on desktop)
> at first KDE login until I upgraded to KDE frameworks 5.15

Actually, the problem still exists during the first KDE login after boot, see  Comment 17 of
  https://bugzilla.redhat.com/show_bug.cgi?id=1269004
  plasma-workspace 5.4.1-3-fc22 has a delay over 20 seconds upon login

and it has something to do with the order / timing in which LVDS and the external monitor are being activated during KDE login.
Comment 6 Antonino Sergi 2015-10-28 08:40:22 UTC
From what I can see on my virtual machine, the issue has been somehow resolved. 
I use it with 2 different hosts, win10 and linux; on win10 it was doing what I described above, while on linux it was exhibiting some crazy behaviour, like having windows alive and interactive, but not visible because covered by a wallpaper, or an unstoppable memory allocation at login, resulting in a crash of the whole VM.
Now everything seems to be back to normal.
Comment 7 Fredy Neeser 2015-10-29 14:40:52 UTC
Due to incorrectly added desktop containments (which I also observed in ~/.config/plasma-org.kde.plasma.desktop-appletsrc),  I am getting a broken KDE desktop in Fedora 22, in roughly every second boot/first-login attempt.

This is on a laptop with LVDS and an external monitor, where the latter is configured as my primary display.  Note that the external monitor is in "Power Save Mode" before KDE login (where the SDDM greeter screen is shown on the LVDS), which may have an effect on the order in which the displays become visible to plasmashell.

Here's what happens in an unsuccessful first-login-after-boot:
- Primary display visibly moves from LVDS to external monitor
- External monitor then shows a KDE panel on blue wallpaper but no widgets,
   and the LVDS turns black but is otherwise working.

From this I can usually recover to a working desktop by doing one or more logout/login cycles.

It looks like the first KDE login after boot is critical: When it works, subsequent logout/login cycles typically also work;  when it doesn't, it's more likely that a subsequent logout/login cycle also has a problem.  If I repeat logout/login cycles, it eventually works.

I captured the KDE debug messages for the good and the bad first logins after boot, and they show strong signs of race conditions:  In the bad case, kded5/kscreen starts much later in the KDE startup than in the good case, and very late in KDE startup, plasmashell notes that

  2015-10-24T22:53:21 plasmashell(2232)/default unknown: primary changed! "LVDS1" "DP-1-2"

which does not happen in the good case.

Any idea what might go wrong here?
Comment 8 Fredy Neeser 2015-10-29 14:45:27 UTC
In /plasma-workspace-5.4.2/shell/shellcorona.cpp, I found this code snippet:

   //FIXME ideally fix this, or at least document the crap out of it
   int screen = containment->lastScreen();
   if (screen < 0) {
       screen = m_desktopContainments[containment->activity()].count();
       qDebug() << "last screen is < 0 so putting containment on screen " << screen;
   }
   insertContainment(containment->activity(), screen, containment);

Does anyone know why one might get screen < 0  and what kind of "crap" one can expect when this happens?
Comment 9 Elvis Stansvik 2015-12-20 14:04:54 UTC
I'm also hitting these problems (see my comments on https://bugs.kde.org/show_bug.cgi?id=356899 which I think may be related to this).

Desktop Settings were not persisted properly across re-logins for me, and I discovered that I get extra containments added in ~/.config/plasma-org.kde.plasma.desktop-appletsrc_after (see my attachments on the other bug).

The settings I apply get saved to a containement with lastScreen=-1, probably somehow due to these (from .xsession-errors):

last screen is < 0 so putting containment on screen  0
last screen is < 0 so putting containment on screen  1
requesting config for "Desktop" without a containment!

as mentioned by Fredy above.

I also have spurious:

kscreen: Primary output changed from KScreen::Output(Id: 73 , Name: "VGA1" ) ( "VGA1" ) to KScreen::Output(Id: 73 , Name: "VGA1" ) ( "VGA1" )

occurring in .xsession-errors, both before and after those "last screen..." warnings.

So I think somehow Plasma is confused about what is the current screen to which the settings should be applied? I know that Qt 5.6 will have several fixes and improvements re. screen handling and XCB, but could something be done now?

This is on Arch Linux with Qt 5.5.1 and Plasma 5.5.1. I have one internal LVDS1, which was not active during these tests. I only used the external (VGA1) output. I should note also that I use xrandr to change monitors normally, since doing so through System Settings has resulted in crashes in Plasma and Qt (via Plasma) (should also become better with Qt 5.6).

This bug is NEEDSINFO / WAITINGFORINFO. What more information is needed?
Comment 10 Elvis Stansvik 2015-12-20 14:07:55 UTC
(In my comment above I said ~/.config/plasma-org.kde.plasma.desktop-appletsrc_after, this was a paste-o and I of course meant ~/.config/plasma-org.kde.plasma.desktop-appletsrc. The former was just the filename I gave it when I copied it aside for attachment to bug 356899.)
Comment 11 Andrew Crouthamel 2018-09-25 21:38:50 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Andrew Crouthamel 2018-10-27 02:01:32 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!