[Solved] Pulseaudio working but connectrion failed, conn

[Solved] Pulseaudio working but connectrion failed, conn

Postby mark9117 » Aug 11th, '15, 01:31

I'm at the end of my rope here and starting to run in circles. Time to ask for help.

New Mageia 5 install on a mythtv box.
Code: Select all
Linux pvr 3.19.8-desktop-3.mga5 #1 SMP Sat Jun 13 17:05:48 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Pulseaudio is not starting on boot and when I get it started as a user (madams 6080 0.0 0.4 706420 10024 ? Sl 17:12 0:00 pulseaudio -D), I still get failed connections in my audio player and alsa, therefore, can not run alsamixer.

Even VLC is giving me an error: Audio output failed: the audio device default could not be used. Connection refused.

When I kill pulse audio, I can run alsamixer and it fails to automatically select the correct sound device. Pressing F6 allows me to move from default,to the correct device HDA Intel, my onboard sound card.

Here are some highlights based on the information I've found on the web:

My devices
Code: Select all
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


My startup config
Code: Select all
ls -al /etc/X11/xinit.d/50pulseaudio
-rwxr-xr-x 1 root root 212 Feb  3  2015 /etc/X11/xinit.d/50pulseaudio*


I believe I have everything installed
Code: Select all
# rpm -qa | grep pulseaudio | sort
lib64alsa-plugins-pulseaudio-1.0.28-6.mga5
lib64pulseaudio0-5.0-6.mga5
libalsa-plugins-pulseaudio-1.0.28-6.mga5
libpulseaudio0-5.0-6.mga5
pulseaudio-5.0-6.mga5
pulseaudio-client-config-5.0-6.mga5
pulseaudio-module-bluetooth-5.0-6.mga5
pulseaudio-module-equalizer-5.0-6.mga5
pulseaudio-module-gconf-5.0-6.mga5
pulseaudio-module-jack-5.0-6.mga5
pulseaudio-module-lirc-5.0-6.mga5
pulseaudio-module-x11-5.0-6.mga5
pulseaudio-module-zeroconf-5.0-6.mga5
pulseaudio-utils-5.0-6.mga5
task-pulseaudio-2011.0-6.mga5


Profile info
Code: Select all
update-alternatives --display soundprofile
soundprofile - status is manual.
 link currently points to /etc/sound/profiles/pulse
/etc/sound/profiles/alsa - priority 10
/etc/sound/profiles/pulse - priority 20
Current `best' version is /etc/sound/profiles/pulse.


Any ideas out there?

Thanks.

Mark
Last edited by mark9117 on Oct 2nd, '15, 06:07, edited 1 time in total.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Pulseaudio working but connectrion failed, connection re

Postby mark9117 » Aug 11th, '15, 02:17

This just in:

I can go to /run/user/10001/pulse and change the owner of that directory from root to my user and I can start pulseaudio. Trouble is, this does not survive reboot.

I reboot the machine and the ownership of /run/user/10001/pulse reverts to root and I can't start pulseaudio. And oddly, my user accounts uid is 10001.

Really a nuisance.

Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Pulseaudio working but connectrion failed, connection re

Postby doktor5000 » Aug 11th, '15, 20:38

mark9117 wrote:Pulseaudio is not starting on boot and when I get it started as a user (madams 6080 0.0 0.4 706420 10024 ? Sl 17:12 0:00 pulseaudio -D), I still get failed connections in my audio player and alsa, therefore, can not run alsamixer.

[...]
My startup config
Code: Select all
ls -al /etc/X11/xinit.d/50pulseaudio
-rwxr-xr-x 1 root root 212 Feb  3  2015 /etc/X11/xinit.d/50pulseaudio*




The ownership is set by pulse itself - your problem is that it doesn't start at boot, and you try to start it manually.
Question is, why doesn't it start at boot. What desktop do you run, and how do you start that, how is the X session started?

In any case, one of /etc/X11/xinit.d/50pulseaudio or /etc/xdg/autostart/pulseaudio.desktop
should be called for whatever X or desktop session you run. Both start the same actual command: /usr/bin/start-pulseaudio-x11 which loads the necessary modules.

Please show the output as normal user of

Code: Select all
systemctl --user status pulseaudio.socket pulseaudio.service

and as root of
Code: Select all
systemctl status sound.target
ps auxwww | grep pulse
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Pulseaudio working but connectrion failed, connection re

Postby mark9117 » Aug 12th, '15, 07:18

And here is that information:
Code: Select all
$ systemctl --user status pulseaudio.socket pulseaudio.service
Failed to get D-Bus connection: Connection refused



Code: Select all
# systemctl status sound.target
● sound.target - Sound Card
   Loaded: loaded (/usr/lib/systemd/system/sound.target; static)
   Active: active since Mon 2015-08-10 16:43:18 MDT; 1 day 6h ago
     Docs: man:systemd.special(7)


Code: Select all
# ps auxwww | grep pulse
madams    8252  0.2  0.2 718976  4344 ?        S<l  Aug10   3:58 pulseaudio
madams    8257  0.0  0.0  76816  1804 ?        S    Aug10   0:00 /usr/libexec/pulse/gconf-helper
root     30696  0.0  0.1 116056  2096 pts/9    S+   23:50   0:00 grep --color pulse


Edit: I'm using KDE as my desktop and it starts by default under my user account, "madams".

On to Google.

Thanks for the attention.

Mark
Last edited by doktor5000 on Aug 12th, '15, 21:40, edited 1 time in total.
Reason: removed fullquote
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Pulseaudio working but connectrion failed, connection re

Postby colin » Aug 14th, '15, 09:38

If the /run/user/$UID/pulse folder is owned by root, then chances are you are doing something under your user account that results in some kind of root privileges (e.g. something run via su) without clearing out the $XDG_RUNTIME_DIR variable.

Code: Select all
[colin@jimmy ~]$ echo $XDG_RUNTIME_DIR
/run/user/603
[colin@jimmy ~]$ su -
Password:
[root@jimmy ~]# echo $XDG_RUNTIME_DIR

[root@jimmy ~]# exit
[colin@jimmy ~]$ su
Password:
[root@jimmy colin]# echo $XDG_RUNTIME_DIR
/run/user/603
[root@jimmy colin]# exit
[colin@jimmy ~]$ sudo -s
[root@jimmy colin]# echo $XDG_RUNTIME_DIR

[root@jimmy colin]# exit
[colin@jimmy ~]$ sudo -i
[root@jimmy ~]# echo $XDG_RUNTIME_DIR

[root@jimmy ~]#



As you can see in most cases, the XDG_RUNTIME_DIR is cleared out, but in the case of using "su" it's kept. Ultimately using these kind of tools is somewhat dangerous as there is no sensibly defined way to interact with these things without messing things up. The audio is just one consequence and it's quite a noticeable one, but other things can and will be messed up too depending on what applications you run when in this half-initialised, hybrid environment.

This has been a problem for many years and the semantics of tools such as su and sudo are often poorly understood - especially in relation to the definition of a "session" (hint: these tools do not create a session for the target user!). It's for these reasons that machinectl will likely gain a mode that *can* allow you to create a proper session for the other user, detached from your own session which might (if people use it) alleviate some of these problems. See https://github.com/systemd/systemd/issues/825 for more details (also see the first reply for a better description of su and it's friends than I can give in this context.

Ultimately if you find the permissions on your runtime folder are going astray, you need to find out which process is changing them and change that to work a different way. It can be tricky but you may already have an idea now I've described the problem better.

Hope this helps.
colin
 
Posts: 53
Joined: Jul 25th, '11, 11:15

Re: Pulseaudio working but connectrion failed, connection re

Postby mark9117 » Oct 2nd, '15, 06:06

Changed those permissions again and it looks like they're holding. Not sure what the trouble actually was, but it's behaving itself now.

Thanks for the attention. I'm marking this one "solved".


Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.


Return to Sound

Who is online

Users browsing this forum: No registered users and 1 guest