Bug 464798 - Second monitor is always black on startup. Have to lock the screen to SDDM to have a chance at fixing it
Summary: Second monitor is always black on startup. Have to lock the screen to SDDM to...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 5.26.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-25 14:18 UTC by Carlo
Modified: 2023-04-05 19:53 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlo 2023-01-25 14:18:28 UTC
SUMMARY
When booting in wayland session (X11 not tested), the secondary monitor is always black. The mouse cursor goes through the primary display, but it is not viewed in the second as if the display was not connected. In monitor settings the display is detected and enabled.
I always have to lock the session. SDDM, then, turns on the secondary display and I can finally use it in KDE Plasma as well.

I hoped bug 450068 fixed it, but it apparently didn't. I'm on kde-testing on Arch Linux.

Some of the noticed settings upon booting:
   in .config/plasmashellr:
      [ScreenConnectors]
      0=HDMI-A-4
      2=Virtual-Virtual1
   
   in .config/plasma-org.kde.plasma.desktop-appletsrc
      a new plugin=org.kde.plasma.folder with lastScreen=2 is created. lastScreen=1 components are still present.

   in .config/kcminputrc
      there is nothing pertinent to monitors

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Arch Linux (Wayland session)
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
GPU: AMD R9 380
Monitors:
1. Samsung LC24RG50
2. Samsung S24B150
Comment 1 Carlo 2023-01-25 14:37:34 UTC
Oh: sometimes neither of the two displays turn on after the usual kernel infos are displayed. It's as if they are turned off right when Plasma is started.

It's a roulette every time I turn my desktop pc on. In this cases I have to forcibly power-off my pc and restart it, since i can't go to tty (ALT+CTRL+F<N> does nothing)
Comment 2 Nate Graham 2023-01-25 17:55:39 UTC
Do you by any chance have KScreen disabled?
Comment 3 Carlo 2023-01-25 18:16:08 UTC
KScreen 2 service is enabled in Plasma settings(In reply to Nate Graham from comment #2)
> Do you by any chance have KScreen disabled?

KScreen 2 service is enabled in Plasma settings
Comment 4 Nate Graham 2023-01-25 18:23:02 UTC
Thanks.
Comment 5 Carlo 2023-03-26 19:02:03 UTC
The issue appears to not occur with a different display server (from from SDDM).
Might be worth waiting for SDDM 0.20 release and see if the port to Wayland fixes the issue
Comment 6 Nate Graham 2023-03-28 17:19:18 UTC
Can you clarify what you mean? What change did you make to cause the issue to go away?
Comment 7 Carlo 2023-03-28 17:30:38 UTC
I installed and set lightDM as my display manager instead of SDDM.

Not even the git version of SDDM (0.20.alpha?) fixed the issue. Only disabling SDDM solved it for me.
Comment 8 Nate Graham 2023-03-29 15:13:25 UTC
Wow, that's really weird. If using a different display manager fixes it, that suggests the bug is in SDDM itself. I would recommend submitting a bug report at https://github.com/sddm/sddm/issues.
Comment 9 Carlo 2023-03-29 17:58:50 UTC
done: https://github.com/sddm/sddm/issues/1696
Comment 10 Carlo 2023-04-05 19:53:51 UTC
update: enabling Wayland on SDDM in the alpha version seems to be another valid fix.

In /etc/sddm.conf.d/kde_settings.conf I set:
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --no-lockscreen --inputmethod qtvirtualkeyboard