Bug 482211

Summary: Desktop icons sorted by name were occasionally unsorted when starting Plasma
Product: [Plasma] plasmashell Reporter: Matt Fagnani <matt.fagnani>
Component: FolderAssignee: Plasma Bugs List <plasma-bugs>
Status: NEEDSINFO WAITINGFORINFO    
Severity: normal CC: bugseforuns, hein, kdedev, nate, nicolas.fella, thomas
Priority: NOR Keywords: qt6
Version: 6.0.0   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Matt Fagnani 2024-03-02 05:24:24 UTC
SUMMARY

I have 18 desktop icons sorted by name arranged into 3 columns in Plasma 6.0.0 on Wayland in a Fedora 40 KDE Plasma installation. The desktop context menu for Icons shows Sort By - Name, Arrange - Top to bottom, Align - Left, Show previews is enabled, Locked isn't enabled. Desktop icons sorted by name were occasionally unsorted when starting Plasma. The desktop icons were seemingly randomly ordered and Sort By was Unsorted when this problem happened.
This problem happened about 10-20% of the time I started Plasma. I've seen this problem a few times in the last week or so.

STEPS TO REPRODUCE
1. Boot a Fedora 40 KDE Plasma installation with a user with 18 desktop icons sorted by name arranged into 3 columns and desktop context menu for Icons set to Sort By - Name, Arrange - Top to bottom, Align - Left, Show previews is enabled, Locked isn't enabled. 
2. Log in to Plasma 6.0.0 on Wayland from sddm
3. If the problem didn't happen, log out.
4. Repeat 2-3 until the problem happens.

OBSERVED RESULT
Desktop icons sorted by name were occasionally unsorted when starting Plasma

EXPECTED RESULT
Desktop icons sorted by name would always be sorted when starting Plasma

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 40
(available in About System)
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION

The version field when entering this report didn't show 6.0.0 as an option so I selected 5.93.0.
Comment 1 Nate Graham 2024-03-05 17:05:02 UTC
Unfortunately the code for desktop icon positioning is quite fragile and buggy. There are plans to rewrite to fix this and other similar bugs. Maybe for Plasma 6.1 or 6.2.
Comment 2 Matt Fagnani 2024-03-06 04:49:54 UTC
(In reply to Nate Graham from comment #1)
> Unfortunately the code for desktop icon positioning is quite fragile and
> buggy. There are plans to rewrite to fix this and other similar bugs. Maybe
> for Plasma 6.1 or 6.2.

OK thanks. I should note that I set the splash screen to None because the splash screen was being shown for about 20 s even though the desktop took around 5 s to load completely as I reported at https://bugs.kde.org/show_bug.cgi?id=479824 I don't know if that might be involved. When the problem happened 2-3 times after I reported this, the first few icons were still ordered by name and the ones after that were randomly ordered. This problem might've happened less than 10% of the times I started Plasma.
Comment 3 TraceyC 2024-08-01 00:27:53 UTC
There are multiple bugs describing the same or similar behavior for icon positioning on the desktop not being saved. I'm using 468546 as the main one.

*** This bug has been marked as a duplicate of bug 468546 ***
Comment 4 Matt Fagnani 2024-11-09 23:40:14 UTC
This problem happened with Plasma 6.2.3, but it was infrequent. I'm reopening this report as Nate requested at https://bugs.kde.org/show_bug.cgi?id=468546#c41
Comment 5 Nate Graham 2024-11-12 16:20:35 UTC
May be fixed with the big icon refactor in Plasma 6.3, which closed almost a dozen bug reports about icon mis-positioning. Can you test again with current git master?
Comment 6 Matt Fagnani 2024-11-14 02:52:25 UTC
I haven't built Plasma from git before, but I've looked into it. I might be able to do so. If not, I'll test it with 6.3 beta. The problem happened likely less than 5% of logins with 6.2.3. It might be difficult to be sure that git master isn't affected without logging in a large number of times. Thanks.
Comment 7 TraceyC 2024-11-14 16:45:01 UTC
Thanks for being willing to re-test. Let us know how it goes :)