uwsm: Bluetoothctl or Pipewire causing a logout/crash

First of all thanks for the work on #42 just updated to 0.20.1-1 and added a few silencers and already half of my setup’s functionality is restored.

Now to the actual issue.

I am running uwsm start -S -N Hyprland -D Hyprland -C compositor -- Hyprland for my session (either from a TTY or SDDM - both have the same issue so not relevant here). I don’t really understand what -S flag actually does, but documentation sounded like the more desired option is to have it in a slice.

what I’ve noticed is that whenever I use bluetoothctl my terminal stars behaving like the enter key is stuck pressed and my windows start terminating until I am left with a blank TTY with a few @^@^ symbols. I haven’t figured out how to make logout return me back to SDDM when I start from it so this might be a similar process here, or it might be a crash of sorts. I would like to focus on the bluetoothctl issue.

Now, I don’t know if bluetoothctl is the culprit here, because I primarily use it block|unblock|connect my bluetooth headset and pipewire switches my audio sink when this happens. If it’s bluetoothctl, then I suspect it’s because of it rapidly outputting few lines to stdout and maybe that is just too frequent for systemd to handle. Or maybe the issue is deeper and switching sinks or something else in this chain is causing uwsm to effectively crash for me. The only reason I would think that, is because I was inspecting journalctl log the other day and it just looked like system just started logging out normally, the apps were stopping and waiting for each other and all that good jazz. And the only thing that stood out was this line.

wireplumber[25876]: spa.bluez5.midi: org.bluez.GattManager1.RegisterApplication() failed: GDBus.Error:org.bluez.Error.AlreadyExists: Already Exists

I haven’t found anything else relevant to the issue on my own, so if this is not reproducible by the devs, please let me know what info I can provide to identify how I can fix this.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 24 (12 by maintainers)

Commits related to this issue

Most upvoted comments

  1. systemctl [--user] status
  2. Easiest way: just uwsm app ... everything long-running (or problematic) from compositor’s exec (or thy this, may be faster and has fuzzel integration, or use systemd-run directly). Use -u static-name.service for things that are unique in the session. Alternatively, place stuff in proper persistent user units and rely on autostart (see example-units dir).

TTY or SDDM: See this. everything else: see p.2 above.

Anyway, I’m closing this as wontfix. Type=notify is the only way uwsm finalize would work, and NotifyAccess property is not editable on the fly, so there is no way to limit access after “ready” notification is received.

General rule of thumb: it’s better to not run stuff inside compositor’s unit. Mine is pretty clean:

 ├─wayland-wm@hyprland.desktop.service
 │ ├─95491 Hyprland
 │ ├─95524 /bin/sh -c "Xwayland :0 -rootless -core -listenfd 333 -listenfd 334 -displayfd 370 -wm 367"
 │ └─95526 Xwayland :0 -rootless -core -listenfd 333 -listenfd 334 -displayfd 370 -wm 367

As for bluetoothctl behavior, see https://github.com/bluez/bluez/issues/996

You can’t crash uwsm, because it isn’t running, it just sets things up and makes systemd do useful stuff. See journal around the time of the crash to find out what exactly crashes, deactivates, and brings everything down.

Since it is somehow related to silencing output, it might be some content bluetoothctl or related processes produce that affects systemd/journal or Hyprland.

Just for fun, try this in shell: bluetoothctl devices > /tmp/btout 2>&1 and then systemd-cat < /tmp/btout. If putting this content into journal breaks things, that would be crazy. If not, try running cat /tmp/btout via Hyprland’s bind. If this produces crash, this means putting this content through Hyprland’s buffer causes problems.