uwsm: `uwsm stop` doesn't restart sddm?

Is uwsm stop supposed to be the command used for user logout? I was starting to adopt uwsm for Hyprland, but I cannot solve the problem that after logout sddm login screen doesn’t appear. Here’s my setup,

/usr/share/wayland-sessions/uwsm.desktop:

[Desktop Entry]
Name=Hyprland (UWSM)
Exec=uwsm start -- hyprland.desktop
Type=Application

hyprland.conf:

bind = $mainMod ALT SHIFT, E, exec, uwsm stop

With uwsm stop, I can see the following journal entries in jounrnalctl:

Feb 07 14:34:59 sddm[1750]: Auth: sddm-helper exited with 1
Feb 07 14:34:59 systemd[1]: session-2.scope: Deactivated successfully.
Feb 07 14:34:59 systemd-logind[1420]: Session 2 logged out. Waiting for processes to exit.
Feb 07 14:34:59 systemd-logind[1420]: Removed session 2.

While with hyprland native exit, I can see the following two extra journal entries (along with the other sddm entries leading to restart):

Feb 07 14:51:55 sddm-helper[2336]: Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
                                   Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
                                   If this causes problems, reconfigure your locale. See the locale(1) manual
                                   for more information.
Feb 07 14:51:55 sddm-helper[2336]: pam_unix(sddm-greeter:session): session opened for user sddm(uid=985) by (uid=0)

I wonder if I’m using uwsm stop for its intended purpose? If not, what is the correct command to achieve user logout?

I was totally wrong in my initial writing. Hyprland seems to cause coredump regardless of stopping method, the difference is that native exit will triger sddm login screen but uwsm stop won’t.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 18 (7 by maintainers)

Most upvoted comments

It seems I have similar problem with SDDM on Fedora. When I execute uwsm stop, I end up with a black screen with blinking cursor.

In my case logs look weird.

Feb 16 13:48:40 fedora session.sh[33371]: Terminated
Feb 16 13:48:43 fedora wpa_supplicant[1415]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-30 noise=9999 txrate=585000
Feb 16 13:48:45 fedora systemd[1]: pcscd.service: Deactivated successfully.
Feb 16 13:48:45 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=pcscd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 16 13:48:46 fedora wpa_supplicant[1415]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-30 noise=9999 txrate=585000
Feb 16 13:48:49 fedora wpa_supplicant[1415]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-30 noise=9999 txrate=585000
Feb 16 13:48:51 fedora systemd[31838]: wayland-wm@start\x2dsway.service: State 'final-sigterm' timed out. Aborting.
Feb 16 13:48:51 fedora audit[33371]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=32 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=33371 comm="session.sh" exe="/usr/bin/bash" sig=6 res=1
Feb 16 13:48:51 fedora audit[33582]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=32 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=33582 comm="systemctl" exe="/usr/bin/systemctl" sig=6 res=1
Feb 16 13:48:51 fedora systemd[31838]: wayland-wm@start\x2dsway.service: Killing process 33371 (session.sh) with signal SIGABRT.
Feb 16 13:48:51 fedora systemd[31838]: wayland-wm@start\x2dsway.service: Killing process 33582 (systemctl) with signal SIGABRT.
Feb 16 13:48:51 fedora systemd-coredump[33586]: Process 33371 (session.sh) of user 1000 terminated abnormally with signal 6/ABRT, processing...
Feb 16 13:48:51 fedora systemd-coredump[33587]: Process 33582 (systemctl) of user 1000 terminated abnormally with signal 6/ABRT, processing...
Feb 16 13:48:51 fedora audit: BPF prog-id=484 op=LOAD
Feb 16 13:48:51 fedora audit: BPF prog-id=485 op=LOAD
Feb 16 13:48:51 fedora audit: BPF prog-id=486 op=LOAD
Feb 16 13:48:51 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@8-33586-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 16 13:48:51 fedora systemd[1]: Started systemd-coredump@8-33586-0.service - Process Core Dump (PID 33586/UID 0).
Feb 16 13:48:51 fedora audit: BPF prog-id=487 op=LOAD
Feb 16 13:48:51 fedora audit: BPF prog-id=488 op=LOAD
Feb 16 13:48:51 fedora audit: BPF prog-id=489 op=LOAD
Feb 16 13:48:51 fedora systemd[1]: Started systemd-coredump@9-33587-0.service - Process Core Dump (PID 33587/UID 0).

There are two core dumps from session.sh and systemctl, then

Feb 16 13:48:51 fedora systemd[31838]: wayland-wm@start\x2dsway.service: Failed with result 'timeout'.
Feb 16 13:48:51 fedora audit[33220]: USER_END pid=33220 uid=0 auid=1000 ses=37 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_selinux,pam_loginuid,pam_selinux,pam_keyinit,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_umask,pam_lastlog acct="gleb" exe="/usr/libexec/sddm-helper" hostname=fedora addr=? terminal=/dev/tty3 res=success'
Feb 16 13:48:51 fedora audit[33220]: CRED_DISP pid=33220 uid=0 auid=1000 ses=37 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_localuser,pam_unix acct="gleb" exe="/usr/libexec/sddm-helper" hostname=fedora addr=? terminal=/dev/tty3 res=success'
Feb 16 13:48:51 fedora systemd[1]: systemd-coredump@8-33586-0.service: Deactivated successfully.
Feb 16 13:48:51 fedora sddm-helper[33220]: pam_unix(sddm:session): session closed for user gleb
Feb 16 13:48:51 fedora systemd[31838]: Stopped wayland-wm@start\x2dsway.service - Main service for sway.
Feb 16 13:48:51 fedora systemd[31838]: wayland-wm@start\x2dsway.service: Triggering OnFailure= dependencies.
Feb 16 13:48:51 fedora systemd[31838]: wayland-wm@start\x2dsway.service: Consumed 691ms CPU time, 139.5M memory peak.
Feb 16 13:48:51 fedora systemd[31838]: Stopped target graphical-session-pre.target - Session services which should run early before the graphical session is brought up.
Feb 16 13:48:51 fedora systemd[31838]: Reached target sway-session-shutdown.target - Shutdown running Sway session.
Feb 16 13:48:51 fedora systemd[31838]: Stopped target wayland-session-pre@start\x2dsway.target - Preparation for session of start-sway Wayland compositor.
Feb 16 13:48:51 fedora systemd[31838]: Stopping wayland-session-bindpid@33233.service - Bind graphical session to PID 33233...
Feb 16 13:48:51 fedora systemd[31838]: Stopping wayland-wm-env@start\x2dsway.service - Environment preloader for sway...
Feb 16 13:48:51 fedora systemd[31838]: Stopped wayland-session-bindpid@33233.service - Bind graphical session to PID 33233.
Feb 16 13:48:51 fedora systemd[31838]: wayland-session-bindpid@33233.service: Triggering OnSuccess= dependencies.
Feb 16 13:48:51 fedora systemd[31838]: Stopped target sway-session-shutdown.target - Shutdown running Sway session.
Feb 16 13:48:51 fedora systemd[1]: session-37.scope: Deactivated successfully.
Feb 16 13:48:51 fedora sddm[33130]: Auth: sddm-helper exited with 1
Feb 16 13:48:51 fedora systemd-logind[1166]: Session 37 logged out. Waiting for processes to exit.
Feb 16 13:48:51 fedora systemd-logind[1166]: Removed session 37.

Versions:

  • sway: sway version 1.10.1
  • system: fedora 6.12.11-200.fc41.x86_64
  • sddm: 0.21.0

It seems the reason was found

Can confirm I’m having the same issue. Hyprland always coredumps, but unlike @glebzlat to my knowledge, I don’t have sway-systemd so I can’t think of what else could be interfering with UWSM specifically. Not much else to add, my logs look pretty similar to the ones above.

I found the package and the line that causes this behavior. The package is sway-systemd. It provides script session.sh that is responsible for environment preparation and cleanup, and this line:

    systemctl --user start --job-mode=replace-irreversibly "$SESSION_SHUTDOWN_TARGET"

in session_cleanup function blocks. It looks like UWSM and sway-systemd interfere with each other.