You are not logged in.
# loginctl show-user dext | grep Linger
Linger=yes
When dext in logged over ssh:
# loginctl
SESSION UID USER SEAT TTY STATE IDLE SINCE
20 0 root - pts/0 closing no -
21524 1000 dext - pts/0 closing no -
21527 0 root - pts/0 active no -
21574 1000 dext - pts/1 active no -
When dext is not logged anywhere:
# loginctl
SESSION UID USER SEAT TTY STATE IDLE SINCE
20 0 root - pts/0 closing no -
21524 1000 dext - pts/0 closing no -
21527 0 root - pts/0 active no -
My issue is I'm running a headless sound server, and currently dext has to keep a ssh session open for everything to work.
Offline
This is how I start Pipewire:
dext@vaduz ~ % systemctl --user restart pipewire.service
status user@1000.service (yes, dext is 1000)
# systemctl status user@1000.service | grep "" :(
● user@1000.service - User Manager for UID 1000
Loaded: loaded (/usr/lib/systemd/system/user@.service; static)
Drop-In: /usr/lib/systemd/system/user@.service.d
└─10-login-barrier.conf
Active: active (running) since Tue 2024-04-23 11:14:12 CEST; 2 weeks 1 day ago
Docs: man:user@.service(5)
Main PID: 619 (systemd)
Status: "Ready."
[...]
Nothing worth noting changes after dext logs in and out over ssh:
# systemctl status user@1000.service > /tmp/dext_out.log
# systemctl status user@1000.service > /tmp/dext_in.log
# diff /tmp/dext_in.log /tmp/dext_out.log
10,11c10,11
< Memory: 111.8M (peak: 206.5M)
< CPU: 18h 30min 8.078s
---
> Memory: 111.6M (peak: 206.5M)
> CPU: 18h 30min 9.943s
One extra thing I found out while observing bluetooth.service.
Phone is connected to the server over bluetooth, everything works. Then dext logs out, here's what shows up in bluetooth.service:
May 09 10:33:25 vaduz bluetoothd[532]: Endpoint unregistered: sender=:1.139 path=/MediaEndpoint/A2DPSource/(many different types)
Pipewire works fine all the time - I use it over ROC and S/PDIF. Only Bluetooth has this issue. And it worked for years without problems on Pulseaudio now Pipewire. The problem showed up 3-4 month ago after system upgrade.
Offline
From what I can tell, your systemd user instance starts correctly, so lingering should work.
I'm afraid I'm not too familiar with Pipewire nor Bluetooth, so I'm afraid I'm of limited help here. I hope someone else stumbles over this for further help.
Offline
Please post
loginctl list-users
ls -la /var/lib/systemd/linger
And you could try
systemctl --user reenable pipewire.service
systemctl --user is-enabled pipewire.service
So that pipewire is run automatically and not depending on user login.
Offline
# loginctl list-users
UID USER LINGER STATE
0 root no active
1000 dext yes closing
# ls -la /var/lib/systemd/linger
total 8
drwxr-xr-x 2 root root 4096 May 8 10:21 ./
drwxr-xr-x 10 root root 4096 Sep 10 2023 ../
-rw-r--r-- 1 root root 0 May 8 10:21 dext
Pipewire was enabled and it works, I use it all the time over ROC and SPDIF, only Bluetooth is the problem.
What's interesting, after I ssh to root, then:
# su - dext
% systemctl --user is-enabled pipewire.service
Failed to connect to bus: No medium found
I have to have direct ssh session to dext user, it can't be ssh to root then su to dext.
Offline