Bug 462316 - With all-DisplayPort monitor setup, containment on secondary DisplayPort monitor gets lost when it turn off and then back on, but returns when plasmashell is restarted
Summary: With all-DisplayPort monitor setup, containment on secondary DisplayPort moni...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-multiscreen (show other bugs)
Version: 5.24.7
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 356225 462442 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-27 14:48 UTC by gggeri91
Modified: 2023-04-14 15:51 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27
Sentry Crash Report:


Attachments
Screenshot with latest KDE Neon (2.33 MB, image/png)
2022-11-27 14:48 UTC, gggeri91
Details
Case when two desktops went black with KDE Neon (31.04 KB, image/png)
2022-11-27 14:49 UTC, gggeri91
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gggeri91 2022-11-27 14:48:13 UTC
Created attachment 154084 [details]
Screenshot with latest KDE Neon

SUMMARY
By default the monitors turn off after 10 minutes of inactivity. Then if you move the mouse they turn back on again. After this my primary desktop turns to black and you can't right click (menu does not appear).

This command restart the shell so I can continue my work:
kquitapp5 plasmashell || killall plasmashell && kstart5 plasmashell

STEPS TO REPRODUCE
1. Boot Kubuntu 22.04 or latest KDE Neon or Fedora 37 KDE Plasma Desktop from USB stick or install it
2. Turn off monitors with "sleep 1 && xset -display :0.0 dpms force off"
3. WAIT until the monitors enter standby mode (backlight goes off)
4. After your monitors turned off, move your mouse.
5. One of the desktops will have a black background and right-click menu does not appear.

OBSERVED RESULT
One of the desktops will have a black background and right-click menu does not appear.
Repeating the test may produce two black desktops.

EXPECTED RESULT
Desktop functions without glitches.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: reproduced with 5.24.6, 5.24.7, and 5.26.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
I use two identical EIZO EV2750 60Hz 2560x1440 monitors on DisplayPort-0 and DisplayPort-1 in dual monitor mode (horizontally extended). Primary monitor is in center, second monitor is on my right.
Observed workaround: Plugging my second monitor to HDMI instead of DisplayPort-1 makes this bug disappear. 

- This bug does happen with my AMD RX 6600 XT, but not with my older AMD RX 580 8GB.
- Reproduced with latest Kubuntu LTS (22.04.1)
- Reproduced with latest KDE Neon (neon-user-20221117-0714.iso)
- Reproduced with Fedora 37 KDE edition (Fedora-KDE-Live-x86_64-37-1.7.iso), interesting it uses Wayland instead X11 and the same bug happens.
- Does not happen with Kubuntu 20.04.5, plasmashell 5.18.8 works fine.

As you see I could reproduce this bug just by booting from a USB stick, so I used always the default settings, did not change anything.
Comment 1 gggeri91 2022-11-27 14:49:46 UTC
Created attachment 154085 [details]
Case when two desktops went black with KDE Neon

Happened when repeated the test scenario the second time.
Comment 2 gggeri91 2022-11-27 18:10:30 UTC
I forgot to mention that the bug does not happen with a single monitor attached.
Seems like it is somehow related to amdgpu, I'm not sure.
Comment 3 Ralf Jung 2022-11-30 21:10:58 UTC
*** Bug 356225 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2022-12-01 20:20:18 UTC
*** Bug 462442 has been marked as a duplicate of this bug. ***
Comment 5 gggeri91 2022-12-03 11:00:30 UTC
Update: more tests with AMD RX 580 GPU

I put back my RX 580 into my system and ran more tests, because that card has a DVI output as well. I restarted my PC before each test to make sure it is a clean starting state. Please see the results below.

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-56-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 31,3 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series

---

#1 Test with DVI-D-0 + DisplayPort-1
Result: OK.  

#2 Test with DisplayPort-0 + DisplayPort-1
Result: FAILED.  

---

Conclusions:
 - The issue is related to the video output type (DisplayPort)
 - It is not related to a specific GPU model

My thoughts on DisplayPort:
DisplayPort has more capabilities than DVI/HDMI regarding power states. 
- If you turn off a monitor connected to DVI/HDMI the OS won't know about it, so the desktop layout also won't change. 
- If you turn off a DisplayPort monitor, the desktop layout changes accordingly.
So what happens when both monitors in a dual monitor setup are connected via DisplayPort? The moment they enter standby I guess both of them are "lost" to the OS which causes issues like this. This is just my theory, trying to find logic in this, please correct me if I'm wrong :)
Comment 6 Nate Graham 2022-12-05 18:25:33 UTC
Yes, your theory seems eminently plausible.
Comment 7 frederic.parrenin@univ-grenoble-alpes.fr 2022-12-06 09:58:50 UTC
I just wanted to confirm that it also happens to me on a DisplayPort connection.
Comment 8 aeneid 2022-12-06 22:21:25 UTC
It has also been happening to me with a DisplayPort primary and a HDMI secondary monitor, after waking the PC from sleep.

Operating System: EndeavourOS
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 6.0.11-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31,3 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT
Comment 9 gggeri91 2023-01-21 22:04:38 UTC
Tested with neon-testing-20230119-1946.iso -> it works!

---
I'm aware about the refactor happened regarding multi-monitor support, and I am very happy to see it works on my computer using the new testing version. Big thanks to the developers!  :)

So this works perfectly on my computer, I cannot reproduce the bug: 

Operating System: KDE neon Testing Edition
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 5.15.0-58-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6600 XT
Manufacturer: ASUS

Source: neon-testing-20230119-1946.iso
Comment 10 gggeri91 2023-02-20 13:47:29 UTC
KDE neon 5.27 works fine, I could not reproduce the bug!

Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 5.19.0-32-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor
Memory: 31,3 GiB of RAM
Graphics Processor: AMD Radeon RX 6600 XT
Manufacturer: ASUS

Many thanks!
Comment 11 aeneid 2023-02-20 14:18:30 UTC
Works for me as well.
Comment 12 Nate Graham 2023-02-20 15:24:23 UTC
Woohoo!