You are not logged in.

#1 2013-01-12 19:44:07

forshark
Member
Registered: 2013-01-03
Posts: 41

[SOLVED] pulseaudio with multiple logins on the same computer.

I have installed pulseaudio on an arch install with xfce DE lxdm as the login manager  per instructions in the wiki https://wiki.archlinux.org/index.php/Pulseaudio. Pulse audio will work for the first user to login. The after logging out and logging in as user #2 the pulse audio server is innaccesable. Seemingly locked to the other user account. However upon reboot logging into user #2 pulse audio works, and doesn't for user #1. Anbody have any ideas about how to remedy this?

Last edited by forshark (2013-01-14 22:58:47)

Offline

#2 2013-01-13 05:07:24

henk
Member
From: Weert, Netherlands
Registered: 2013-01-01
Posts: 334

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

http://www.freedesktop.org/wiki/Softwar … rfectSetup

Read the section about "Should users be in the audio group?".

Offline

#3 2013-01-13 17:28:38

forshark
Member
Registered: 2013-01-03
Posts: 41

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

I have read the link, and I do not have any users in the audio group. I uderstand this is correct, but it still does not work as it should.

Offline

#4 2013-01-13 19:07:59

henk
Member
From: Weert, Netherlands
Registered: 2013-01-01
Posts: 334

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

You are using xfce. Check for each user Settings>>Settingsmanager>>Session and Startup. Under Application Autostart see if PulseAudio is started. If it is not in there you can add it
as PulseAudio, command: start-pulseaudio-x11.
Under Session you can also change the Restart Style if you want to.

Offline

#5 2013-01-13 19:48:08

forshark
Member
Registered: 2013-01-03
Posts: 41

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

You are using xfce. Check for each user Settings>>Settingsmanager>>Session and Startup. Under Application Autostart see if PulseAudio is started. If it is not in there you can add it
as PulseAudio, command: start-pulseaudio-x11.
Under Session you can also change the Restart Style if you want to.

I have pulseaudio in the autostart configured for both users profiles in xfce. When user #1 logins the can load pulseaudio volume control, but upon logging out and logging into user # 2, when opening pulseaudio volume control, the following message is displayed:

"Connection to Pulseaudio failed. Automatic retry in 5s
..."

User # can play audio files and adjust master volume control on the desktop, but cannot switch sound cards or and audio configuration. when typing "pulseaudio --start" in the terminal the following message is displayed.

N: [pulseaudio] main.c: User-configured server at {611ec3a8df414e3d80582d52a73b0b36}unix:/run/user/1001/pulse/native, refusing to start/autospawn.

However the UID 1001 is for user #1 and not user #2. The reverse occurs when logging in as user #2 first.

Any ideas on why this occurs?

Offline

#6 2013-01-13 21:00:59

henk
Member
From: Weert, Netherlands
Registered: 2013-01-01
Posts: 334

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

I'm not sure if this will work, but maybe you could try mpd
https://wiki.archlinux.org/index.php/Mu … yer_Daemon

and set it up like this
https://wiki.archlinux.org/index.php/Mu … pd_user.29

Offline

#7 2013-01-13 23:15:41

Max-P
Member
Registered: 2011-06-11
Posts: 164

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

henk wrote:

I'm not sure if this will work, but maybe you could try mpd
https://wiki.archlinux.org/index.php/Mu … yer_Daemon

and set it up like this
https://wiki.archlinux.org/index.php/Mu … pd_user.29


MPD has nothing to do with PulseAudio, it's just a music player. The tips and tricks to configure it so use another user's PulseAudio are also specific to it.

You have many options, one of them is to setup PulseAudio as a system-wide daemon. Or set it up as its own user and allow all users to share the PulseAudio instance.

But what I really think happens is that the X session is not reset properly when a user disconnects and the other one login again.

Try this first:

1- Switch to a console (Ctrl+ALT+F1)
2- Login as user A, and issue a "startx" to start X11. Play some music, use PulseAudio, open pavucontrol.
3- Logout from X11, and logout of that terminal.
4- Login as user B, and do the same as #2.


That will tell us many things about where it may cause problem. If it works that way, then you will need to reset X11 properties (I'll tell how). If it DOESN'T work, then the other server might still be running. Then run "ps aux | grep pulse" in a terminal to check if it's running.

Offline

#8 2013-01-14 17:36:37

forshark
Member
Registered: 2013-01-03
Posts: 41

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

Indeed, if I start my system login as root run "systemctl stop lxdm" then logout and login as user #1 run "startx" and open pavucontrol then logout and login as user #2 run pavucontrol everything works like it should. However when logging in via lxdm the same error occurs as described in my previous post.

PS... Thanks for the replies!

Offline

#9 2013-01-14 20:03:23

Max-P
Member
Registered: 2011-06-11
Posts: 164

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

Ok, then it's probably the display that doesn't get reset.

Can you try running

pax11publish -r

and see if after that, PulseAudio starts working again for the second user? Just run this right before starting pulseaudio for the second user, it should work smile

Offline

#10 2013-01-14 20:28:37

forshark
Member
Registered: 2013-01-03
Posts: 41

Re: [SOLVED] pulseaudio with multiple logins on the same computer.

Worked like a charm. After trying it twice, I added the command "pax11publish -r" to the session startup because I am using xfce, and pulseaudio is back in business.

Thanks a bunch.

Now if libreoffice wouldn't take thirty seconds to load the first document upon login. alas, that's a topic for a different thread.

Arch Forums ROCK!!!

Offline

Board footer

Powered by FluxBB