Bug 470604

Summary: Desktop icon positions and pinned Task Manager apps reset when plasmashell is stopped/started or restarted using systemctl
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: major CC: bugseforuns, hein, hugojmaia, justin.zobel, kde, piotr.mierzwinski, publiclyvisibleemail
Priority: NOR Keywords: qt6
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Nate Graham 2023-06-03 20:13:14 UTC
STEPS TO REPRODUCE
1. Have any desktop icons
2. Move one of them anywhere
3. Restart plasmashell or reboot the computer

OBSERVED RESULT
The icon you moved has returned to where it was before

EXPECTED RESULT
The icon stays where you moved it

ADDITIONAL INFORMATION
100% reproducible for me in all cases even with a simple single-screen setup; so this isn't a complex multi-screen multi-containment issue. Saving desktop icons positions simply appears to be 100% broken.

To my knowledge it never worked at all in Plasma 6, so it's a Qt 6 or porting issue, not a recently introduced regression in Folder View itself.
Comment 1 Justin Zobel 2023-06-04 02:11:44 UTC
I have plasmashell running in a terminal because well, it's Plasma 6 and it's janky.

If I Ctrl C the plasmashell process and start it again it won't remember the icon placement
If I open a new tab and plasmashell --replace it will remember the placement.
Comment 2 Justin Zobel 2023-06-21 12:33:18 UTC
I can't replicate this. I moved an icon to the other side of the desktop and ran "plasmashell --replace" in a  terminal and the icon stayed the same. Can you still reproduce this?
Comment 3 Nate Graham 2023-06-21 14:06:16 UTC
Ok, so Justin and I figured this out:

- If you restart plasmashell with `plasmashell --replace`, moved icons remember their positions
- If you restart plasmashell with `systemctl restart --user plasma-plasmashell.service`, moved icons do *not* remember their positions. Same thing when using `systemctl stop` followed by `systemctl start`
Comment 4 Nate Graham 2023-06-21 14:58:27 UTC
*** Bug 470624 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2023-07-04 19:45:49 UTC
*** Bug 471949 has been marked as a duplicate of this bug. ***
Comment 6 hugomaia 2023-07-06 11:32:43 UTC
Using plasma-wayland-session, this desktop icons getting reorganized just happened with me restarting my computer.
Previously on X11 it did happen whenever my system went to sleep. And also every time something messed with the resolution.

There's the workaround of using the folder view widget, it'll do if all you want is to have multiple blocks of folders on the desktop.
Comment 7 Nate Graham 2023-07-06 16:46:16 UTC
(In reply to hugomaia from comment #6)
> Using plasma-wayland-session, this desktop icons getting reorganized just
> happened with me restarting my computer.
Right, because when using systemd startup, systemd is also used to shutdown, and that triggers this bug.

That's assuming you're using Plasma 6, of course. If you're using Plasma 5, then your issue is caused by something else. Possibly a less severe manifestation of this same issue, which got worse when using Qt6 for some reason.
Comment 8 Nate Graham 2023-07-31 16:26:25 UTC
*** Bug 472820 has been marked as a duplicate of this bug. ***
Comment 9 Bug Janitor Service 2023-08-07 12:37:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3160
Comment 10 Harald Sitter 2023-08-08 10:50:52 UTC
Git commit 2312adcec9d46ecd791686861c37536ede61fce1 by Harald Sitter.
Committed on 08/08/2023 at 12:50.
Pushed by sitter into branch 'master'.

shell: quit on sigterm

systemd will send TERM when asking the application to terminate. by
default Qt doesn't handle this so we need an explicit signal handler to
terminate nicely

M  +13   -0    shell/main.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/2312adcec9d46ecd791686861c37536ede61fce1