Bug 461648

Summary: Primary display is not detected after waking from sleep
Product: [Plasma] KScreen Reporter: Oleksii Zolotarevskyi <rockingcat>
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bompus, nate
Priority: NOR    
Version: 5.26.2   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Output of the command "journalctl -xe -b"
Output of the command "grep -Ei "NVIDIA|modeset" /var/log/Xorg.0.log"
Video demonstration of the issue

Description Oleksii Zolotarevskyi 2022-11-09 23:12:06 UTC
Created attachment 153636 [details]
Output of the command "journalctl -xe -b"

SUMMARY
I have a laptop with Nvidia graphics, with external display set as primary display and laptop display disabled.
After Plasma update from 5.25.5-4 to 5.26.2-1, the primary display is not detected after system wakes from sleep or the display wakes from energy saving. Instead I get a blinking laptop display and no signal on the external display.

The only way to bring back the primary screen was to select "Unify outputs" in the display options. However this method works unreliably.

STEPS TO REPRODUCE
1. Connect the external display to the laptop with Nvidia GPU. Set Nvidia primary GPU (in case of hybrid graphics).
2. Set the external display as primary. Disable the built-in display.
3. Wait until the external display enters power saving, or system goes to sleep.
4. Wake the display or the system from sleep (e.g. by moving the mouse pointer).

OBSERVED RESULT
External display is not detected

EXPECTED RESULT
External display is detected

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro Linux
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
libkscreen Version: 5.26.2-1
Nvidia Driver Version: 520.56.06

ADDITIONAL INFORMATION
Comment 1 Oleksii Zolotarevskyi 2022-11-09 23:33:44 UTC
Created attachment 153637 [details]
Output of the command "grep -Ei "NVIDIA|modeset" /var/log/Xorg.0.log"

Xorg log file
Comment 2 Oleksii Zolotarevskyi 2022-11-09 23:39:15 UTC
Created attachment 153638 [details]
Video demonstration of the issue
Comment 3 Oleksii Zolotarevskyi 2022-11-09 23:43:15 UTC
Removing the folder "~/.local/share/kscreen" doesn't solve the issue.
Comment 4 Nate Graham 2022-11-10 17:19:12 UTC

*** This bug has been marked as a duplicate of bug 460341 ***