You are not logged in.

#1 2014-06-27 13:16:12

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

[SOLVED] Pulse audio setup, mpd sound while loginmanager

My PA is broken I guess. When I reboot is see:

$ ps aux | grep pulse
manuel     355  0.0  0.1 443400 14028 ?        Sl   14:54   0:00 /usr/bin/pulseaudio --start --log-target=syslog
manuel    2964  0.0  0.0  10732  2212 pts/1    S+   14:57   0:00 grep --color=auto pulse

Hmm okay pulse runs. At least it seems to be running. But opening pavucontrol I get exactly this error:

error
(From http://askubuntu.com/questions/70560/wh … led-error)

Other indicators:

$ pacmd
Es läuft kein PulseAudio-Dienst oder nicht als Sessiondienst.
$ pactl set-sink-volume 0 50
Verbindungsfehler: Verbindung verweigert
pa_context_new() fehlgeschlagen: Verbindung verweigert

Meanig connection refused. Well PA seems not to be working properly. Curiously sound works fine. MPD likes this magic initial setting, which I did not trigger somehow, besides installing PA. As pavucontrol suggests, I tried to run PA manually. I tried "runstart-pulseaudio-kde" and "start-pulseaudio-x11" after killing PA. Well all the stuff above is working now. Fine but playing music (soundcloud) just freezed my pc (had to poweroff) after it played a few minutes with a quarte second lags every 30 s. And I just used Soundcloud because MPD refused to work. hmm At least the logfile states pretty cleary:

Jun 27 15:13 : pulse_output: Failed to open "My Pulse Output" [pulse]: pa_context_connect() has failed: Connection refused
Jun 27 15:13 : output: Failed to open audio output

Arrgh.. What? MPD as "manuel" (me/my account) may this be a problem?

Any hints?



-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Last edited by manuelschneid3r (2014-07-11 23:05:24)


Please feel free to correct my english.

Offline

#2 2014-06-27 15:03:15

ilusi0n
Member
Registered: 2010-06-09
Posts: 187

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

I had the same problem when mpd started. Not sure, but I think I solved it this way.

In /etc/pulse/default.pa add this or uncomment (must be there somewhere on that file)

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

I think the same could be done with an application called paprefs going to the network tab and marking something called 'Don't require authentication''

Last edited by ilusi0n (2014-06-27 15:03:53)

Offline

#3 2014-06-27 19:57:58

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2014-07-03 10:11:41

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

Well I quit with pulse audio. The reason is, that PA is concipated as a session daemon (somewhat unlike alsa). The problem above is, that mpd, which was started at boot, started a pulse daemon. If I log in I cant access the PA daemon. I guess this has something to do with UID stuff.

Well generally I abandoned the idea to use PA, because I want to be able to listen to music controlled by the MPD client on my phone even if I am not logged in (works in either cases) and to be able to have sound if I log in (works only w/o PA).

Anyway thanks for your help.

Last edited by manuelschneid3r (2014-07-03 10:14:28)


Please feel free to correct my english.

Offline

#5 2014-07-03 21:59:35

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

manuelschneid3r wrote:

Well I quit with pulse audio. The reason is, that PA is concipated as a session daemon (somewhat unlike alsa). The problem above is, that mpd, which was started at boot, started a pulse daemon. If I log in I cant access the PA daemon. I guess this has something to do with UID stuff.

Well generally I abandoned the idea to use PA, because I want to be able to listen to music controlled by the MPD client on my phone even if I am not logged in (works in either cases) and to be able to have sound if I log in (works only w/o PA).

Anyway thanks for your help.

thats perfectly possible. keywords: pulse cookie, ip whitelist


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#6 2014-07-10 08:38:57

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

@Rasi Are you referring to a systemwide dameon setup? If not could you please tell me how you got it to work? I just tried the setup with a cookie in client.conf. As usual mpd starts a daemon at boot. But if I log in there is no sound. The journal tells me

Jul 10 10:35:54 b85i pulseaudio[2189]: [pulseaudio] socket-server.c: bind(): Die Adresse wird bereits verwendet
Jul 10 10:35:54 b85i pulseaudio[2189]: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.
Jul 10 10:35:54 b85i pulseaudio[2189]: [pulseaudio] main.c: Module load failed.
Jul 10 10:35:54 b85i pulseaudio[2189]: [pulseaudio] main.c: Konnte Daemon nicht initialisieren.
Jul 10 10:35:54 b85i pulseaudio[2186]: [pulseaudio] main.c: Start des Daemons fehlgeschlagen.

Meaning adress is in use, could not start damon. But why is it trying to start another one, when there is already one instance of my user? (Meanwhile I switched to Gnome)

Last edited by manuelschneid3r (2014-07-10 08:43:24)


Please feel free to correct my english.

Offline

#7 2014-07-11 10:45:46

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

https://wiki.archlinux.org/index.php/Pu … d_sound.29

you do the same thing as described here. then set a default server in /etc/pulse/client.conf which points to 127.0.0.1
all users that have the cookie file can now play sound.

If the cookie method does not work for you (and it should), use the anonymous network method. the client.conf is the same here
but you dont need a cookie file at all, you simply whitelist 127.0.0.1.

Last edited by Rasi (2014-07-11 10:46:47)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#8 2014-07-11 23:04:31

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

Well I played around a lot and finally everthing but:

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24 

in /etc/pulse/default.pa is at the defaults. Providing a cookie file was not necessary since it defaults to ~/.config/pulse/cookie and my mpd runs as my user. Additionally an extra output in /etc/mpd.conf did it:

audio_output {
	type "pulse"
        name "My (loopback) Pulse Output"
	server  "127.0.0.1"
}

Thanks for the hints. I'm curious why it did not work when I tried ilusi0n's hint. hmm But eventually I beat PA yeah cool [SOLVED]

Last edited by manuelschneid3r (2014-07-12 06:21:50)


Please feel free to correct my english.

Offline

#9 2020-11-17 10:28:29

dajamfr
Member
Registered: 2020-11-17
Posts: 1

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

I did have the same issue and just adding this line in the pulse conf file was not enough : everything was find if I manually load module-native-protocol-tcp, but addinf the line was not working to load the module at startup.
I just add :

.nofail
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
.fail

and now it's solved.

Hope it may help

Offline

#10 2020-11-17 10:33:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,430

Re: [SOLVED] Pulse audio setup, mpd sound while loginmanager

Glad to hear this worked for you as well, however please don't necrobump 6 year old solved topics.

Closing.

Offline

Board footer

Powered by FluxBB