Bug 506638

Summary: With always-visible left screen edge panel, restarting plasmashell sometimes makes each row shift a number of columns to the left equal to that row's index
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: Desktop icons & Folder View widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: agarplayerarlon, akselmo, hein
Priority: NOR    
Version First Reported In: 6.4.80   
Target Milestone: 1.0   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.4
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 503500    
Attachments: Indended icon arrangement
Actual icon arrangement after restarting plasmashell a few times
Issue still happening in 6.4.4

Description Nate Graham 2025-07-05 14:56:45 UTC
STEPS TO REPRODUCE
1. Have a left screen edge panel that's 50 px thick
2. Put a bunch of files on the desktop
3. Restart plasmashell using `systemctl restart --user plasma-plasmashell.service` many times. I do this throughout the day as I test Plasma merge requests


OBSERVED RESULT
Some of the time, each row of icons gets shifted one column to the left of the row above it. For example:
- The first row (on top, index 0) does not shift
- The second row (below it, index 1) shifts one column to the left
- The third row (index 2) shifts two columns to the left
- Any icons that would overflow off the left edge of the desktop get relocated to the first open position according to the alignment settings (e.g. with default settings, right after the last icon on the first row)

See attached before and after pics that illustrate how this looks.


EXPECTED RESULT
All icons stay where they are no matter how many times plasmashell is restarted


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon™ 780M Graphics
Memory: 16 GiB of RAM (14.9 GiB usable)
Graphics Processor: AMD Radeon 780M Graphics


ADDITIONAL INFORMATION
Probably a race condition somewhere, as it does not happen on *every* plasmashell restart. I'd estimate that it happens maybe 20% of the time.

The screen is 2880x1800 and uses a 175% scale factor.

The issue reproduces on a single screen. I can't remember if it happens with another screen plugged in and am not in a position to test that right now.

This has been happening at least for months, possibly longer.
Comment 1 Nate Graham 2025-07-05 15:00:11 UTC
Created attachment 182978 [details]
Indended icon arrangement
Comment 2 Nate Graham 2025-07-05 15:00:48 UTC
Created attachment 182979 [details]
Actual icon arrangement after restarting plasmashell a few times
Comment 3 Akseli Lahtinen 2025-07-30 15:03:54 UTC
Git commit ec1d01545c667801c6529db1c8304d1d524ccbc9 by Akseli Lahtinen.
Committed on 30/07/2025 at 09:51.
Pushed by akselmo into branch 'master'.

FolderView: Use perStripe from positioner, fix off-by-one error

If perStripe from positioner and the qml calculations were off sync,
which could happen when a sidepanel was loading, this would
cause icons move around randomly.

In positioner we check if the position is smaller or equal than
perStripe.
In this QML movement code, we only checked if its smaller, causing
unnecessary moves.

M  +2    -2    containments/desktop/package/contents/ui/FolderView.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/ec1d01545c667801c6529db1c8304d1d524ccbc9
Comment 4 Nate Graham 2025-07-30 17:09:54 UTC
*** Bug 507631 has been marked as a duplicate of this bug. ***
Comment 5 Akseli Lahtinen 2025-07-31 10:33:44 UTC
Git commit 005713eb2aea869782c687ff1d2af011ad49024a by Akseli Lahtinen.
Committed on 31/07/2025 at 09:00.
Pushed by akselmo into branch 'Plasma/6.4'.

FolderView: Use perStripe from positioner, fix off-by-one error

If perStripe from positioner and the qml calculations were off sync,
which could happen when a sidepanel was loading, this would
cause icons move around randomly.

In positioner we check if the position is smaller or equal than
perStripe.
In this QML movement code, we only checked if its smaller, causing
unnecessary moves.

(cherry picked from commit ec1d01545c667801c6529db1c8304d1d524ccbc9)

M  +2    -2    containments/desktop/package/contents/ui/FolderView.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/005713eb2aea869782c687ff1d2af011ad49024a
Comment 6 agarplayerarlon 2025-08-07 11:25:53 UTC
hey, this is still happening to me in 6.4.4, I'm gonna attach a screenshot of the issue happening again
Comment 7 agarplayerarlon 2025-08-07 11:26:32 UTC
Created attachment 183854 [details]
Issue still happening in 6.4.4
Comment 8 Nate Graham 2025-08-07 15:00:45 UTC
This is fixed for me, at least with a single screen.

We found another case where it still happens with multiple screens, and that'll be fixed with https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3144.

Do you have multiple screens?
Comment 9 agarplayerarlon 2025-08-07 16:53:23 UTC
(In reply to Nate Graham from comment #8)
> This is fixed for me, at least with a single screen.
> 
> We found another case where it still happens with multiple screens, and
> that'll be fixed with
> https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3144.
> 
> Do you have multiple screens?

I have a single monitor too, in the second after I log in, before the taskbar/panel gets rendered, I see the desktop icons moving from the left side of my screen, to their right position on the right side of my screen, and maybe in that second, there is still the chance that this bug can happen again, because it did happen again for me
Comment 10 Nate Graham 2025-08-08 16:31:44 UTC
Thanks. I strongly suspect your situation is one of the edge cases fixed in https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3144, which will be in Plasma 6.4.5.

If so, great! If not, please open a new bug report about it, and mention this one in it (and/or relate them using the "See also" field).
Comment 11 agarplayerarlon 2025-08-08 18:05:37 UTC
(In reply to Nate Graham from comment #10)
> Thanks. I strongly suspect your situation is one of the edge cases fixed in
> https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3144, which
> will be in Plasma 6.4.5.
> 
> If so, great! If not, please open a new bug report about it, and mention
> this one in it (and/or relate them using the "See also" field).

thank you very much for the insight, you guys working at KDE Plasma are the best! I will keep donating to you guys because you actually listen to the community and fix the bugs!

I hope it will be fixed in 6.4.5, if it's not I'll make a new bug report like you said!
Comment 12 Nate Graham 2025-08-11 13:43:08 UTC
You're welcome!