Bug 356899 - Desktop Settings are not saved and loads default settings on reboot/startup.
Summary: Desktop Settings are not saved and loads default settings on reboot/startup.
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.4.0
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: 1.0
Assignee: David Edmundson
Depends on:
Reported: 2015-12-19 06:51 UTC by Gopikrishnan R
Modified: 2020-05-14 05:42 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In:

~/.config/plasma-org.kde.plasma.desktop-appletsrc before applying settings (4.34 KB, text/plain)
2015-12-20 13:14 UTC, Elvis Stansvik
~/.config/plasma-org.kde.plasma.desktop-appletsrc after unchecking "Show desktop toolbox" and setting Layout to Folder View (4.44 KB, text/plain)
2015-12-20 13:16 UTC, Elvis Stansvik
~/.config/plasma-org.kde.plasma.desktop-appletsrc after logging out and in again (4.44 KB, text/plain)
2015-12-20 13:16 UTC, Elvis Stansvik

Note You need to log in before you can comment on or make changes to this bug.
Description Gopikrishnan R 2015-12-19 06:51:44 UTC
Plasma Desktop Settings like Wallpaper,Desktop Layout (Folder View) etc. are lost and are resetted to defaults on reboot. Launchers like Application Menu are also not saving favourites.
This issue was not only found on fedora but also present in OpenSUSE 42.1 as well.

Reproducible: Always

Steps to Reproduce:
1.Manually change Desktop settings, Desktop Layout Settings.
2.Reboot or shutdown and start the system again after sometime.
3.Settings are resetted to defaults. (bug)

Actual Results:  
I see that my Desktop settings are lost and I am presented with a desktop  with the initial default configuration, not the one with my manual configurations.

Expected Results:  
Desktop Starts witg same configurations as when the System was shut down.

This bug was also present in OpenSUSE 42.1.
I think I temporarily stopped it by removing the 'write' permissions of user from ~/.config/plasma-org.kde.plasma.desktop and other files. Not sure this solves the bug though as it is repeating in fedora after doing this too.
Comment 1 Elvis Stansvik 2015-12-20 13:13:18 UTC
I can confirm the issue of Desktop Settings being lost on logout/login. I'm on Plasma 5.5.1. I can not reproduce the issue with Application Menu favorites being lost, for me they remain.

I will attach my .config/plasma-org.kde.plasma.desktop-appletsrc as it looks before changing settings, after changing settings and after logout/login.
Comment 2 Elvis Stansvik 2015-12-20 13:14:44 UTC
Created attachment 96212 [details]
~/.config/plasma-org.kde.plasma.desktop-appletsrc before applying settings
Comment 3 Elvis Stansvik 2015-12-20 13:16:20 UTC
Created attachment 96213 [details]
~/.config/plasma-org.kde.plasma.desktop-appletsrc after unchecking "Show desktop toolbox" and setting Layout to Folder View
Comment 4 Elvis Stansvik 2015-12-20 13:16:48 UTC
Created attachment 96214 [details]
~/.config/plasma-org.kde.plasma.desktop-appletsrc after logging out and in again
Comment 5 Elvis Stansvik 2015-12-20 13:21:26 UTC
Note how after applying these two changes (second attachment above), I have:




as expected.

But after logout and login (third attachment above), I have an additional containment, number 43:


and no corresponding [Containments][43][General] with showToolbox=false. Note that the old [Containments][42] and [Containments][42][General] is still there, just that a new one has been added.
Comment 6 Elvis Stansvik 2015-12-20 13:24:50 UTC
My ~/.xsession-errors after relogin, shows no indication of a plasmashell crash during the relogin (searched for "crash" and "plasmashell" in it).

Is it possible that plasmashell somehow crashed during logout, and I was never notified of it? If so, how can I confirm this?

Or do you have any other idea regarding the strange extra [Containments][43] I get above after relogin (which does not have my changed settings)?
Comment 7 Elvis Stansvik 2015-12-20 13:32:11 UTC
Or is the lastScreen setting the culprit here? After applying the settings changes, I have lastScreen=-1 in the [Containments][42].

Before the change, I had lastScreen=0 in [Containments][28], lastScreen=1 in [Containments][35] and lastScreen=-1 in [Containments][8].

I don't really understand the meaning of these three desktop containments. Why do I have three? And what does the -1 signify? I have two monitors, but I'm only working on the external monitor right now, the laptop internal monitor output is not active.
Comment 8 Elvis Stansvik 2015-12-20 13:44:05 UTC
Another piece of info: In my .xsession-errors, I get several:

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

printed, and this happens after

Plasma Shell startup completed

is printed.

Can it be that plasmashell is somehow confused when these spurious (VGA1 -> VGA1) output changes happens, and by the time I apply my settings is don't know which screen they should be applied for? (the lastScreen=-1 ?).

I should note that I use xrandr from command line to change monitors normally, as I've had problems with crashes in both Plasma (and in Qt, via Plasma) when changing monitors through System Settings (believe this will finally be fixed with Qt 5.6). But while doing these tests, I was not changing monitors at any time, the external one was the only one active.
Comment 9 Elvis Stansvik 2015-12-20 13:48:55 UTC
Found three more interesting pieces in .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!

These are printed very early, right after my OpenGL information is printed (by KWin?), but they are preceded by one of those spurious

kscreen: Primary output changed from KScreen::Output(Id: 73 , Name: "VGA1" ) ( "VGA1" ) to KScreen::Output(Id: 73 , Name: "VGA1" ) ( "VGA1" )
Comment 10 Elvis Stansvik 2015-12-20 14:05:46 UTC
See also https://bugs.kde.org/show_bug.cgi?id=351079 which I believe is the issue with containments I'm seeing, and which may be related (causing?) this bug.
Comment 11 Frank Sandefur 2015-12-26 02:50:19 UTC
I am having the same issue on Kubuntu 15.10.  However, my trouble began when I configured a second monitor to my system. 

It is worth noting that my hardware configuration has not changed, and worked flawlessly under Kubuntu 14.04LTS (Plasm 4.8.6 I think).  

On reboot I come to a blank screen, drivers and resolution appear to be correct. a Right-click to open Folder View Settings reveals it has reverted to Desktop Layout with no wallpaper selected. Selecting Folder view and a wallpaper restores everything, except that all my icons have reverted to default sizes and are lined up across the top of the screen, rather than the smaller sizes and arrangement I'd manually set up.

My system is:  Kubuntu 15.10, KDE Plasma version 5.4.2, Qt version 5.4.2, Kernel version 4.2.0-22-generic, 64-bit.
4 x Intel Core I5-3470 CPU @3.20 GHz, 7.7 GiB Ram, Nvidia 2Gb GT640
Comment 12 Frank Sandefur 2015-12-31 14:38:08 UTC
In playing with this some more, I have discovered two things.

First, I manually removed all references to the second monitor from  the xorg.conf file, and as a result I no longer lost the desktop settings or icons, except for on a reboot, the screen would come up with a right-side scroll bar ( because one or more icons were positioned below the viewable limit of the screen)...and that was a result of the icons being repositioned from where I'd put them.
This behaviour occurs regardless of whether or not the icons are 'locked'

Second, if no icon is positioned along the lower edge of the screen prior to a reboot, the positions and desktop settings are all retained correctly.

I hope that helps
Comment 13 Dennis Gnad 2016-04-24 11:26:36 UTC
I can also confirm the problem of the Wallpaper / Desktop Layout resetting after reboot/re-login in Debian Testing/Stretch ("plasma-workspace 4:5.4.3-2"), after updating from Debian Stable/Jessie recently.

My setup also includes 2 physical monitors, but I didn't try the workaround so far.

(It would also not be a permanent solution: One of the Monitors is rotated and I don't really want to remove it from the xorg.conf in case of a login to other X sessions that might not save+restore xrandr settings)

With Favorites I have another problem that I just reported: https://bugs.kde.org/show_bug.cgi?id=362182 - but I think it is mostly unrelated.
Comment 14 Jonathan Marten 2016-09-09 07:18:44 UTC
There is a fix that appears to work for me, although I only have a single monitor setup and have not been able to test it with multiple screens.

The problem happens when starting with a new configuration and then changing the desktop containment from the default Desktop to a Folder View.  The containment is switched correctly in ScreenCorona::setContainmentTypeForScreen(), but the newly created containment has its
lastScreen set to -1 (because it has not been displayed anywhere yet) and it is saved in the config file with that setting, as seen in comment #5.  On the next startup that containment is not found by ScreenCorona::createContainmentForActivity(), because its screen number does not match, and a new default containment is created.

The solution is to copy the lastScreen, along with the activityId, when the new containment is being created in setContainmentTypeForScreen().

Patch for plasma-workspace/shell/screencorona.cpp:

diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
index 778e760..b8dbf39 100644
--- a/shell/shellcorona.cpp
+++ b/shell/shellcorona.cpp
@@ -1554,6 +1554,7 @@ Plasma::Containment *ShellCorona::setContainmentTypeForScreen(int screen, const
     newCg.writeEntry("activityId", oldContainment->activity());
+    newCg.writeEntry("lastScreen", oldContainment->lastScreen());
Comment 15 Jonathan Marten 2016-09-09 07:21:04 UTC
ScreenCorona -> ShellCorona in previous comment!
Comment 16 Heiko Tietze 2016-10-08 07:25:24 UTC
Still an issue under 5.8

Environment: Notebook with external display, one with folder view the other desktop. Background image (happens always) and layout (desktop/wallpaper configuration) is lost after restart. Happens when I wait until final shutdown; but since this takes some seconds my expectation is to have a reliable setup also when I close the lid after clicking shutdown.
Comment 17 Jeremy Huffman 2016-10-10 19:36:56 UTC
Appears this has been fixed here: https://quickgit.kde.org/?p=plasma-workspace.git&a=commit&h=53b2a407af9d1d60cfbb1a42af8546ab0a156d38
Comment 18 David Brooke 2016-10-10 19:50:14 UTC
I believe that this bug is related if not the same issue:
I tried the patch that Jonathan Marten posted and it solves my issue. With the patch I can now change from desktop view to folder view and it is retained after a reboot or logout / login.
Comment 19 Bhushan Shah 2016-10-11 03:10:46 UTC
This issue has been fixed by commit mentioned in Comment #17
Comment 20 Paul Chany 2018-05-17 14:04:17 UTC
I can confirm that that this issue is still in Plasma Desktop 5.11.5.
Comment 21 apache 2018-08-23 14:42:19 UTC
Plasma 5 doesn't save settings on Manjaro, Plasma 5.13.4 qt 5.11.1
Framework 5.48.0
4.14.65-1-MANJARO #1 SMP PREEMPT Sat Aug 18 13:29:56 UTC 2018 x86_64 GNU/Linux

Not all, because some settings are respected and some are not. 

For example I can align icons on Desktop to the right or to the left and it works ok. Settings that I set in system setting seems to be respected. It looks like only those changed from applets are not and from Dolphin options are not, but not all. 

When I set Dolphin Preferences > General > Confirmations and thick the Executing scripts I can run .desktop file (run application) from different Dolphin locations but option in Dolphin remains unmarked.

I unmarked kmix volume feedback, I don't want this feedback to pop-up when I for example watch something. Yet, it still appears but only when I use keyboard shortcut to change volume. When I use slider in kmix the icon doesn't show.

Plasma also can’t remember kmenu settings. For example I change name of entry in kmenu edit, Web browser Firefox to Firefox and save it, still in kmenu is visible Web browser Firefox.

I have Manjaro and the latest updates installed. Plasma 5.13.4

I created new user with home folder and checked default permissions.
I only had one file with different permissions:

-rwxr-xr-x plasma-org.kde.plasma.desktop-appletsrc

and I corrected it and restarted system but with no effect.

There have to be some settings files that are responsible for this.

I found some workarounds for my problems.

Name of Firefox has changed in kmenu when I changed it in firefox.desktop file in 

Right mouse click on file, properties and edit.

For sound volume change I unmarked / unchecked option in system Settings → Workspace behaviour 
Display visual feedback for status changes. But this looks like some general setting for whole Plasma. 

Perhaps this is related to this bug.

Comment 22 apache 2018-08-23 15:24:00 UTC
This may be related if Plasma has general problem with saving settings


Any feedback will be greatly appreciated.
Comment 23 apache 2018-08-26 09:12:12 UTC
Hey developers, you have lots of bug reports about different Plasma elements not saving settings:


Will you do something about it?
Comment 24 David Edmundson 2018-08-28 09:22:05 UTC
The original 2016 bug is fixed as per #17.

If you have a different bug, please reopen as a different bug with new relevant info.
Comment 25 Natalie Clarius 2020-04-16 11:35:15 UTC
It does not seem to be fixed; I am having the exact same bug on Plasma 5.18.3 with Kubuntu 19.19.
Comment 26 Joost Bremmer 2020-05-04 13:42:38 UTC
There does indeed seem to be some kind of regression as I am encountering this behaviour as well in 5.18.4 on Arch.

This seems to be contained to "Desktop Settings" only, as panel changes are saved, but it also occurs between login/logout for me as well.
Comment 27 Scott Grayban 2020-05-14 04:35:11 UTC
Same issue as well still on Debian Buster.

Only the Desktop settings are not being saved. I have tried everything using chattr +i to setting chmod 400 and still cannot get the desktop settings to save.

And just to make sure it wasn't a issue using a old user account on my box I created a brand new account and on that account the same issue still happened. All settings are saved for everything BUT the desktop settings.

Selected wallpaper is not being saved nor is the icon layout in Desktop Layout (Folder View). Switched to desktop mode and that didn't save either and keeps reverting back to the default desktop layout.
Comment 28 Scott Grayban 2020-05-14 04:36:58 UTC
Forgot to add my KDE info in above comment... sorry.

Operating System: Debian GNU/Linux 10
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.54.0
Kernel Version: 5.3.0-0.bpo.2-amd64
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-2500 CPU @ 3.30GHz
Memory: 15.7 GiB of RAM
Comment 29 Scott Grayban 2020-05-14 05:42:29 UTC
New bug created https://bugs.kde.org/show_bug.cgi?id=421498 because it's not exactly the same OP bug report.