Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]: PulseAudio Connect Fails - jack migration
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Sun Nov 19, 2017 8:04 pm    Post subject: [solved]: PulseAudio Connect Fails - jack migration Reply with quote

I am migrating my system from jack to pulse and it is not going smoothly, who would have thought!

I cannot seem to get a connection to the server.

Here is the output when I try to run pulseaudio:

Code:
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" (argument: "device=hw:0,0"): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.


Any idea how to move forward with this?
_________________
...and it should be known by now


Last edited by phobos13013 on Sat Nov 25, 2017 7:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Mon Nov 20, 2017 12:54 am    Post subject: Reply with quote

Do you have USE=dbus, and if so, is system dbus running?
I assume you have an openrc system and may not have dbus added unless you're also using something else that uses dbus like consolekit?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Tue Nov 21, 2017 2:28 am    Post subject: Reply with quote

So, I do have dbus in make.conf as well as consolekit, but dbus is not installed nonetheless!

I do use openrc so maybe why its not pulled in, but why is pulseaudio itself not enough to pull in dbus with make.conf listed as dbus?!

I install dbus, add to runtime, reboot, but to no avail.
_________________
...and it should be known by now


Last edited by phobos13013 on Tue Nov 21, 2017 2:49 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Tue Nov 21, 2017 2:38 am    Post subject: Reply with quote

At least it's installed now, but is dbus running?

Pulseaudio is run as needed... but the dbus system service needs to be started.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Tue Nov 21, 2017 2:52 am    Post subject: Reply with quote

So I added dbus to runtime, its active AFAIK. When I run pulseaudio now, just the latter part about alsa-sink and the failed module is my response.

Is this saying my kernel settings are wrong/absent?
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Tue Nov 21, 2017 2:55 am    Post subject: Reply with quote

Okay, now it looks like it's having trouble with the alsa backend, did you have your kernel working with alsa before mucking with pulseaudio (if so, now that would be weird...) or is this a new kernel?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Tue Nov 21, 2017 2:58 am    Post subject: Reply with quote

This is a very old setup, it is a rehash of a rehash, etc. My current predicament arises from having used jack for about the last three years and migrating away because recent qt updates caused breakage of my jack server. So I switched use flags to pulseaudio and have been going about updating and migrating to this new setup. I used pulse prior to jack for a good number of years, but it is a vague memory at this point.
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Tue Nov 21, 2017 4:15 am    Post subject: Reply with quote

Were you using jack with OSS or ALSA? If you were using the OSS backend, you'll need to migrate to the ALSA backend as well, as pulseaudio assumes alsa.

If you haven't done a --newuse merge of @world yet, pulseaudio doesn't play kindly with other software that tries to use the backend directly.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Tue Nov 21, 2017 5:14 am    Post subject: Reply with quote

Apologies for not making it explicit, but I am using alsa, (does anybody still use OSS...?)

I have emerge world even not just newuse, so all up to date there.

I get audio in one program, VLC, but all the rest cannot connect (browser, audio player, games, etc.)
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Tue Nov 21, 2017 6:47 am    Post subject: Reply with quote

I'm not sure what you mean when you 'run' pulseaudio, you shouldn't need to run it explicitly. Is vlc actually using pulseaudio?

One of the most useful apps I found for PA is media-sound/pavucontrol, if you have that you should be able to see all applications using pulseaudio and change behavior of each application.

Do you have other alsa devices like on video or capture cards?

Was anything changed in /etc/pulse/default.pa for some reason?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Tue Nov 21, 2017 5:29 pm    Post subject: Reply with quote

I guess I am a bit confused about it all but when I run pulseaudio in console I get the error described in the initial post. At this point dbus is solved but the module and sink are not connecting.

As for vlc, it appears to just be using alsa so that is why thats the only one that works. I guess the real question is can I just remove pulse completely and just run off alsa? I guess I thought I needed a soundserver to work but can I just remove it completely?

I do have pavucontrol as well and it does not connect when I run it. I assume it has something to do with the alsa sink failing.

No other hardware on system, this is just an onboard audio card and thats it.

I did modify default.pa according to the online wiki but I went and recomment all that.
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Tue Nov 21, 2017 8:57 pm    Post subject: Reply with quote

Ah... But true, you should not need to run "pulseaudio" directly ... Dbus should run pulseaudio for you on demand if you got it set up correctly.

Are you sure you do not have anything accessing sound via alsa when pulseaudio starts? Is hw0,0 your expected sound card?

Code:
$ cat /proc/asound/cards
$ cat /proc/asound/devices


Well, if you go with alsa directly, I'm not sure what features of jack you were using. No you don't need a sound server explicitly; PA has the features of jack, running alsa is just basically running barebones. The other unfortunate fact is that more and more applications are leaning towards using pulseaudio instead of using alsa directly, so I suppose someday you'll end up having to revisit this again.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Tue Nov 21, 2017 10:43 pm    Post subject: Reply with quote

OK, so it appears something is grabbing the soundcard but I am clueless as to what it could be!

I do expect hw0:0 to be the proper, but just to confirm here is the code:

cards:

Code:
 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfeb44000 irq 28
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfeb40000 irq 16


devices:

Code:
  0: [ 0]   : control
  1:        : sequencer
  4: [ 0- 0]: hardware dependent
 19: [ 0- 3]: digital audio playback
 32: [ 1]   : control
 33:        : timer
 36: [ 1- 0]: hardware dependent
 48: [ 1- 0]: digital audio playback
 49: [ 1- 1]: digital audio playback
 56: [ 1- 0]: digital audio capture
 58: [ 1- 2]: digital audio capture


I would prefer to move on with getting pulse configured, is there anywhere to go from here?
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Tue Nov 21, 2017 11:09 pm    Post subject: Reply with quote

Strange, it should pick up all possible sinks. HW0:0 is your HDMI video card sound, which I'm not sure what port you're using though it should be fine like that (you can select outputs with pavucontrol.)

What does

$ fuser /dev/snd/*

report?

Each of the numbers is a process id. In an idle state on a pulseaudio system, either nothing is open (when fresh booted) or pulseaudio (when something accesses audio through udev/dbus) is controlling these devices...incidentally, is udev built with dbus support too?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Wed Nov 22, 2017 2:55 am    Post subject: Reply with quote

Well, wait, I am looking for my analog out actually, is that hw1:0?! Is this my issue?!

Note, pavucontrol does NOT work. When I run it I get a box saying:

Code:
Connection to PulseAudio failed. Automatic retry in 5s

In this case this is likely because PULSE_SERVER in the Environment/X11 Root Window Properties default-server in client.conf is misconfigured.
This situation can also arrise when PulseAudio crashed and left stale details in the X11 Root Window.
If this is the case, then PulseAudio should autospawn again, or if not configured you should run start-pulseaudio-x11 manually.


fuser /dev/snd/* is null
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Wed Nov 22, 2017 7:26 am    Post subject: Reply with quote

What are your USE flags on pulseaudio?

My openrc-pulseaudio box has:

X alsa alsa-plugin asyncns bluetooth caps dbus gdbm glib gtk ipv6 lirc orc qt4 ssl tcpd udev webrtc-aec -doc -equalizer -gnome -jack -libressl -libsamplerate -native-headset (-neon) -ofono-headset (-oss) -realtime (-selinux) -sox (-system-wide) -systemd {-test} -zeroconf
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Wed Nov 22, 2017 2:29 pm    Post subject: Reply with quote

When I try to emerge pulseaudio i get the following use default:

X alsa alsa-plugin asyncs caps dbus gdm glib ipv6 orc qt4 ssl tcpd udev webrtc-aec -bluetooth -doc -equalizer -gnome -gtk -jack -libressl -libsamplerate -lirc -native-headset (-neon) -ofono-headset (-oss) -realtime (-selinux) -sox (-system-wide) -systemd (-test) -zeroconf

Not sure if this helps any. I do still have realtime active in my kernel i realize from jack, is that hindering the process in anyway?[/code]
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Wed Nov 22, 2017 11:58 pm    Post subject: Reply with quote

Which document suggested to use

load-module module-alsa-sink device=hw:0,0

in default.pa? Was it from the arch documentation?

Does it do the same thing with and without this?

Also do you still have jack installed? Hmm...supposedly PA will work(or break) with jack too...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
phobos13013
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 277
Location: PNW

PostPosted: Sat Nov 25, 2017 5:36 pm    Post subject: Reply with quote

YOU FRIGGING DID IT!!!!

Documentation used was the Gentoo wiki, let me guess... it is outdated 8O

https://wiki.gentoo.org/wiki/PulseAudio

I do have the arch doc page open in a tab but I hadn't delved in yet, wasn't sure how pertinent it was and it seems overly detailed. Also not sure of age but I find in general Arch is up to date.

Does the same thing with or without.

I wasn't 100% sure Jack was removed so I checked, and true virtual and qjackctl were still in there. So I removed and rebuilt the entire system and world. Useless, I know but I figured, why the heck not.

Now I run pavucontrol, same symptom. BUT, PROGRESS! Now I run pulseaudio in console and I get THIS:

W: [pulseaudio] module.c: module-detect is deprecated: Please use module-udev-detect instead of module-detect!
E: [pulseaudio] main.c: Meta command .endif is not valid in this context
E: [pulseaudio] main.c: Failed to initialize daemon.

I go into default.pa and see this old method is in force, so I comment it and also notice the *if jack* module, so I commented that part out (hadnt already done that).

Save that and run pulseaudio in console again and it basically says, how you big dummy why did you do that, pulse is already running!

pavucontrol is active now.

Case closed! whew that took way too long.
_________________
...and it should be known by now
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9825
Location: almost Mile High in the USA

PostPosted: Sat Nov 25, 2017 6:42 pm    Post subject: Reply with quote

Ah...cool. I think the Gentoo documentation is correct but badly worded. That segment to add hw:0,0 apparently was meant if you were neither using udev or systemd though simply saying udev/eudev would have sufficed (and not mentioning systemd). Plain udev(with openrc) and eudev users don't need to do that manual configuration.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum