Created attachment 170301 [details] journalctl of wake process SUMMARY When monitors wake up from power save (just turning the displays off, not full sleep) sometimes settings are lost and rotation, position and sizing is lost. It happens about 25% of the time. 2 Samsung Odyssey Neo G8 32" 4k monitors. Both connected with DP 1 LG TV 1920x1080. Connected with HDMI The 2 monitors are side by side with one monitor horizontal and one monitor vertical. The TV gets turned on infrequently and is above the horizontal monitor. The monitors are set to 3840x2160 120hz with no scaling and the horizontal monitor being primary. Using the latest version of plasma 6 (wayland) on arch. My computer is set to never sleep but to turn off displays after 15 minutes. The issues happens when waking the displays. STEPS TO REPRODUCE 1. Let the monitors enter power save. 2. Wake up monitors at a later point OBSERVED RESULT When waking the monitors from power save both monitors wake up but 25% of the time one or more of the following happens. One or both displays are rotated incorrectly. Screens will swap places (left/right) Primary display will switch. Scaling of one or both monitors will change. EXPECTED RESULT Screens (position, orientation, scaling, primary etc.) stay as they were before turning off for power save. SOFTWARE/OS VERSIONS Arch Linux Kernel Version: 6.9.3-arch1-1 (64-bit) KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.2.0 Qt Version: 6.7.1 ADDITIONAL INFORMATION GPU doesnโt matter. Wife has same displays/setup. I have Nvidia GTX 1070. Wife has Radeon 7900XTX. Issue is the same with both setups, leading me to believe its something cause by the monitors. No issues on boot. Only happens when waking from power save or turning on the TV (adding as 3rd monitor) I am new to Linux, please let me know if I can add any additional useful information, or find better logs somewhere different.
Created attachment 170310 [details] First journalctl was fail, second journalctl was sucessful wake This shows 2 different wake from power saves. The first one flipped orientation of main screen on wake. The second one kept settings as expected.
Please attach the outputs of "wayland-info" and "kscreen-doctor -o" while both displays are connected
Created attachment 170374 [details] wayland-info
Created attachment 170375 [details] kscreen-doctor -o
Okay, so both monitors have the same serial number. Could you please attach the output of kscreen-doctor -o again after triggering the output configuration to swap?
Created attachment 170388 [details] kscreen-doctor -o after issue Primary monitor lost primary, changed from 100% scaling to 150% and swapped sides. Secondary monitor swapped orientation and got marked as primary.
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!
Okay, I think it's picking completely different output settings alltogether. Could you also attach the ~/.config/kwinoutputconfig.json file and the output of drm_info, each for before you trigger the issue and after?
Created attachment 171577 [details] kwinoutputconfig.json before the issue happens
Created attachment 171578 [details] kwinoutputconfig.json after the issue happened
Created attachment 171579 [details] drm_info befor the issue happens
Created attachment 171580 [details] drm_info after the issue happens
I found I am able to set my monitors back when this happens with the following alias I created. I don't know if this helps at all with preventing the issue from happening. displaymain is aliased to `kscreen-doctor output.DP-2.enable output.DP-2.mode.3840x2160@120 output.DP-1.enable output.DP-1.mode.3840x2160@120 output.DP-2.rotation.normal output.DP-1.rotation.right output.DP-2.scale.1.00 output.DP-2.primary output.DP-1.scale.1.00 output.DP-2.position.0,1193 output.DP-1.position.3840,0; kscreen-doctor output.HDMI-A-2.disable'
I also have this issue, and I believe it's due to having a display connected but disabled in KDE's display settings. On wakeup both the positioning between the displays (orientation is fine, it always remembers my vertical monitor is set to vertical) and the primary display selection gets scrambled. I don't think it's an AMD driver bug or hardware issue as it works properly on Gnome.
(In reply to docw2732 from comment #10) > Created attachment 171578 [details] > kwinoutputconfig.json after the issue happened What I can see in there is 1. your Samsung screens have the same serial number (boo Samsung!) 2. the screens do have different EDID hashes though, so we can identify them with that 3. despite that, there are two entries in the config that are completely identical but I'm still not sure how that happens, this situation is supposed to be handled already. Could you attach the EDID of your screens here, so that we can put it into an autotest, hopefully find the cause and prevent the issue from happening again in the future? You can get the EDID blobs with > cat /sys/class/drm/card1-DP-1/edid > edid.bin > cat /sys/class/drm/card1-DP-2/edid > edid2.bin (In reply to Elabajaba from comment #14) > I also have this issue, and I believe it's due to having a display connected > but disabled in KDE's display settings. On wakeup both the positioning > between the displays (orientation is fine, it always remembers my vertical > monitor is set to vertical) and the primary display selection gets scrambled. > > I don't think it's an AMD driver bug or hardware issue as it works properly > on Gnome. Please attach your kwinoutputconfiguration.json and the EDID data as well
Created attachment 176729 [details] Requested edid
Created attachment 176730 [details] edid2
Created attachment 176731 [details] Clean pre-bug kwinoutputconfig.json
Created attachment 176732 [details] Bad post-bug kwinoutputconfig.json
Created attachment 176733 [details] /sys/class/drm/card0-DP-2/edid
Created attachment 176734 [details] /sys/class/drm/card0-DP-3/edid
Created attachment 176735 [details] /sys/class/drm/card0-HDMI-A-1/edid
(In reply to docw2732 from comment #17) > Created attachment 176730 [details] > edid2 Wow, this is an especially stupid case. The EDID contains *two* serial numbers, one as a string, and one as a number. The number is the same in the two displays (and this one is currently used for identifying screens in KWin!) but the serial number string is different. We can improve the situation a bit beyond fixing the bug by adding a version 2 identifier that contains the serial number string in addition to the number. In hindsight I should've expected display manufacturers to mess things up this bad... (In reply to Elabajaba from comment #18) > Created attachment 176731 [details] > Clean pre-bug kwinoutputconfig.json Okay, that does look like the exact same situation - same serial number, different edid hash. Thanks for the EDIDs, this should help a lot in fixing it.
(In reply to Zamundaaa from comment #23) > (In reply to docw2732 from comment #17) > > Created attachment 176730 [details] > > edid2 > Wow, this is an especially stupid case. The EDID contains *two* serial > numbers, one as a string, and one as a number. The number is the same in the > two displays (and this one is currently used for identifying screens in > KWin!) but the serial number string is different. > We can improve the situation a bit beyond fixing the bug by adding a version > 2 identifier that contains the serial number string in addition to the > number. In hindsight I should've expected display manufacturers to mess > things up this bad... > > (In reply to Elabajaba from comment #18) > > Created attachment 176731 [details] > > Clean pre-bug kwinoutputconfig.json > Okay, that does look like the exact same situation - same serial number, > different edid hash. > > Thanks for the EDIDs, this should help a lot in fixing it. In my case this isn't really a bug. I've got 2 cables going into the same LG CX TV because I dual boot Windows and use HDMI 2.1 on Windows, but have to use a DP->HDMI 2.1 adapter on Linux because AMD gpus don't support HDMI 2.1 on Linux https://gitlab.freedesktop.org/drm/amd/-/issues/1417 (and I can't just use the adapter for both because the adapter firmware that gives 4k120 4:4:4 + HDR + VRR on Linux doesn't work on Windows ๐).
*** Bug 497459 has been marked as a duplicate of this bug. ***
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6914
Git commit 7e450e42e5fcbe5d077fcfa473c65a8954c35d11 by Xaver Hugl. Committed on 23/01/2025 at 18:33. Pushed by zamundaaa into branch 'master'. outputconfigurationstore: handle imperfect matches for outputs better There are some situations where there can be multiple matches for a given output, like when two outputs with the same EDID ID but different EDID hashes or connector names were connected before and now only one of them is connected. In these situations, we'd previously just pick the first match in the list, even though the other match is more precise; and that could end up changing the settings for that output. Once the second output is connected again, it would then get the wrong settings. To fix that, this commit only considers an entry in the config as a match if there is only one match for the relevant criteria. If there's multiple, then the search is narrowed down to take more crtieria into account, like the MST path or the connector name. Related: bug 489457 M +90 -38 src/outputconfigurationstore.cpp M +3 -4 src/outputconfigurationstore.h https://invent.kde.org/plasma/kwin/-/commit/7e450e42e5fcbe5d077fcfa473c65a8954c35d11
Git commit c3f4149bf02322011842ad48682c6deabedefc00 by Xaver Hugl. Committed on 23/01/2025 at 18:37. Pushed by zamundaaa into branch 'Plasma/6.3'. outputconfigurationstore: handle imperfect matches for outputs better There are some situations where there can be multiple matches for a given output, like when two outputs with the same EDID ID but different EDID hashes or connector names were connected before and now only one of them is connected. In these situations, we'd previously just pick the first match in the list, even though the other match is more precise; and that could end up changing the settings for that output. Once the second output is connected again, it would then get the wrong settings. To fix that, this commit only considers an entry in the config as a match if there is only one match for the relevant criteria. If there's multiple, then the search is narrowed down to take more crtieria into account, like the MST path or the connector name. Related: bug 489457 (cherry picked from commit 7e450e42e5fcbe5d077fcfa473c65a8954c35d11) M +90 -38 src/outputconfigurationstore.cpp M +3 -4 src/outputconfigurationstore.h https://invent.kde.org/plasma/kwin/-/commit/c3f4149bf02322011842ad48682c6deabedefc00
(In reply to Zamundaaa from comment #28) > Git commit c3f4149bf02322011842ad48682c6deabedefc00 by Xaver Hugl. > Committed on 23/01/2025 at 18:37. > Pushed by zamundaaa into branch 'Plasma/6.3'. > > outputconfigurationstore: handle imperfect matches for outputs better > > There are some situations where there can be multiple matches for a given > output, like > when two outputs with the same EDID ID but different EDID hashes or > connector names were > connected before and now only one of them is connected. > In these situations, we'd previously just pick the first match in the list, > even though > the other match is more precise; and that could end up changing the settings > for that > output. Once the second output is connected again, it would then get the > wrong settings. > > To fix that, this commit only considers an entry in the config as a match if > there is only > one match for the relevant criteria. If there's multiple, then the search is > narrowed down > to take more crtieria into account, like the MST path or the connector name. > Related: bug 489457 > (cherry picked from commit 7e450e42e5fcbe5d077fcfa473c65a8954c35d11) > > M +90 -38 src/outputconfigurationstore.cpp > M +3 -4 src/outputconfigurationstore.h > > https://invent.kde.org/plasma/kwin/-/commit/ > c3f4149bf02322011842ad48682c6deabedefc00 I don't know if your git commit fixes this but with identical serial numbers, the Display Configuration screen doesn't correctly register applied changes. The title of the window reads "Display Configuration * -- System Settings", the Apply button remains clickable, and a warning pop ups about unsaved changes when closing the window. However, the settings are indeed applied so this is more of an annoyance than anything. Thanks for the fixes, by the way!