Bug 460618

Summary: Can't remember desktop widget positions after relogin
Product: [Plasma] plasmashell Reporter: Michael Mikowski <z_mikowski>
Component: Desktop ContainmentAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: arraybolt3, dcalvino, nate, notmart, sephiroth_pk, z_mikowski
Priority: NOR    
Version: 5.24.7   
Target Milestone: 1.0   
Platform: Kubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=413645
Latest Commit: Version Fixed In: 5.24.8
Attachments: 1. Original Layout in 4K
2. Layout after relogin
3. Compare Positions
4. Horizontal Layout in 4k
5. Horizontal Layout after Relogin
6. Compare Position, Horizontal

Description Michael Mikowski 2022-10-17 19:07:41 UTC
Created attachment 152958 [details]
1. Original Layout in 4K

SUMMARY

STEPS TO REPRODUCE
1. Place widgets on the desktop 
2. Log out
3. Log in

OBSERVED RESULT
Widgets move, even with no change in screen or resolution.

EXPECTED RESULT
Widgets should be restored to exact prior location.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.98
Qt Version: 5.15.3

ADDITIONAL INFORMATION
This is a continuation of bug 413645. I was hoping this was fixed in 5.24.7, but it was trivial to recreate.

This problem seems more likely to occur with HDPI panels, however, some have noted that this is also a problem at 1080p (bug 413645 comment 66).
Comment 1 Michael Mikowski 2022-10-17 19:08:36 UTC
Created attachment 152959 [details]
2. Layout after relogin
Comment 2 Michael Mikowski 2022-10-17 19:09:08 UTC
Created attachment 152960 [details]
3. Compare Positions
Comment 3 Nate Graham 2022-10-17 22:24:04 UTC
Darn. Any chance you could see if it's working for you with Plasma 5.26 so we can see if the fix itself is not working, or if it's backport that's not isn't working?

Though given Bug 458038, it's seeming likely that the original fix itself isn't working perfectly. But it would be good to get another data point.
Comment 4 Riccardo Robecchi 2022-10-17 22:29:34 UTC
I'm using Plasma 5.26 and it's not working.
Here is what I wrote in the original bug report: I have a desktop PC connected to my 4K TV via HDMI. The system is actually set to a resolution of 1920x1080, so I am not using the TV's default resolution but a lower one. After booting, the widgets I have on the desktop do not keep the position I set on the previous boot and are instead placed as if, at some point during the boot process, the resolution was set to an even lower value and then increased to Full-HD.
Comment 5 Michael Mikowski 2022-10-18 00:12:06 UTC
1. Per bug 458038, I tried running `plasma-shell --replace` and it did indeed fix the problem, but it took forever - somewhere around 30s. I have not confirmed if this always works.
2. I tried with a horizontal layout too, with similar results. New screen screenshots incoming.
3. Out of 12 tests:
3a. 2 times: Widgets immediately appeared in their correct positions (screenshots 1 + 4) on relogin
3b. 8 times: Widgets immediately appeared "broken" positions (screenshots 2 + 5) on relogin and stayed there
3c. 2 times: Widgets immediately appeared "broken" as above, but around 30s later, the layout abruptly reset to the correct layout.  The behavior appears identical to point 1, above.
Comment 6 Michael Mikowski 2022-10-18 00:14:15 UTC
Created attachment 152978 [details]
4. Horizontal Layout in 4k
Comment 7 Michael Mikowski 2022-10-18 00:15:01 UTC
Created attachment 152979 [details]
5. Horizontal Layout after Relogin
Comment 8 Michael Mikowski 2022-10-18 00:15:30 UTC
Created attachment 152980 [details]
6. Compare Position, Horizontal
Comment 9 Aaron Rainbolt 2022-10-18 00:35:55 UTC
Hmm, and it's happening *without* a resolution change? That's weird. Fushan Wen thought that perhaps a Qt bug had something to do with one aspect of this mess, but I've been having a ridiculously hard time getting Qt to build at all, thus why I still have yet to try it. I'll make it my top priority and see if it fixes anything, though I don't have very high hopes that it will if a resolution change isn't part of the problem now. I'll also try the original bugfix I had for this and see if it helps anything.

Interestingly enough, I have been totally unable to reproduce this problem in any version of Plasma that I've tried using an emulated 4K display in VirtualBox. Are you guys who can reproduce the bug using discrete graphics hardware by any chance?
Comment 10 Riccardo Robecchi 2022-10-18 08:56:34 UTC
(In reply to Aaron Rainbolt from comment #9)
> Hmm, and it's happening *without* a resolution change? That's weird. Fushan
> Wen thought that perhaps a Qt bug had something to do with one aspect of
> this mess, but I've been having a ridiculously hard time getting Qt to build
> at all, thus why I still have yet to try it. I'll make it my top priority
> and see if it fixes anything, though I don't have very high hopes that it
> will if a resolution change isn't part of the problem now. I'll also try the
> original bugfix I had for this and see if it helps anything.
> 
> Interestingly enough, I have been totally unable to reproduce this problem
> in any version of Plasma that I've tried using an emulated 4K display in
> VirtualBox. Are you guys who can reproduce the bug using discrete graphics
> hardware by any chance?

In my case there is a resolution change (from the panel's native 4K to Full-HD). I am using a discrete GPU, an AMD Radeon RX 5700 XT.
Comment 11 Nate Graham 2022-10-19 15:36:48 UTC
From Bug 458038, it seems like folks are reporting that this works on Wayland now, but is still broken on X11.

For anyone able to reproduce on X11, can you try the following:

1. Log out of your X11 session
2. Log into a wayland session
3. Arrange widgets how you want
4. Log out of the wayland session
5. Log into it again

...And see if the problem happened again. If not, this is a duplicate of Bug 458038, and we'll track the fix there.

Thanks!
Comment 12 Bug Janitor Service 2022-10-19 19:41:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2240