You are not logged in.

#1 2017-04-18 17:37:33

Fred7109
Member
Registered: 2015-05-17
Posts: 134

[Solved] Pacmd only working the first couple of minutes after boot

Hello,

I have a problem with pacmd, it only works the first couple of minutes when I boot my computer. I have tried the following:
- I have turned off autospawn in pulseaudio, this enables me to manually start it, however, pacmd only works at boot, not when I  start it manually.
- I have tried to manually start pulseaudio after boot, however, that doesn't work either.
- I have tried to see which application that may cause this, but I start Spotify and Firefox at boot, and even with them disabled it seems random when pacmd chooses not to work.

To get at better understanding of what happens when I say that pacmd isn't working, I get the following error:

No PulseAudio daemon running, or not running as session daemon.

In addition, I have tried running pulseaudio as a system-wide instance. I have used many hours on this and I really cannot get it to work.

Any help will be really appreciated, as I'm nearly giving up, because when I look online it seems that everyone have different solutions.

Last edited by Fred7109 (2017-04-20 21:51:31)

Offline

#2 2017-04-19 14:56:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved] Pacmd only working the first couple of minutes after boot

Does the process die? What are the outputs of

hostnamectl status
sudo fuser -v /dev/snd/*
ps aux | grep pulseaudio
pulseaudio -vvvv

when it doesn't work? Don't try to run as a system instance, it is for very specific usecases and not for general purpose use

Last edited by V1del (2017-04-19 14:58:27)

Offline

#3 2017-04-20 21:50:50

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved] Pacmd only working the first couple of minutes after boot

Hello V1del, because of the different outputs you suggested I pinpointed the problem. Thank you big_smile

I found that when starting pulseaudio with systemd in the start, it all worked, however, to keep pacmd working, I had to start pulseaudio manually also, and not with the command

pulseaudio --start

but with the command

pulseaudio

So without the "--start" behind. I don't know what the differnece is behind these two command really, as I thought they did the same, but without "--start" did the trick and it all works again.

Last edited by Fred7109 (2017-04-20 21:51:06)

Offline

#4 2017-04-21 10:26:49

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: [Solved] Pacmd only working the first couple of minutes after boot

From the man page:

       --start
              Start  PulseAudio  if it is not running yet. This is different from
              starting PulseAudio without --start  which  would  fail  if  PA  is
              already  running.  PulseAudio is guaranteed to be fully initialized
              when this call returns. Implies --daemonize.

This would seem to indicate that '--start' does not indicate whether pulseaudio is already running and daemonizes the process.

I don't know how that ties into your problem, but they are clearly different.


I laugh, yet the joke is on me

Offline

#5 2017-04-21 10:32:04

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [Solved] Pacmd only working the first couple of minutes after boot

Fred7109 wrote:

I found that when starting pulseaudio with systemd in the start, it all worked, however, to keep pacmd working...

Why don't you check with:

systemctl --user status pulseaudio

when it stopped working, instead of blindly starting pulse again manually?

Offline

#6 2017-04-21 15:23:44

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved] Pacmd only working the first couple of minutes after boot

Hello the sad clown and tom.ty89

Thank you for replying to my thread regarding this problem.

First, the sad clown I know the one with "--start" daemonize the proces, but I just didn't think that it would change how the program runs. However, thank you for pointing this out, as I think it's good to know in the future when running into problems.

I've tried what you, tom.ty89, said in the beginning when looking for a solution, however, this command also give me problems:

$ systemctl --user status pulseaudio
Failed to connect to bus: No such file or directory

So I thought that I would rather try to solve the problem with pulseaudio first and then afterwards try to solve this problem with systemctl, as I'm doing right now actually.

Last edited by Fred7109 (2017-04-21 15:30:34)

Offline

Board footer

Powered by FluxBB