Re: [pulseaudio-discuss] multiseat and PulseAudio?

2011-05-16 Thread duportail

Op 16-5-2011 8:49, David Henningsson schreef:

On 2011-05-14 17:46, Tomasz Chmielewski wrote:

Traditionally, UNIX systems were supporting multiseat desktop sessions
(i.e. multiple keyboards, video cards, monitors attached to one PC).

According to:

http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode

What is wrong with system mode?

Or with other words: if you run it that way on your desktop,
then you are doing it the wrong way.


What is the correct way to use PulseAudio with multiseat systems?


Assuming there is also one sound card per seat, you should run one 
PulseAudio per seat, and as the user currently logged in to that seat. 
Exactly how to do that, i e set up access to the right sound card for 
the logged in user (with ConsoleKit etc) is beyond my knowledge though.


Currently i use a script to set the users' default sink according the 
display he is on, because you do not know which user is logged in on 
which display.

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] multiseat and PulseAudio?

2011-05-16 Thread duportail

Op 16-5-2011 10:51, Tomasz Chmielewski schreef:

On 16.05.2011 10:43, duportail wrote:


Currently i use a script to set the users' default sink according the
display he is on, because you do not know which user is logged in on
which display.


I only have one sound card for all users, so I guess your scripts 
wouldn't help much?



I use a usb soundcard per display.I log in at each display to detect the 
sink of the usb soundcard that is for that display.
Than a script to set the default sink per display, this script is called 
in the users' autostart function.
If the user logs in, the script finds out what $DISPLAY and sets the 
default sink.

The .pulse dir should be empty.
I did some work regarding udev rules and consolekit stuff, but it is so 
difficult to re-configure remote systems if somehow a hub is broken or 
replaced on the computer.

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] pulseaudio

2011-04-12 Thread duportail

Try to test the new xubuntu 11.04 with kde on a multi-user system.
The first user (for example user1) can log in and gets a default sink 
from pulse.
The second user(for example user2) that will log in gets a auto_null 
because pulse did not found any sinks.
If i log out user1, than user2 can get a default sink by kill and start 
pulse.

Where should be the reason?

gd

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] pulseaudio

2011-04-12 Thread duportail

Op 12-4-2011 18:30, Sean McNamara schreef:

Hi,

On Tue, Apr 12, 2011 at 12:15 PM, duportailpo...@telenet.be  wrote:

Try to test the new xubuntu 11.04 with kde on a multi-user system.
The first user (for example user1) can log in and gets a default sink from
pulse.
The second user(for example user2) that will log in gets a auto_null because
pulse did not found any sinks.
If i log out user1, than user2 can get a default sink by kill and start
pulse.
Where should be the reason?

This is the classic multi-user problem: you're using a soundcard
without hardware mixing, so only one ALSA application can take direct
control of the hardware device at a time. user1's pulseaudio daemon
takes control of it, so obviously user2's PA daemon will just get
Device or resource busy when trying to snd_pcm_open() on hw:0 (for
example). This problem has existed since ALSA existed. There's no
direct fix without scrapping the API and rewriting it.

I guess there is no solution yet (still) in 11.04, but you can see
that folks in the Ubuntu community are trying to resolve the issue
with a number of possible approaches:
https://wiki.edubuntu.org/BluePrints/multiuser-soundcards-pulseaudio

Running as system-wide is one possible approach...
http://www.pulseaudio.org/wiki/SystemWideInstance

Not sure if there's yet a solution allowing the use of shm and
module-native-protocol-unix for multiple users (this is ideally what
you'd want for maximum performance / minimum latency), but it's quite
easy to set up module-native-protocol-tcp and connect to localhost
using the `default-server' parameter in client.conf, at the cost of
latency. Let me know if you need more details on this particular
approach.

BTW, search the archives of this list at gmane
http://blog.gmane.org/gmane.comp.audio.pulseaudio.general  -- there
are many many historical posts about multi-user setups.



Sean


gd

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Sorry, forgot to mention: there multiple (two) usb soundcards on the 
system.It is working good on xubuntu 10.10.
As you said, the second user gets a Device or resource busy.When I 
logout the first user, the second user can get a default sink.

gd
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] pulseaudio

2011-04-12 Thread duportail

Op 12-4-2011 18:53, Tanu Kaskinen schreef:

On Tue, 2011-04-12 at 12:30 -0400, Sean McNamara wrote:

Hi,

On Tue, Apr 12, 2011 at 12:15 PM, duportailpo...@telenet.be  wrote:

Try to test the new xubuntu 11.04 with kde on a multi-user system.
The first user (for example user1) can log in and gets a default sink from
pulse.
The second user(for example user2) that will log in gets a auto_null because
pulse did not found any sinks.
If i log out user1, than user2 can get a default sink by kill and start
pulse.
Where should be the reason?

This is the classic multi-user problem: you're using a soundcard
without hardware mixing, so only one ALSA application can take direct
control of the hardware device at a time. user1's pulseaudio daemon
takes control of it, so obviously user2's PA daemon will just get
Device or resource busy when trying to snd_pcm_open() on hw:0 (for
example). This problem has existed since ALSA existed. There's no
direct fix without scrapping the API and rewriting it.

Actually, this situation is supposed to be handled just fine (unless
duportail expects both users to be able to use the audio hw
simultaneously, which he doesn't mention). If this doesn't work, xubuntu
is broken. Some things that can cause this problem: the users are in the
audio group, consolekit isn't running or consolekit's udev-acl isn't
in use.


Maybe xubuntu is broken.I will wait until further releases

gd
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] pulseaudio start stop

2011-04-06 Thread duportail
I am setting the default sink for the user at log-in according the 
display he is on.
First time login is ok, but if the user logs out and logs in at another 
display, pulse does not start with error (sorry, in dutch)

E: socket-server.c: bind(): Adres is al in gebruik
E: module.c: Failed to load  module module-esound-protocol-unix 
(argument: ): initialization failed.

E: main.c: Module load failed.
E: main.c: Initialiseren van de daemon mislukt.
Can I do something at the user logout?
gd
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] pulseaudio start stop

2011-04-06 Thread duportail

Op 6-4-2011 13:14, duportail schreef:
I am setting the default sink for the user at log-in according the 
display he is on.
First time login is ok, but if the user logs out and logs in at 
another display, pulse does not start with error (sorry, in dutch)

E: socket-server.c: bind(): Adres is al in gebruik
E: module.c: Failed to load  module module-esound-protocol-unix 
(argument: ): initialization failed.

E: main.c: Module load failed.
E: main.c: Initialiseren van de daemon mislukt.
Can I do something at the user logout?
gd
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Ok, found it.Removing the /tmp/.esd(uid) did it.But why is this left 
,after the user is logged out?


gd
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] pulseaudio start stop

2011-04-06 Thread duportail

Op 6-4-2011 16:50, Colin Guthrie schreef:

Hello,

*THIS IS IMPORTANT* As I stated last time, please keep the list CC'ed on
replies.



'Twas brillig, and duportail at 06/04/11 15:24 did gyre and gimble:

Correct,this is for a multiseat setup.However,the same user cannot login
twice on the same computer.
What I mean is:when I log in a user on ,say, display 1,(this with
kde),pulseaudio runs and the deault sink is set as in the script.
If I logout this user, and log him in on another display, pulse is not
starting because of the /temp/.esd-$UID.

Does the same user have a different home directory, or is their home
directory cleaned out by some other script?

If this is the case, then I suspect that PulseAudio is *still running*
from the previous session, but you've trashed it's runtime dir and pid
files, thus it doesn't know it's still running and it tries to start
again, but the old process still has /tmp/.esd-$UID/socket open and thus
prevents the other PA process from using it.

PA will not exit immediately after logout but will adhere to it's
exit-idle-timeout value (see /etc/pulse/daemon.conf). If you set this to
a suitably low value, then this should avoid the issue.


When I remove this, just before the user logs in on another display, all
runs well.

If you prefer, you can comment out module-esound-protocol in
/etc/pulse/default.pa as this will prevent the loading of esound support
and thus the opening of this file.

However, if my suspicion (above) is correct, then there could be other
problems (like the old pulseaudio still having the h/w open and thus
hogging it from the new one) and you should probably ensure PA is
properly killed on logout (or before /home/$USER is reset).


HTHs

Col


Yes, this is correct, after a time the  /tmp/.esd-$UID/socket is going away.
The home dir of the user is cleaned (reset) just before login (with 
gdm).So the /home/$USER/.pulse dir is empty.
The users' KDE autostart function runs the pulse script and the default 
sink is set.
This way the user can take place at no matter what display he chooses 
,log in and have sound.
If I assign a pulse-audio-sink(usb-audio) per user, than the user must 
always login at the same display(thus where this usb-sound card is)
It is very important to assing a sink to a display: in a school with 500 
students and multiple multiseatcomputers, the students must be able to 
take place at no matter what display and no matter what 
multiseatcomputer and have sound..
I just have to find a way that pulse not choose the default 
soundcard,when  a soundcard is defective.

gd,


___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss