Plasma tray bar relocates itself to top of screen

Hi! I will post a screenshot which explains most of the issue. Note the location of the “arrows” to locate the bar on a specific side of the screen. I have not figured out what triggers it, but it’s usually changing apps or launching a new one. The bar (supposed to be on the bottom) relocates itself. This happens in x11 on 6.0.2. I am using neon.

I have been resolving it by using the shown arrows to locate the bar on the top of the screen, after which the bottom arrow appears and I can put it back where it goes. This is a temporary fix.

I am having the same problem. For me it is mostly triggered by being afk for a while with the screen turned off and turning it on again.

X11, Plasma 6.0.3, EndeavourOS.

In the meantime I have made a small script on my desktop to quickly kill and restart the plasma shell (bit bruteforce, but hey).

#! /bin/bash

killall plasmashell
kstart plasmashell
1 Like

This is the panel “edit mode” that you usually get by right clicking the panel and choosing “edit mode”. You should be able to also exit it by pressing ESC a few times.

It’s weird that it triggers by itself. Can you see if you trigger it manually it is the same behaviour?

It would be better if you can use the systemd command to do the restart:

sysyemctl --user restart plasma-plasmashell
2 Likes

I cant speak for aranjedeath but for me it is not related to the edit mode and it doesn’t trigger the edit mode. Just the plasma panel on the bottom switches to the top automatically. I can fix this by opening up the edit mode and manually switch the panel to another position and back down. But restarting the plasma shell is quicker.

Thanks for the systemd command!

Ah, so it is not the same as @Aranjedeath 's situation, as their screenshot clearly shows the panel in edit mode.

Another thing that you can try to do (instead of restarting plasma shell) is to run a Plasma script to set your panel location, and see if that works. If it does - it will tell us something about the situation.

To run, start the Plasma desktop scripting shell by running plasma-interactiveconsole (from the main menu, krunner, or anywhere), paste the following script in and press “Execute”:

for (let p of panels()) { p.location = 'bottom'; }

If this works, you can also run it from a script directly by running:

qdbus org.kde.plasmashell /PlasmaShell \
  org.kde.PlasmaShell.evaluateScript \
  "for (let p of panels()) { p.location = 'bottom'; }"

Hi @guss77,

Thank you in advance for your assistance. Your interpretation of my post is incorrect – @shrippen has it right. We have the same issue.

My screenshot demonstrates the issue by showing the bar incorrectly located at the top of the screen while in edit mode. Please note that, if the bar were located at the top of the screen (correctly, as intended by me, or the software, etc) the arrows to relocate the bar to a side of the screen would be on the bottom, left, and right sides of the screenshot. But there is a “top arrow”, which should not be there, and the “bottom arrow” is missing. This discord between the apparent position of the bar and where the repositioning system in edit mode thinks the bar is … is what I am demonstrating.

Thank you for this plasma script, I will try it next time it happens (tomorrow morning, if history is any guide).

1 Like

You are correct - I didn’t notice the weird position of the arrows. That looks like a serious bug.

Please let me know if the Plasma script works to reset that behaviour. I think it may help understand the problem.

So, the bug happened again, I ran the command as described but it did NOT move the panel back to the bottom.

Yeah, it’s a very “funny” bug.

The script did not relocate the bar :confused:

Here is what it looks like:

Notes:
1: script did not relocate the bar
2: space at the bottom of the screen is held for a bar not present there
3: all windows are “fully butted up” at the top of the screen, as if there was no bar
4: bar is always on top of the windows, when they are “butted up” against the top

That is very important information. It means that the data model thinks the panel is actually at the bottom and the rendered is calculating it incorrectly.

Can you check if using this script does fix the issue (temporarily)?

for (let p of panels()) {
p.location = 'top';
p.location = 'bottom';
}

Hi @guss77,

No change - see screenshot

@Aranjedeath - can you please see if this bug report seems to be issue you are having?

1 Like

Thank you very much. That hits the spot!

That looks like the same bug, yes. Including that notifications are wrongly centrally-located (sometimes) :slight_smile:

Thank you!

So, one thing that you can do help get this fixed - especially because the status of the bug is “Reported” - is to comment on the report and explain your experience (which will also register you to be CCed on changes): if enough people will assert that they also see the issue, then the ticket will be moved to status “Confirmed” even if a developer didn’t see the issue yet.

When a report is “Confirmed” it is much more likely that a developer will look at it.

I am the one who opened that bug report. This does indeed look like the exact same issue. No need to restart plasmashell whenever that happens. Although that’s certainly valid, it does seem to cause VSCode to crash. You can actually change the screen resolution to something else and then immediately revert. This seems to reset everything until the next time the screen turns off.

1 Like

Restarting plasmashell causes a lot of (non-KDE) applications to crash because they don’t reparent properly to their own cgroup scope (I have a thread about it somewhere here), so when the shell’s scope ends - it kills all those apps.

Another way to reset the shell - in a way that won’t crash such apps - would be to ask it to refresh itself using DBus, like so:

qdbus org.kde.plasmashell /PlasmaShell \
    org.kde.PlasmaShell.refreshCurrentShell
2 Likes

I have the same problem. I attempted to use the solution posted by @guss77 and it just killed the shell entirely without any type of restart.

Intersting. It sometimes takes a few seconds for the shell to completely refresh.

If it did really kill Plasma shell, (a) it should recover automatically - unless you are not using systemd for some reason, in which case - do enable systemd; (b) if you do use systemd and can reproduce that crash, I would appreciate it if you can share the output of journalctl --user -u plasma-plasmashell.service -S -1min