Bug 433867

Summary: Icons on rotated secondary screen reset to default positions or move to random positions on login/wake-from-sleep
Product: [Plasma] plasmashell Reporter: Ric Grant <richard>
Component: FolderAssignee: Aleix Pol <aleixpol>
Status: REPORTED ---    
Severity: normal CC: hein, jorgezary, nate, noh.spam.jose, plasma-bugs
Priority: NOR Keywords: multiscreen
Version: 5.20.5   
Target Milestone: 1.0   
Platform: Gentoo Packages   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=469062
https://bugs.kde.org/show_bug.cgi?id=468546
Latest Commit: Version Fixed In: 5.23
Sentry Crash Report:
Attachments: plasma-org.kde.plasma.desktop-appletsrc after scrambling
plasma-org.kde.plasma.desktop-appletsrc before scrambling

Description Ric Grant 2021-03-02 16:23:55 UTC
SUMMARY
My laptop, an ASUS US563F, includes a secondary screen under the touchpad. The screen is at a 90 degree rotation so within KDE's own display configuration, I have the orientation set to a 90 degrees anticlockwise rotation.

KDE picks this up just fine and rotates properly once I'm logged in, although SDDM shows unrotated upon initial boot which is understandable if the display config is user specific, but if I place icons on this screen, they're shuffled to seemingly random locations every time I boot up, or close the lid and re-open, or fold the lid back and reset to a natural position. Each of these events effectively turns the screen off and back on again so presumably it's the power-on event that triggers this shuffle.

My feeling is that KDE is setting the icon locations first, then actioning the rotation, and having to shuffle icons around to fit the new orientation. Swapping these two events so as the rotation happens before the icons are loaded would I'm sure resolve.

STEPS TO REPRODUCE
1. Add icons to a secondary screen with a 90 degree orientation.
2. Reboot, or close the lid and re-open if a laptop, or probably just reconnect the secondary screen.
3. Compare the icon positions to their original.

OBSERVED RESULT
Icons move around to seemingly random locations each time the screen is reconnected.

EXPECTED RESULT
Icons shouldn't move around on their own accord.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Gentoo GNU/Linux on an ASUS UX563F laptop with a secondary screen permanently attached under the touchpad device.

I've experienced this bug since originally setting this laptop up probably 6 months or so ago. Unsure of the KDE versions in use at that time but this certainly isn't a new issue to the above versions.
Comment 1 Nate Graham 2021-08-16 23:37:02 UTC
Ooh, this should have been fixed in Plasma 5.23. Please check again once that's released in a month and a half!
Comment 2 Ric Grant 2021-08-17 08:30:56 UTC
(In reply to Nate Graham from comment #1)
> Ooh, this should have been fixed in Plasma 5.23. Please check again once
> that's released in a month and a half!

Brilliant news. I'll update as soon as that's in the Gentoo repositories and confirm back.
Comment 3 Nate Graham 2021-08-17 14:22:22 UTC
Great! Please do feel free to re-open this bug report if you find that it's still not working in 5.23. I'm about 95% sure it's fixed, but I could be wrong.
Comment 4 Ric Grant 2021-12-25 13:46:50 UTC
I've now updated to the finally stable Plasma 5.23.4-r1 and, unfortunately, not only does this issue still seem to occur, now the second screen seems even more problematic.

Previously the icons reset their positions when the lid was closed and re-opened but the screen otherwise behaved properly. Now, in addition to this happening, sometimes clicking an icon turns the screen off for a few seconds causing the icons to reset their positions again when it powers back up. Other times after opening the lid the icons actually are in the correct place still, but clicking anywhere on that screen then resets their positions.

I'm not seeing anything useful in dmesg or Xorg.0.log when this happens, surprisingly.
Comment 5 Nate Graham 2023-04-11 14:47:16 UTC
Mose of the code here has changed to improve multimonitor use-cases in Plasma 5.27. Any chance you can upgrade to that version and see if the issue is fixed now?
Comment 6 Ric Grant 2023-04-11 14:58:18 UTC
(In reply to Nate Graham from comment #5)
> Mose of the code here has changed to improve multimonitor use-cases in
> Plasma 5.27. Any chance you can upgrade to that version and see if the issue
> is fixed now?

Still waiting for a stable 5.27 on Gentoo unfortunately, and need this particular laptop to remain stable so I'm being cautious about upgrading to test trees to be honest.

https://packages.gentoo.org/packages/kde-plasma/plasma-desktop

As soon as it's deemed stable enough though, I'll feedback.
Comment 7 Bug Janitor Service 2023-04-26 03:46:05 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Ric Grant 2023-04-26 08:58:45 UTC
5.27.4-r1 is finally in the Gentoo stable branch. I'll pull the updates today and report back asap.
Comment 9 Ric Grant 2023-04-27 09:08:42 UTC
(In reply to Nate Graham from comment #5)
> Mose of the code here has changed to improve multimonitor use-cases in
> Plasma 5.27. Any chance you can upgrade to that version and see if the issue
> is fixed now?

Running 5.27.4 now, and unfortunately this is still an issue.

I rebooted after the upgrades to be certain nothing iffy would still be running from RAM.

Positioned the icons, closed the lid for a few seconds, re-opened and all were back along the top row. Re-positioned again, rebooted, and all were scrambled completely. Re-positioned again, set to locked, closed the lid for a few seconds, re-opened and all were scrambled and locked to their scrambled positions.
Comment 10 Nate Graham 2023-04-27 16:02:41 UTC
Darn. And unfortunately I cannot reproduce the issue with your exact steps. :/ However while testing I did find another issue that's 100% reproducible for me even when not using a rotated secondary screen: Bug 469062.

Maybe I'm not testing correctly. Can you write super duper duper duper detailed steps to reproduce? Another option is to take a phone video of the issue happening in real-time.
Comment 11 Ric Grant 2023-04-27 18:04:27 UTC
(In reply to Nate Graham from comment #10)
> Darn. And unfortunately I cannot reproduce the issue with your exact steps.
> :/ However while testing I did find another issue that's 100% reproducible
> for me even when not using a rotated secondary screen: Bug 469062.
> 
> Maybe I'm not testing correctly. Can you write super duper duper duper
> detailed steps to reproduce? Another option is to take a phone video of the
> issue happening in real-time.

There's a bit of fumbling as using a touchpad while you're trying to both see and record it is apparently more difficult than you'd imagine, but here's a video showing the problem both when rebooting and when closing + opening the lid (effectively turning the screens off). Also tried to show the relevant set-up of both screens, and of the icon settings. Hopefully all clear enough.

I can't promise I'll keep this video in Dropbox forever so please download a copy if useful. Came out a bit whopping at 1.6GB !

https://www.dropbox.com/s/rzbmnokilbwzj1e/20230427_182316.mp4?dl=0
Comment 12 Nate Graham 2023-04-28 16:29:05 UTC
Downloaded it, thanks. What an interesting piece of hardware. A screen in the touchpad; amazing.

Can you attach your ~/.config/plasma-org.kde.plasma.desktop-appletsrc file after you re-arrange the icons to be in the right locations, then reproduce the issue, then attach it again? We can see what changed and maybe why it's happening.

If you find any personally-identifying information in there, please do scrub it before attaching. :)
Comment 13 Ric Grant 2023-04-28 22:47:27 UTC
Created attachment 158527 [details]
plasma-org.kde.plasma.desktop-appletsrc after scrambling
Comment 14 Ric Grant 2023-04-28 22:48:18 UTC
Created attachment 158528 [details]
plasma-org.kde.plasma.desktop-appletsrc before scrambling
Comment 15 Ric Grant 2023-04-28 22:49:09 UTC
(In reply to Nate Graham from comment #12)
> Downloaded it, thanks. What an interesting piece of hardware. A screen in
> the touchpad; amazing.
> 
> Can you attach your ~/.config/plasma-org.kde.plasma.desktop-appletsrc file
> after you re-arrange the icons to be in the right locations, then reproduce
> the issue, then attach it again? We can see what changed and maybe why it's
> happening.
> 
> If you find any personally-identifying information in there, please do scrub
> it before attaching. :)

It's a brilliant additional screen for positioning icons on that are then never hidden by apps, or for dragging apps down to that are just useful to be visible while doing something else. Just immensely irritating that the icons keep shuffling! When they're along the top of the screen they become really easy to accidentally click on when intending to tap a minimised window on the main panel too.

Tidy and messy versions of plasma-org.kde.plasma.desktop-appletsrc attached, but it seems to only be the positions line within the [Containments][2][General] section that changes, perhaps unsurprisingly.
Comment 16 Greg 2023-10-27 07:53:15 UTC
I have a similar problem:
I have 2 x 4k screens and each has a similar but slightly different panel. I tend to leave my PC running overnight but if I turn off the screens in the evening and then turn them on again in the morning or if I enable the screen-saver, then on resuming, usually the panel from the left screen appears on the right and then panel from the right screen appears on the left. I have opened the display settings and pressed the 'identify' screens button and the screens identified match the display position as shown in the graphic (I assume each monitor is uniquely identified here, so the identity should be expected to report the physical actuality), so it seems the config for the panels either doesn't reference the screen ID or forgets it.

My work-around is to go into edit mode for each panel in turn and drag it to where I originally placed it.