You are not logged in.

#1 2020-01-29 01:43:05

dext
Member
From: Poland, Kraków
Registered: 2008-02-01
Posts: 72

Pulseaudio stops after logout [solved]

I have Pulseaudio server running as one of the users. The problem is, Pulseaudio stops right after this user logs off the server. I've even tried to run it on tmux. After all ssh sessions to the server end, Pulseaudio stops with a message "Daemon terminated."

Pulseaudio's parent pid is 1. I literally have no clue whats going on, could someone please help?

Last edited by dext (2020-01-29 20:56:39)


English is not my first language, so please forgive me for my mistakes.

Offline

#2 2020-01-29 13:06:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,670

Re: Pulseaudio stops after logout [solved]

Yes, as expected. What do you want to do, what is your use case?  There are two methods off the top of my head, both are quite discouraged, so why and for what reason do you want pulse to keep running when you terminate your session?

FWIW the lesser of the two evils is: https://wiki.archlinux.org/index.php/Sy … _instances

Last edited by V1del (2020-01-29 13:08:19)

Offline

#3 2020-01-29 16:58:10

dext
Member
From: Poland, Kraków
Registered: 2008-02-01
Posts: 72

Re: Pulseaudio stops after logout [solved]

So I literally use Pulseaudio as a sever, on a headless server box, and all my devices connect to it using Pulseaudio protocol (WiFi/ethernet), or Bluetooth. I run it in normal user mode, because "system-wide" is discourage and not maintained.

Looks like "loginctl enable-linger username" worked, thank you very much! What's the other method you had in mind?

I'd like to know exactly how everything in my system works, but I had no idea "loginctl" even existed. Could you please please recommend me some reading? https://wiki.archlinux.org/index.php/Systemd is good enough?


English is not my first language, so please forgive me for my mistakes.

Offline

#4 2020-01-29 18:47:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,670

Re: Pulseaudio stops after logout [solved]

The other method was the system wide mode, which is indeed discouraged and not maintained, which I only would've suggested as an absolute last measure.

As for additional reading that page is definitely good as well as the entirety of the page I linked for information on the difference of user session services (the reason this works, is that modern pulseaudio is invoked as an user service as part of the user session) vs system services, the man pages are usually quite useful as well .

man loginctl
man systemd-logind.service
man systemd

If your satisfied with the solution don't forget to mark as [SOLVED] by editing the title in your first post.

Last edited by V1del (2020-01-29 18:50:14)

Offline

#5 2020-01-29 20:58:26

dext
Member
From: Poland, Kraków
Registered: 2008-02-01
Posts: 72

Re: Pulseaudio stops after logout [solved]

Thanks, I'll read about all of it. What surprised me the most, is that a session left in tmux didn't solve it.


English is not my first language, so please forgive me for my mistakes.

Offline

#6 2020-01-29 21:39:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,670

Re: Pulseaudio stops after logout [solved]

well did you explicitly start pulseaudio in that tmux? If you still implicitly relied on the user service, that will be distinct from your tmux session.

Offline

#7 2020-02-18 10:59:03

dext
Member
From: Poland, Kraków
Registered: 2008-02-01
Posts: 72

Re: Pulseaudio stops after logout [solved]

One other thing has to be done, in /etc/pulse/daemon.conf

exit-idle-time = -1

Without this Pulse would stop anyway after exactly 2 hours.


English is not my first language, so please forgive me for my mistakes.

Offline

Board footer

Powered by FluxBB