On Lu, 17 mai 21, 08:16:39, Greg Wooledge wrote: > On Mon, May 17, 2021 at 07:45:34AM -0400, Bob Bernstein wrote: > > I can take a hint. It seems to me I have to place the statement > > > > pulseaudio --daemonize > > > > in some user file or other but nowhere can I find in that doc (coulda missed > > it; I'm an old guy) a suggestion as to what file to use. I'm thinking what's > > wrong with just putting that into my .xsession file? > > I assumed this at first, too. It seems right, doesn't it? Sure. > > But it doesn't work. Pulseaudio is supposed to start *itself* automatically > upon demand. It's supposed to "just work", and you're not supposed to > have to do anything to make it work. > > When I tried putting a pulseaudio start-up command in my .xsession file, > I had problems. Every single time -- and I mean 100% of the time, literally > *every* single time -- that I started an X session, I was left with a > nonresponsive pulseaudio daemon. But if I stopped and restarted the > pulseaudio daemon, then it would work fine. > > So, every time I started X, I had to manually stop pulseaudio, and > then manually restart it. > > Eventually I figured out that the solution was *not* to start pulseaudio > myself. Just let it autostart itself on demand. > > For some reason, this works, but starting it myself does not work. > > I have no idea why. But there you go. That's the answer, apparently. As far as I can tell pulseaudio ships with .socket user unit that is activated by default, so your "manually" started pulseaudio instance might conflict with that.
This should be easy to test with systemctl --user stop pulseaudio.socket pulseaudio --daemonize If that works and you prefer it you can just 'mask' the .socket unit to prevent it from starting[1]. On the other hand you might achieve the desired outcome simply be enabling the pulseaudio.service unit as it shouldn't conflict with the the .socket unit. systemctl --user enable --now pulseaudio.service [1] because it's shipped enabled at system level a simple 'disable' won't work. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
signature.asc
Description: PGP signature