Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: pulseaudio and multiple users

  1. #1
    Join Date
    Oct 2008
    Beans
    49

    pulseaudio and multiple users

    Is it intended behavior for pulseaudio (in per-user mode) to simultaneously play audio from multiple local users at the same time?

    Specifically, if there is one user logged in via X and another connected via ssh, and they both want to play audio out of the same sound card at the same time, is this supported?

    This does not work for me, one user (sometimes both) gets "Connection refused" errors, even though both users have a pulseaudio server running.

    using karmic on x86_64.

  2. #2
    Join Date
    May 2005
    Location
    Amsterdam
    Beans
    38
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: pulseaudio and multiple users

    In Debian I used to

    $ pulseaudio -kill

    as normal user and do

    # pulsaudio -system -D

    as root. Then I was able to have programs run as different users play sound simultaneously through pulseaudio.

    Now I have Ubuntu and it doesn't work. Things are very different with pulseaudio in Ubuntu. None of my users are members of any of the pulsaudio groups, although they can play sound when they are logged into gnome and their session is the one up on the screen. When I switch users in gnome, any sound that is playing stops. Not what I would expect.

  3. #3
    Join Date
    Nov 2009
    Beans
    5

    Re: pulseaudio and multiple users

    There is a solution over here. It boils down to: under System->User Settings->Advanced->User Priviledges, uncheck the 'Use audio device' option for all your users. A reboot after than might be needed (logging out and back in for all users at least is needed).

  4. #4
    Join Date
    May 2005
    Location
    Amsterdam
    Beans
    38
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: pulseaudio and multiple users

    Quote Originally Posted by SolipsistX View Post
    There is a solution over here. It boils down to: under System->User Settings->Advanced->User Priviledges, uncheck the 'Use audio device' option for all your users. A reboot after than might be needed (logging out and back in for all users at least is needed).
    The solution to which you link isn't a solution to our problem. We want two or more users to play sound simultaneously. Unchecking "Use audio devices" makes sound stop when you switch users in Gnome. Checking it makes the first user to start pulseaudio lock it (or something). Neither option makes it possible for two users to play sound simultaneously (whether they are logged in through Gnome, ssh or wether they are simply playing an mp3 from the command line in somebody else's Gnome session.

  5. #5
    Join Date
    Oct 2008
    Beans
    49

    Re: pulseaudio and multiple users

    I've concluded that PulseAudio in system mode is supposed to give the intended behavior, but it is not well-supported (and they recommend against using it).

    But it seems like that is the way to go. Just make sure all users are members of the 'pulse-access' group, and enable system mode in /etc/default/pulseaudio and reboot.

    pulse developers: please support system mode! it seems like pulseaudio is here to stay (and honestly, by karmic it seems to be working pretty well). system mode should be brought to the point where users don't need to be warned against using it.

  6. #6
    Join Date
    May 2005
    Location
    Amsterdam
    Beans
    38
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: pulseaudio and multiple users

    Quote Originally Posted by me13221 View Post
    make sure all users are members of the 'pulse-access' group, and enable system mode in /etc/default/pulseaudio and reboot
    That works very well. Thanks!

  7. #7
    Join Date
    Apr 2008
    Beans
    4,377
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: pulseaudio and multiple users

    The reason why the pulse devs recomend against system mode is that it is a real security vulnerability. In system mode anyone on the network can control the local sound devices and the devs are not so keen on allowing that by default.

    The reason that system mode is still available is because they realize that people want use it for just that purpose anyway so they kept it easy to do but not really obvious.

    It seems a reasonable approach to me.

    You will find that pulseaudio can do a lot of neat stuff once you dig into it.
    PMs will be ignored.

  8. #8
    Join Date
    May 2005
    Location
    Amsterdam
    Beans
    38
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: pulseaudio and multiple users

    Hmm..

    Yesterday, everything worked fine, but today there was only "Dummy output" in the pulseaudio Volume Control and no sound. After some googling, I did

    Code:
    # fuser /dev/snd/*
    /dev/snd/controlC0:   2831
    /dev/snd/controlC1:   2831
    /dev/snd/pcmC0D0c:    2831m
    /dev/snd/pcmC0D0p:    2831m
    and killed the processes that used sound with

    Code:
    # kill -9 2831
    Now it works again, but it would be nicer if it would work straight after booting.

  9. #9
    Join Date
    Oct 2008
    Beans
    49

    Re: pulseaudio and multiple users

    Quote Originally Posted by markbuntu View Post
    The reason why the pulse devs recomend against system mode is that it is a real security vulnerability. In system mode anyone on the network can control the local sound devices and the devs are not so keen on allowing that by default.

    The reason that system mode is still available is because they realize that people want use it for just that purpose anyway so they kept it easy to do but not really obvious.

    Wait- anyone on the *network*? that doesn't seem good. I don't see why anything would have to be exposed on the network.

    This is what I mean by begging the developers to 'support' it, rather than just leave a jumbled mess. It's a very desirable feature.

    plus it is not without its bugs (see above). bugs get fixed through official support channels.

    I guess if I'm complaining, I should learn to code and fix things myself.

  10. #10
    Join Date
    May 2005
    Location
    Amsterdam
    Beans
    38
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: pulseaudio and multiple users

    Quote Originally Posted by me13221 View Post
    Wait- anyone on the *network*? that doesn't seem good. I don't see why anything would have to be exposed on the network.
    I have an option "Enable network access to local sound server" under "Configure local sound server" which is unchecked by default I think.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •