Wrong Widget Position when switching Monitor off and on again

Hi there

I’m using a dual monitor setup with one 4k monitor as my main screen and one Full HD monitor as my secondary screen. All my widgets and panels are located on the main screen. When I turn off this monitor or switch to another input, all my stuff on the desktop automatically moves to the secondary screen. After turning the main monitor back on again, the panels move back to their respective places but the widgets stay on the secondary screen. Also it seems that the desktop settings get reset cause after switching the monitor back on I get the default light bulb wallpaper instead of my image slideshow.
What is causing this and how can I prevent this from happening?

I may have figured something out. Because it happens when switching off one monitor, I thought, maybe it has to do with losing the monitor information, so I exported the EDIDs of both monitors using nvidia-settings and added the following:


Section "Monitor"
    Identifier     "Monitor0"
    Option         "DPMS"


Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    Option         "CustomEDID" "DP-0:/edid/asus_mg24u.bin; DP-2:/edid/samsung_syncmaster_206bw.bin"

Note: I shortened the path. My EDID files are not really located in /edid

After a restart I tried to switch the monitors off and on again in different patterns and the layout stayed. So maybe that’s it. But I will continue to watch the situation and report any strange behaviour.