39

No idea how this happened. plasmashell was crashing after consuming 6gb memory and I'd tried removing ~/.cache. Shortly after all plasmashell would do is start my desktop background with a wallpaper, but wouldn't give me any taskbar and I couldn't bring up a menu by right clicking the desktop.

Restarting it or rebooting the whole machine didn't help.

8 Answers 8

47

jozxyqk's answer is correct, but it is fairly drastic. It will blow away all of your toolbar customizations, app favorites , etc.

Depending on the cause of this issue in your case, you may be able to fix it by editing your plasma-org.kde.plasma.desktop-appletsrc file and then performing

kquitapp plasmashell && kstart plasmashell

One cause I've run into is the buggy multimonitor functionality sometimes "losing" the taskbar from my laptop screen after I've connected to an external monitor and later disconnected (this was in plasma 5.5 or 5.6, I think). In this scenario, I've found the problem to be the lastScreen setting in the taskbar configuration. To fix this, find the section of text in plasma-org.kde.plasma.desktop-appletsrc that looks like:

[Containments][1]
activityId=
formfactor=2
immutability=1
lastScreen=1
location=4
plugin=org.kde.panel
wallpaperplugin=org.kde.image

(Some of these lines may vary in your configuration. In mine, this section was only a dozen lines down in the file, but I have no idea how much that may vary.)

Setting lastscreen=0 fixed the problem for me. I assume that 0 represents my laptop screen, and 1 is the external monitor.

If in doubt, you can always perform the procedure in jozxyqk's answer, and compare the newly generated plasma-org.kde.plasma.desktop-appletsrc with your saved plasma-org.kde.plasma.desktop-appletsrc.bak before restoring an edited version of your saved copy.

4
  • 1
    @Pavel, if I remember correctly, I found it like this: jozxyqk's answer lead me to the correct file. I saved my file and used his solution, and then compared the new file to my old file. lastScreen seemed a likely candidate so I tried it (replacing my old file with a change to that one thing).
    – EricS
    Jan 1, 2017 at 0:52
  • In my case, the "kquitapp plasmashell" command produced an error ("Quitting application plasmashell failed. Error reported was: org.freedesktop.DBus.Error.NoReply : Did not receive a reply ....") and I had to kill the plasmashell.
    – Daddy32
    Jan 31, 2018 at 8:34
  • 1
    I'm now getting "Application plasmashell could not be found using service org.kde.plasmashell and path /MainApplication.". Is there an updated service to restart?
    – Paradox
    Sep 19, 2019 at 15:31
  • @Paradox I'm seeing the same thing right now and I couldn't find any updated way. I guess I should try again when everything is working normally to see what's what.
    – JFlo
    Jul 21, 2020 at 20:56
34

Update: Please see EricS's answer first as you may be able to avoid losing your KDE config.


I ended up removing random config files with the name plasma in them. The one that worked was:

cd ~/.config
mv plasma-org.kde.plasma.desktop-appletsrc \
   plasma-org.kde.plasma.desktop-appletsrc.bak

Then restart plasmashell:

kbuildsycoca5 && kquitapp plasmashell && kstart plasmashell
3
  • This just happened to me as well. Your solution worked, but I had to chown ~/.cache/sycoca5 to my username first.
    – Geremy
    Aug 3, 2015 at 0:52
  • 1
    I could kiss you!!!
    – DrorCohen
    Jun 2, 2016 at 1:32
  • A million thank yous for this: your fix helped. I had completely run out of ideas. Jul 20, 2016 at 12:34
5

NB: make a backup first

cp ~/.config/plasma-org.kde.plasma.desktop-appletsrc ~/.config/plasma-org.kde.plasma.desktop-appletsrc.bak

OVERALL BUG DESCRIPTION

Assume one performs the following actions: attaches a new second monitor -> attaches the old second monitor. After this procedure the 'screen id' of the old second monitor gets corrupted. You see no taskbar (a panel), the wallpaper has been reset, etc.


Below steps refer to the file ~/.config/plasma-org.kde.plasma.desktop-appletsrc (thereafter SETTINGS_FILE)


HOW TO FIX

I. FIND OUT SCREEN IDS OF YOUR MONITORS

  • Change desktop wallpapers at the both screens, e.g. foo.png for monitor 1 and bar.png monitor 2.

Below is described to how find the screen ID for monitor 1

  • Open SETTINGS_FILE
  • Find foo.png and bar.png in the SETTINGS_FILE

You will see the following block (for foo.png)

[Containments][2][Wallpaper][org.kde.image][General] 
FillMode=6 
Image=~/Pictures/foo.png 

It means foo.png is part of [Containments][2].

  • Thereafter find the following block which refers to [Containments][2]

.

[Containments][2]
activityId=9c23ff19-bffa-4182-bdb6-d9b36dd27cdb
formfactor=0
immutability=1
lastScreen=0
location=0
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image

voila, we see the string 'lastScreen=0'. It means the screen ID of monitor 1 is 0 (because monitor 1 refers to foo.png, foo.png refers to [Containments][2], and [Containments][2] refers to lastScreen=0).

The same way you find the screen ID of the monitor 2, say, 1.

So, assume, the screen IDs of monitor 1 and monitor 2 are 0 and 1 respectively.

II. FIND AND REPLACE SCREEN IDS

  • Run grep on SETTINGS_FILE

.

$ grep lastScreen=  plasma-org.kde.plasma.desktop-appletsrc
lastScreen=0
lastScreen=1
lastScreen=0
lastScreen=0
lastScreen=1
lastScreen=2
lastScreen=1
lastScreen=0
lastScreen=2
lastScreen=1
lastScreen=0
lastScreen=0
lastScreen=1
lastScreen=2

As you can see there are lines with 'lastScreen=2'. These are the corrupted lines.

  • In SETTINGS_FILE make a replacement lastScreen=2 -> lastScreen=1.

  • Reboot KDE

.

kquitapp5 plasmashell && kstart5 plasmashell

Now, your desktops should be repaired!

2
  • 1
    RE: screen IDs, the mapping looks like it's stored in ~/.config/plasmashellrc
    – genpfault
    Apr 30, 2020 at 2:30
  • Bravo. I have been pulling my hair out w/ a similar issue for the better part of a year. Never found it worthwhile to go through that config file manually; looks like there was a pretty contained fix after all! Aug 17, 2020 at 13:58
1

I have also found this condition occurring when a plasma-org.kde.plasma.desktop-appletsrc.lock file is left in the ~/.config directory. Removing the lock file cleared the problem immediately.

1
1

In my case with KDE 5.8.8 removing the following two config files helped:

rm ~/.config/plasma-org.kde.plasma.desktop-appletsrc
rm ~/.config/plasmashellrc

Then starting KDE again.

For some reason, default widgets like taskbar were not configured on initial setup during some upgrades etc.

0

I know this post is really really old but today also still this bug not solved by KDE. It happens lot of time but cofig again and again is really annoying & irritating but today I found the quickest & easiest solution for it. Just hit ALT+F2 and type "ksysguard" , Open it then find "Kwin_x11" right click on it then click on send signal and final step is click on Interrupt(INT) within 5-10 Seconds display will it turn black and you will return in login section as soon as you login. Panel(s), Wallpaper etc... everything back on track..... I mean whatever configuration is in use you brought it back as it was exactly before this problem appeared. I am not sure about the application you are using that session will recover or not. Because this happen with me while doing System update so please anyone use this method and your application session restore or not update give us an update if in case station not been restore and somehow you restored it let us know how you did that thanks in advance "help for help"

My first post on superuser.

0

The other solutions here are relatively drastic and may not always be needed any more. As per this related answer, if you can still put the desktop into edit mode with Ctrl + F12 (show desktop), Alt + D then E (desktop edit mode), you can click the Manage Desktops and Panels button that appears at top. This opens a dialogue that lets you swap your content back from your disabled display outputs to your active ones.

-2

Edit plasma-appletsrc and delete this section.

[PlasmaViews][Panel 46][Horizontal1600]
alignment=132
maxLength=1600
minLength=1600
offset=0
panelVisibility=0
thickness=36

Then reboot.

1
  • 2
    Your instructions are very unclear. I'm not sure people could implement your solution based on what you've written. Can you be more explicit?
    – fixer1234
    Nov 3, 2016 at 3:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .