Bug 465001

Summary: Multi monitor: Third monitor can not be used until after a sleep / wake cycle
Product: [Plasma] kwin Reporter: John <comptechtalk>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: jr, kdedev, neon-bugs-null, sitter
Priority: NOR Keywords: multiscreen
Version First Reported In: 5.26.90   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description John 2023-01-29 19:20:41 UTC
SUMMARY
I installed KDE Neon Testing (Plasma 5.26.90) to my Nvidia equipped Lenovo Laptop.  I have two external monitors attached, one HDMI and one Display Port.  Once I had the NVidia drivers installed and Nouveau drivers black listed, I tried to set up the two external monitors.  Using the "Display Configuration" dialog, I dragged the screens around to arrange them, made sure they were enabled and adjusted the priorities.  I applied the changes, but the monitor connected to the display port would not update.  I forget what was on the screen, either a mirror of the main screen or blank. I put the computer to sleep, and then woke it.  When it woke, the monitor connected to the display port worked as expected.

This will happen when rebooting the computer as well.  The computer will boot up, and the laptop display as well as the HDMI display work as expected.  The Display Port monitor will show a black screen with a white  logo  ( the same logo used in the tray for the Application Launcher).  The Display Port monitor can not be used until after a sleep / wake cycle.

STEPS TO REPRODUCE
1. Fresh install of KDE Neon Testing.  I started with a blank disk, no user data or settings.  On my system I had to manually install the NVida drivers with apt, and disable the Nouveau drivers, as well as disable apparmor.

2. Open Display Configuration and set up displays.  While I could set them up, Pressing "Identify" did not show anything on the Display Port connected monitor at this stage.  Apply the settings.

OBSERVED RESULT
The display port connected monitor would not display any updated image, nor was the mouse pointer rendered.  However, Plasma would allow me to for example, partially drag a window off of one screen and into the area of the non working monitor.  It wouldn't render, but Plasma thought it was okay to move a window into that area.  Same with the mouse pointer.  Instead of being stuck at the edge of the working screen, I could move it into the area of the non working screen.  I wouldn't see it, but Plasma let me move the mouse into the area.

Put the computer to sleep, and wake it up.  All worked as expected.  All three displays worked, and no matter how many times I went through seep / wake cycles, it continued to work.  However, if I reboot the computer, the Display Port monitor will not be usable until I put the computer to sleep and wake it again.


EXPECTED RESULT
All three monitors should behave normally after setting them up with the Display Configuration dialog.  Using "Identify" from that dialog should put the identification banner on each of the monitors, not just the laptop and HDMI monitors.  I should not have to put the computer to sleep and then wake it to have normal use of all three displays either when installing for the first time or when rebooting the system.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Testing Edition (Updated Jan 28, 2023)
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 5.15.0-58-generic (64-bit)
Graphics Platform: X11
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 82JF
System Version: Legion 5 Pro 16ITH6

NVIDIA Driver Version: 525.78.01
NVML Version 12.525.78.01

ADDITIONAL INFORMATION
Originally reported as part of bug https://bugs.kde.org/show_bug.cgi?id=460341 but this is different.  Instead of multi monitor configuration being lost with every sleep / wake, now, once it is working, it stays working until I reboot.
Comment 1 John 2023-01-29 19:59:15 UTC
The bug can also be triggered without a reboot.  Instead remove one of the connection of one of the monitors, then reconnect it.  That monitor will no longer show a valid image.  Note, this can be done with either the HDMI or the Display Port connected monitor.  I tested both, and in each case the monitor removed will not be fully functional until a sleep / wake cycle.

Note that Plasma does kind of know the monitor is there.  As I explained above, I can move a window to the "non working" monitor.  However I won't be able to see the window until a sleep wake cycle.  I can attach pictures if this isn't clear.
Comment 2 John 2023-02-23 02:30:56 UTC
Modified to be reported under kwin / multimonitor as per blog post by Marco Martin.
Comment 3 TraceyC 2024-08-22 19:59:31 UTC
I see very similar behavior on my system, also multi monitor, with an nVidia GPU

SUMMARY
After laptop display and external displays go to sleep, external monitors to not get a valid display when waking them. Display Configuration displays the correct configuration but loses the external monitors when you try to change settings.

SETUP
Laptop connected via USB C to dock, 2 external displays

Displays had been set to
Laptop built-in - 3840x2400@150% 60Hz
External 1 DP - 3440x1440@100%  100Hz
External 2 HDMI - 3440x1440@100%  85Hz

GPU hybrid Intel / nVidia - proprietary drivers 550

STEPS TO REPRODUCE
Locked screen, went away for a while, all displays went to sleep.
Unlocked screen, only the laptop display lit up. Mouse was not confined to it, Plasma still considered all 3 screens active.
I could only see the login screen on the laptop display, It did not show the password prompt, indicating the focus was on one of the other screens. I was able to log in by blindly entering my password.
The left display had backlight for a bit, then went black. Right display did not change from blackt. There were no messages about "no signal" on either.

Went to Display Configuration
Set Right monitor to 50Hz, Apply - no change
Set Left monitor to  75Hz - system appeared to do display negotiation. Display Configuration changed to only show the laptop display.

Unplugged the dock cable and reseated. Plasmashell crashed and restarted
Monitors were still black, they were again both shown in Display Config, both enabled but neither had a display

In About this System, the GPU is shown as Mesa Intel UHD Graphics rather than nVidia.

An attempt to restart plasmashell when the dock was connected, with systemctl restart --user plasma-plasmashell.service caused it to segfault
After that, when I reseated the docking cable, the display was extended to all 3 displays as expected

ADDITIONAL INFORMATION
This bug doesn't happen with the monitors set to lower refresh rates e.g.
Laptop built-in - 3840x2400@150% 60Hz
External 1 DP - 3440x1440@100%  75Hz
External 2 HDMI - 3440x1440@100%  50Hz