Bug 467726

Summary: Secondary Monitor Connected to eGPU does not Wake from Sleep
Product: [Plasma] kwin Reporter: Robin <brotatos>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, nate, uwu, xaver.hugl
Priority: NOR    
Version First Reported In: 5.27.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: DRM Info command output when both monitors are connected and screens show up.
DRM Info command output after wake from sleep when only one monitor turns on and the other remains off (even with powering it on - no screen output is seen).

Description Robin 2023-03-23 19:32:54 UTC
SUMMARY

- secondary monitor does not wake from sleep
- setup is an eGPU with an AMD 6750 XT connected over thunderbolt to a Dell Precision laptop with an onboard intel gpu

STEPS TO REPRODUCE
1. Sleep 
2. Wait for monitors to go into deep sleep
3. Type / move mouse
4. Primary monitor turns on, secondary remains off

OBSERVED RESULT

Secondary can only be turned on by hard-power cycling the monitor.

EXPECTED RESULT

Secondary turns on automatically.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma:  6.2.8-arch1-1 (64-bit) / 
(available in About System)
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

Linux mars 6.2.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 22 Mar 2023 22:52:35 +0000 x86_64 GNU/Linux
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05)
0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev c0)
Comment 1 Zamundaaa 2023-04-05 13:01:00 UTC
Is the second monitor still present in system setting when this happens? Also please attach the output of drm_info (https://gitlab.freedesktop.org/emersion/drm_info) before and after the output is off.
Comment 2 Robin 2023-04-05 13:10:47 UTC
> Is the second monitor still present in system setting when this happens?

Yup! It's still there.

> Also please attach the output of drm_info 

Sure, will attach this later today.
Comment 3 Robin 2023-04-05 17:13:24 UTC
Created attachment 157874 [details]
DRM Info command output when both monitors are connected and screens show up.
Comment 4 Robin 2023-04-05 17:14:08 UTC
Created attachment 157875 [details]
DRM Info command output after wake from sleep when only one monitor turns on and the other remains off (even with powering it on - no screen output is seen).
Comment 5 Zamundaaa 2023-04-05 17:53:54 UTC
Okay, so the kernel considers both outputs as connected and turned on, so at first glance I'd assume this is a kernel bug.

It looks like you're on X11. Can you also test this on Wayland?
Comment 6 Robin 2023-04-05 19:14:47 UTC
Testing on Wayland is difficult, as the eGPU has to copy what it draws over to the CPU resulting in subpar performance (10-13 FPS). I'll be using X11 long term until Wayland works well with secondary or external GPUs in the future.
Comment 7 Nate Graham 2023-04-05 19:17:44 UTC
Sure but can you test it for the purposes of this bug report?
Comment 8 Robin 2023-04-05 20:27:25 UTC
I am unable to reproduce it on Wayland.
Comment 9 Zamundaaa 2023-04-06 16:28:20 UTC
Ok, then this is most likely a consequence of the kernel reacting differently to something that xf86-video-amdgpu does vs what kwin_wayland does. Please report this bug to https://gitlab.freedesktop.org/drm/amd/-/issues, with the drm_info outputs attached.
Comment 10 Robin 2023-04-06 16:46:02 UTC
Done. 

https://gitlab.freedesktop.org/drm/amd/-/issues/2497

Thanks for the help!