Bug 479359 - sddm-helper-start-wayland fails/exits after manually turn on monitors
Summary: sddm-helper-start-wayland fails/exits after manually turn on monitors
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.91.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-01-03 15:17 UTC by Jean-Francois Roy
Modified: 2024-09-24 09:25 UTC (History)
6 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 Jean-Francois Roy 2024-01-03 15:17:22 UTC
# Summary

I turned off my 2 monitors overnight with the computer at SDDM waiting for login and turned them back on in the morning. This led to `sddm-helper-start-wayland` to fail and SDDM to exit, leaving me with a broken/empty TTY.

Logs:

```
Jan 03 06:53:58 wave5 sddm-helper-start-wayland[44348]: "kwin_core: Parse error in tiles configuration for monitor \"92e842d7-5928-5c43-884a-4912e7cc82ed\" : \"illegal value\" Creating default setup\n"
Jan 03 06:53:58 wave5 sddm-greeter[44353]: Creating a fake screen in order for Qt not to crash
Jan 03 06:53:58 wave5 sddm-greeter[44353]: Loading file:///usr/share/sddm/themes/breeze/Main.qml...
Jan 03 06:53:58 wave5 sddm-greeter[44353]: Failed to find a Kirigami platform plugin
Jan 03 06:53:58 wave5 sddm-greeter[44353]: Adding view for "" QRect(0,0 0x0)
Jan 03 06:53:59 wave5 sddm-helper-start-wayland[44348]: "kwin_core: Could not find any suitable output for a layer surface\n"
Jan 03 06:53:59 wave5 sddm-helper-start-wayland[44348]: wayland greeter finished 0 QProcess::NormalExit
Jan 03 06:53:59 wave5 sddm-helper-start-wayland[44348]: quitting helper-start-wayland
Jan 03 06:53:59 wave5 sddm-helper-start-wayland[44348]: Stopping... "kwin_wayland"
Jan 03 06:53:59 wave5 sddm-helper-start-wayland[44348]: "QtDBus: cannot relay signals from parent QObject(0x55ad50323b20 \"\") unless they are emitted in the object's thread QThread(0x55ad50183238 \"libinput-connection\"). Current thread is QThread(0x55ad501328f0 \"\").\n"
Jan 03 06:53:59 wave5 xdg-desktop-por[44492]: Error reading events from display: Broken pipe
Jan 03 06:53:59 wave5 systemd[44295]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jan 03 06:53:59 wave5 systemd[44295]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jan 03 06:53:59 wave5 sddm-helper-start-wayland[44348]: wayland compositor finished 15 QProcess::NormalExit
Jan 03 06:53:59 wave5 sddm-helper-start-wayland[44348]: quitting helper-start-wayland
Jan 03 06:53:59 wave5 sddm-helper[44279]: [PAM] Closing session
Jan 03 06:53:59 wave5 sddm-helper[44279]: pam_unix(sddm-greeter:session): session closed for user sddm
Jan 03 06:53:59 wave5 sddm-helper[44279]: [PAM] Ended.
Jan 03 06:53:59 wave5 sddm[1193]: Auth: sddm-helper exited successfully
Jan 03 06:53:59 wave5 systemd-logind[1050]: Session c6 logged out. Waiting for processes to exit.
Jan 03 06:53:59 wave5 sddm[1193]: Greeter stopped. SDDM::Auth::HELPER_SUCCESS
Jan 03 06:53:59 wave5 systemd[1]: session-c6.scope: Deactivated successfully.
```

I had to open a console session in another TTY and restart `sddm.service`.

# Configuration

/etc/sddm.conf.d/10-wayland.conf 
```
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1
```

/etc/sddm.conf.d/kde_settings.conf
``` 
[Autologin]
Relogin=false
Session=
User=

[General]
HaltCommand=/usr/bin/systemctl poweroff
RebootCommand=/usr/bin/systemctl reboot

[Theme]
Current=breeze
CursorSize=
CursorTheme=breeze_cursors
Font=Noto Sans,10,-1,0,400,0,0,0,0,0,0,0,0,0,0,1

[Users]
MaximumUid=60513
MinimumUid=1000
```

# System info

Arch Linux
Linux: 6.6.9-arch1-1
Nvidia: 545.29.06 (open dkms)
sddm: 0.20.0-3

Running KDE Plasma 6.0 Beta 2 from Arch kde-unstable.

See also https://github.com/sddm/sddm/issues/1847
Comment 1 Martin 2024-03-10 00:47:31 UTC
Likely has the same root cause as https://bugs.kde.org/show_bug.cgi?id=482399
Comment 2 Ten0 2024-09-15 14:07:25 UTC
> Likely has the same root cause as https://bugs.kde.org/show_bug.cgi?id=482399

Probably not: I'm on an up to date Fedora 40 which has plasma 6.1.4, and while the linked issue has somebody confirming that they don't have the issue anymore on plasma 6.0.2, I still have it when coming out of suspend, where my screen turns off until manually turned back on:

```
sept. 15 14:53:52 fedoraa audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
sept. 15 14:53:52 fedoraa sddm-greeter-qt6[1918]: Creating a fake screen in order for Qt not to crash
sept. 15 14:53:52 fedoraa sddm-helper-start-wayland[1909]: "qt.qpa.wayland: Creating a fake screen in order for Qt not to crash\n"
sept. 15 14:53:52 fedoraa sddm-greeter-qt6[1918]: Loading file:///usr/share/sddm/themes/01-breeze-fedora/Main.qml...
sept. 15 14:53:52 fedoraa sddm-helper-start-wayland[1909]: "kwin_core: Could not find any suitable output for a layer surface\n"
sept. 15 14:53:52 fedoraa sddm-helper-start-wayland[1909]: Stopping... "kwin_wayland"
sept. 15 14:53:52 fedoraa sddm-helper[1887]: pam_unix(sddm-greeter:session): session closed for user sddm
sept. 15 14:53:52 fedoraa audit[1887]: USER_END pid=1887 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_unix,pam_systemd acct="sddm" exe="/usr/libexec/sddm-helper" hostname=fedoraa addr=? terminal=/dev/tty1 res=success'
sept. 15 14:53:52 fedoraa audit[1887]: CRED_DISP pid=1887 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_permit acct="sddm" exe="/usr/libexec/sddm-helper" hostname=fedoraa addr=? terminal=/dev/tty1 res=success'
sept. 15 14:53:52 fedoraa systemd[1]: session-c1.scope: Deactivated successfully.
sept. 15 14:53:52 fedoraa systemd[1]: session-c1.scope: Consumed 2.401s CPU time.
sept. 15 14:53:52 fedoraa systemd-logind[1600]: Session c1 logged out. Waiting for processes to exit.
sept. 15 14:53:52 fedoraa systemd-logind[1600]: Removed session c1.
```

I need to find an unused tty and `systemctl restart display-manager` to get the GUI working again.
Comment 3 David Edmundson 2024-09-24 09:25:28 UTC
https://github.com/sddm/sddm/pull/1989 

Lets follow this upstream