Bug 484875

Summary: On X11, after locking screen and turning off monitor, panels are occasionally placed in the wrong position
Product: [Plasma] plasmashell Reporter: Synthetic451 <bugs.kde.org.facelift226>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: abe.kde.bugs, dschib, jonas.bosse, kdedev, lawrenceglista, nate, niccolo.venerandi, orangewinds, pcsukus, pericam, rommager, s.kenn, sebastien.wagener
Priority: NOR    
Version: 6.0.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=481736
Latest Commit: Version Fixed In: 6.1.5
Sentry Crash Report:
Attachments: Panel in wrong position after logging back in
How it should be normally
journalctl -r from turning monitor off and on again
panel defloating in the wrong direction
Panel at top of screen "defloated" downwards
Plasmashell Kcrash

Description Synthetic451 2024-04-01 15:51:59 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Sometimes I'll lock my screen and turn off my monitor (LG C2). Later, if I come back to my computer, turn on my monitor, and unlock my computer, I'll notice that the panels are placed in the wrong positions. Sometimes you need to cause the panel to go from "unfloat" to "float" state before the bug is triggered. Notifications are also placed in the center of my screen.

This happens most frequently when the lock screen does this weird behavior where after typing in my password, there's an extra "Unlock" button that appears and I have to press enter again to get past it. Not sure what that bug is, but it usually preceeds this bug.

STEPS TO REPRODUCE
1. Lock computer, turn off monitor.
2. Step away for a few minutes
3. Log back in

OBSERVED RESULT
Panel is in the wrong position. For me, its in the top left (See screenshot)

EXPECTED RESULT
Panel stays in the configured position

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.2-arch2-1 (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3090/PCIe/SSE2
Product Name: X570 Taichi
Comment 1 Synthetic451 2024-04-01 15:54:56 UTC
Created attachment 168024 [details]
Panel in wrong position after logging back in
Comment 2 Synthetic451 2024-04-01 15:55:29 UTC
Created attachment 168025 [details]
How it should be normally
Comment 3 Sebastian Kenn 2024-04-07 09:37:00 UTC
I have a similar problem with KDE neon, Plasma 6.0.3:

The panel jumps to the top of the screen for no particular reason. It happens when I start a program and the new window opens. However, it does not happen every time I start a program. I do not use the screen lock. It can also be a trigger, but is not absolutely necessary.

I help myself by manually putting the panel back in the right position with the panel-settings. I notice this: When I select "position", three arrows appear - top, left, right - although the panel is already at the top. I have to move it to one of the three positions first. Then, in the second step, I am also offered a down arrow. The operating system seems to "believe" that the panel is still at the bottom edge.

SOFTWARE/OS VERSIONS
Operating System: KDE neon
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.5.0-26 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-4460 CPU @ 3.20GHz
Memory: 15,6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 750 Ti/PCIe/SSE
Product Name: MS-781
Comment 4 Aranjedeath 2024-04-08 04:19:34 UTC
I also have this issue. A relevant thread reporting this on the KDE Forums:
https://discuss.kde.org/t/plasma-tray-bar-relocates-itself-to-top-of-screen/12744

A possibly-same bug report from another user: 
https://discuss.kde.org/t/after-standby-the-taskbar-is-moved-from-the-bottom-to-the-top-position/13633

I am a NEON user, not Arch. 

Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6600K CPU @ 3.50GHz
Memory: 15.6 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Comment 5 Stagger Lee 2024-04-09 10:54:05 UTC
I can confirm it.

- Using latest Archlinux packages
- Laptop with NVIDIA graphic card does not have ths problem
- PC with AMD Radeon graphic card (AMD Radeon RX 580 Series) has this problem.
- Using Samsung Smart TV via HDMI.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.4-arch1-1 (64-bit)
Graphics Platform: X11

It is constant after screen lock, sleep, persistent.
Comment 6 Stagger Lee 2024-04-09 10:58:42 UTC
"It is constant after screen lock, sleep, persistent."

Sorry, I mean problem comes each time after resuming work. I meant not that I cannot move panel to the bottm manually.
I move it, and it is OK until PC goes to sleep next time.
Comment 7 Stagger Lee 2024-04-09 11:17:32 UTC
Sorry, first time here. I do not know if I can edit old comments, or how.

If it can help you with troubleshooting, but it is already mentioned here:

- I also have new "Unlock" button, do not know if it is feature or what..
- My notifications (not all) are also centered in the middle of the screen (No playing with settings helps)
- And when I login after sleep panel is correctly placed, at the bottom. What triggers it to jump to the top is clicking on some of the windows in panel (For instance to maximise Vivaldi browser, or Dolphin.)
Comment 8 Synthetic451 2024-04-09 18:02:57 UTC
@Stagger Lee

Yes, I definitely see this more often whenever I turn off my monitor or when I resume from sleep. I can also "workaround" this issue by changing my desktop resolution to something else and then reverting back. Doing so seems to reset everything back to normal. The fact that this works indicates some sort of monitor configuration bug?

Because so many users are experiencing this issue, I am setting this to confirmed.
Comment 9 Aranjedeath 2024-04-18 00:42:26 UTC
Created attachment 168633 [details]
journalctl -r from turning monitor off and on again

I don't know if this will be helpful, but this is journalctl -r for the time period immediately preceding turning my monitor off and back on again. I can reproduce it just by doing this, and then clicking any app in the "icons only" taskbar. I have only deleted the akonadi entries, as I know they are not relevant.
Comment 10 Aranjedeath 2024-04-18 00:43:28 UTC
Oh, I can't edit comments on this bug tracker. OK. Anyway. Immediately preceding to "after". It covers the time period.
Comment 11 Adrien Beau 2024-04-22 08:45:09 UTC
I have also experienced this issue, starting with Plasma 6.0.0.

- OS: KDE neon
- Display Server: X11 (X.Org)
- GPU: NVIDIA GeForce RTX 3060
  (sole GPU in the machine, the CPU has no integrated GPU)
- GPU Driver: NVIDIA v535.x
  (mainline version provided by Ubuntu, no tweaks or bizarre settings)

In my case, this is a rare issue, it has triggered 2 or 3 times over
50-days of daily usage. I switch between machines frequently, so the
screen locks and the monitor turns off several times per day. So, this
triggers in less than 1 % of cases.

The first time this happened, very soon after upgrading to Plasma 6.0.0,
I removed the panel at the top, and reconfigured a new one at the
bottom.

The last time this happened, I kept using the OS with the panel at the
top. After a short while, if I recall correctly after at least another
screen-locking / monitor-off event, the panel returned to the bottom.
Comment 12 S Rider 2024-06-03 18:19:32 UTC
I am reporting that I also am having the same issue on Manjaro, KDE 6.0.5.  I can consistently reproduce the issue by simply turning off my monitor for a moment (no need to lock), turning the monitor back on, and then the very next minimize to desktop activity will pop the panel to the top of the screen.  I had been logging off and back on to resolve the issue, but also found that going into edit mode, changing the position to top (which has no effect) and then back to bottom, will get the panel back to the bottom of the screen.

It seems to be related to the transition between the "floating" panel and the "anchored" panel (not sure of the actual terms).  When the monitor is turned off it seems to change the next panel "floating to anchored" transition to pop to the top of the screen.
Comment 13 dschib@live.de 2024-06-04 10:22:50 UTC
I can also confirm this issue. Happened after I started applying a new global theme to KDE on Garuda Linux (Arch).
The task bar is located on top, in Edit Mode I am not able to move it down immediately because it thinks it's down still. Have to move it up once in order to move it down.

Happens mostly after I shut the PC down and boot it back up. I usually don't lock my screen and haven't seen it appear after longer downtime with the PC on.
Comment 14 J Bosse 2024-06-05 17:04:43 UTC
Created attachment 170178 [details]
panel defloating in the wrong direction

Can reproduce this consistently by switching my monitor off and on again.

It seems that  S Rider (comment #12) is correct the bug has something to do with the panel de-floating. 
I tested a bunch of configurations:

Panel on the bottom -> jumps to the top
Panel on the right -> jumps to the left
Panel on the left -> panel "defloats" in the wrong direction (see attachment)
Panel on the top -> panel is stuck in the docked position but moved away from the monitor border

all those bugs can be recovered by manually setting the panel to some other border.
Comment 15 J Bosse 2024-06-05 17:13:30 UTC
Created attachment 170179 [details]
Panel at top of screen "defloated" downwards

after setting the panel position to the top and switching the monitor off and on again this is how the panel looks and it won't move regardless if there is a window touching or not.

Note: the window is maximized, and not intentionally moved behind the panel.
Comment 16 LG 2024-06-19 00:49:02 UTC
I would like to bump this thread as I am also experiencing this issue
Comment 17 Aranjedeath 2024-06-19 14:34:32 UTC
I am seeing a variant of this behavior (partial correction) in 6.1. It seems partially fixed, but not resolved. For me the bar no longer relocates to another side of the screen, but "raises or lowers" the wrong direction. So if the window is full height, the bar should stick to the side of the screen, but now it raises towards the window away from the edge. This is speaking from the same situations that would, before, result in the relocation of the bar.
Comment 18 Aranjedeath 2024-06-19 14:57:00 UTC
I attempted to "show panel configuration" (which is how I would previously relocate the bar to resolve this issue) to see if I could do the same to fix which direction the bar was leaning, and it crashed with the following in journalctl:


Jun 19 07:53:26 sakura systemd[1088]: plasma-plasmashell.service: Consumed 38.229s CPU time.
Jun 19 07:53:26 sakura systemd[1088]: Stopped KDE Plasma Workspace.
Jun 19 07:53:26 sakura systemd[1088]: plasma-plasmashell.service: Scheduled restart job, restart counter is at 1.
Jun 19 07:53:25 sakura systemd[1088]: plasma-plasmashell.service: Consumed 38.229s CPU time.
Jun 19 07:53:25 sakura systemd[1088]: plasma-plasmashell.service: Failed with result 'exit-code'.
Jun 19 07:53:25 sakura systemd[1088]: plasma-plasmashell.service: Main process exited, code=exited, status=253/n/a
Jun 19 07:53:24 sakura plasmashell[1421]: KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
Jun 19 07:53:24 sakura plasmashell[1421]: KCrash: Arguments: /usr/bin/plasmashell --no-respawn
Jun 19 07:53:24 sakura plasmashell[1421]: KCrash: Application Name = plasmashell path = /usr/bin pid = 1421
Jun 19 07:53:24 sakura plasmashell[1421]: KCrash: Application 'plasmashell' crashing... crashRecursionCounter = 2
Jun 19 07:53:24 sakura plasmashell[1421]: file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/configuration/PanelConfiguration.qml:544: TypeError: Cannot read property 'geometry' of null
Jun 19 07:53:24 sakura plasmashell[1421]: file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/configuration/PanelConfiguration.qml:536:9: QML SpinBox: Binding loop detected for property "implicitWidth"
Jun 19 07:53:24 sakura plasmashell[1421]: kde.plasmashell: requesting unexisting screen available rect -1
Jun 19 07:53:22 sakura plasmashell[1421]: KPackageStructure of KPluginMetaData(pluginId:"org.kde.merkuro.contact", fileName: "/usr/share/plasma/plasmoids/org.kde.merkuro.contact/metadata.json") does not match requested format "Plasma/Applet"
Comment 19 Stagger Lee 2024-06-23 09:26:36 UTC
Seems as fixed in 6.1.
It was very anoying bug.

Small problems with panel configuration crash, as latest user reported. Trying second time possible to enter configuration.
Comment 20 TraceyC 2024-09-30 20:12:22 UTC
Is anyone else who has been affected by this still seeing the bug?
Comment 21 Stagger Lee 2024-10-02 21:59:10 UTC
Created attachment 174342 [details]
Plasmashell Kcrash

Panel position bug is fixed but "Show panel configuration" still crrashes.
Comment 22 Nate Graham 2024-10-03 14:12:18 UTC
Sounds like a different bug; please open a new bug report for it. Thanks! Also, if possible please wait until Plasma 6.2 is released in five days and try again with that release before opening a bug report; it may already be fixed in 6.2.

Also make sure you have debug symbols; the backtrace in that attachment is currently useless. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Thanks!