Re: [pulseaudio-discuss] pulseaudio automatic startup
Lennart Poettering wrote: On Wed, 13.02.08 18:34, Colin Guthrie ([EMAIL PROTECTED]) wrote: Lennart Poettering wrote: Hmm, I wonder if there are any drawbacks of this way to start PA. Does gnome-session still upload the samples correctly if it doesn't start esd/PA by itself? It has been a while since I last had a look on the g-s source code. If that's not a problem, than I might do a similar change on Fedora, too. Not 100% sure about that one. I certainly get my login sound but I have been a little confused about not seeing samples in the cache although this is no doubt due to me restarting pulseaudio since logging in (I generally don't log out/in much provided my suspend is behaving..). I'll let you know. One other thing for fedora package (not sure if it applies) is ESD autospawn. I've had to ship a /etc/esd.conf with auto_spawn=0 in it otherwise libesound will try to run /usr/bin/esd by default (which is obviously symlinked to esdcompat). Alternative would be to hack libesound to make no_autospawn default to 1 but somehow the config file seemed less hacky and didn't change the defined behaviour of libesound. Autospawning = evil. Don't do it. I'm trying not to :) The mistake I made was not including an esd.conf file to stop libesound from doing it by default :) Hmm, when I hacked the auto-spawning code I made sure that it worked event for the ESD drop-in stuff. Are you suggesting that this doesn't work? No, there is no bug in pulse here, I just had a bug in my packaging of the pulseaudio-esound-compat package where I did not provide an /etc/esd.conf file. When this file does not exist, the *libesound* autospawning was turned on by default which resulted in pulse being auto spawned via /usr/bin/esd - esdcompat Like I say it may not be an issue on fedora's libesound if it's been tweaked accordingly. Hmm, if I remember correctly: GNOME will fallback to non-cache event sound playback if a cached sample for the event is not cached. That might be the reason why event sounds still work for you, although nothing is in the cache. Fair enough. Certainly the sounds are cached at login as I think I reported back elsewhere so that's good :) Col ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
Lennart Poettering wrote: Hmm, when I hacked the auto-spawning code I made sure that it worked event for the ESD drop-in stuff. Are you suggesting that this doesn't work? No, there is no bug in pulse here, I just had a bug in my packaging of the pulseaudio-esound-compat package where I did not provide an /etc/esd.conf file. When this file does not exist, the *libesound* autospawning was turned on by default which resulted in pulse being auto spawned via /usr/bin/esd - esdcompat And that doesn't work for you? It should work. I carefully made sure to make PA as compatible to esd as possible, and that includes handling libesd-based autospawning of PA. If it doesn't work, than I broke something. It works. Everything works!! The only problem was in my package which didn't ship an esd.conf file (we do not want esd to autospawn by default). The default config file with the real esound has a config file that does not autospawn by default so when converting to use pulse over esound I inadvertently changed the default behaviour. I only mention this in case you do not ship an esd.conf in your fedora package and have the same issue as me! I've not picked through the fedora rpms lately so it may not be an issue at all! I didn't mean this to be a discussion, just a heads up, so sorry if I've misled you a bit here :p Hmm, if I remember correctly: GNOME will fallback to non-cache event sound playback if a cached sample for the event is not cached. That might be the reason why event sounds still work for you, although nothing is in the cache. Fair enough. Certainly the sounds are cached at login as I think I reported back elsewhere so that's good :) Hmm, so you say that if PA is started before gnome-session, then it will still properly upload the samples? That would be great. Certainly seems to, tho' I've only got observation here rather than facts from picking through the gnome-session stuff. Col ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
On Sat, 16.02.08 14:29, Colin Guthrie ([EMAIL PROTECTED]) wrote: One other thing for fedora package (not sure if it applies) is ESD autospawn. I've had to ship a /etc/esd.conf with auto_spawn=0 in it otherwise libesound will try to run /usr/bin/esd by default (which is obviously symlinked to esdcompat). Alternative would be to hack libesound to make no_autospawn default to 1 but somehow the config file seemed less hacky and didn't change the defined behaviour of libesound. Autospawning = evil. Don't do it. I'm trying not to :) The mistake I made was not including an esd.conf file to stop libesound from doing it by default :) Hmm, when I hacked the auto-spawning code I made sure that it worked event for the ESD drop-in stuff. Are you suggesting that this doesn't work? No, there is no bug in pulse here, I just had a bug in my packaging of the pulseaudio-esound-compat package where I did not provide an /etc/esd.conf file. When this file does not exist, the *libesound* autospawning was turned on by default which resulted in pulse being auto spawned via /usr/bin/esd - esdcompat And that doesn't work for you? It should work. I carefully made sure to make PA as compatible to esd as possible, and that includes handling libesd-based autospawning of PA. If it doesn't work, than I broke something. Hmm, if I remember correctly: GNOME will fallback to non-cache event sound playback if a cached sample for the event is not cached. That might be the reason why event sounds still work for you, although nothing is in the cache. Fair enough. Certainly the sounds are cached at login as I think I reported back elsewhere so that's good :) Hmm, so you say that if PA is started before gnome-session, then it will still properly upload the samples? That would be great. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
On Thu, 14.02.08 01:03, Colin Guthrie ([EMAIL PROTECTED]) wrote: Just tested and it seems to load fine a gnome login plays the sounds nicely. If you want (and to save too much divergence if it's not needed), you are welcome to just copy the one I have. It also does some small checks relating to stale pid files that I should really port to pulse properly at some point Stale PID files? Do you ave any code that it is better than r2067 added to the pid file code? http://www.pulseaudio.org/browser/trunk/src/pulsecore/pid.c Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
Lennart Poettering wrote: On Fri, 01.02.08 14:44, Jim Duda ([EMAIL PROTECTED]) wrote: I'm using pulseaudio 0.9.6, on Fedora 7 installed via yum. I'm current having to start pulseaudio -D manually. Three Questions: 1) Should pulseaudio startup automatically somehow when someone logs into X? If so, how does this work? I've read all the docs, etc, but haven't found my answer. The idea is to run PA from gnome-session via its compatiblity script esdcompat which is linked to /usr/bin/esd. To make this work you have to enable the ESD check box in the gnome sound properties however. For new installations this is enabled by default. On experimentation in Mandriva we've found a few problems with the launching via esdcompat. As pulse takes longer to initialise than esd did, the timeouts for starting esd are no longer accurate and this leads to a few issues (e.g. login sound not playing etc.). One super fast hardware this is not a major issue but for a lot of ppl it is. We found that by using xinit.d to start pulse (which also works for all desktops, not just Gnome E) it was more reliable and even if esdcompat was run by gnome-session, pulse had already initialised and all was well. YMMV but I thought I'd report it back. Col ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
On Wed, 13.02.08 14:04, Colin Guthrie ([EMAIL PROTECTED]) wrote: On experimentation in Mandriva we've found a few problems with the launching via esdcompat. As pulse takes longer to initialise than esd did, the timeouts for starting esd are no longer accurate and this leads to a few issues (e.g. login sound not playing etc.). One super fast hardware this is not a major issue but for a lot of ppl it is. We found that by using xinit.d to start pulse (which also works for all desktops, not just Gnome E) it was more reliable and even if esdcompat was run by gnome-session, pulse had already initialised and all was well. YMMV but I thought I'd report it back. Hmm, I wonder if there are any drawbacks of this way to start PA. Does gnome-session still upload the samples correctly if it doesn't start esd/PA by itself? It has been a while since I last had a look on the g-s source code. If that's not a problem, than I might do a similar change on Fedora, too. Lennart -- Lennart PoetteringRed Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
Colin Guthrie wrote: Colin Guthrie wrote: Lennart Poettering wrote: Hmm, I wonder if there are any drawbacks of this way to start PA. Does gnome-session still upload the samples correctly if it doesn't start esd/PA by itself? It has been a while since I last had a look on the g-s source code. If that's not a problem, than I might do a similar change on Fedora, too. Not 100% sure about that one. I certainly get my login sound but I have been a little confused about not seeing samples in the cache although this is no doubt due to me restarting pulseaudio since logging in (I generally don't log out/in much provided my suspend is behaving..). I'll let you know. Just tested and it seems to load fine a gnome login plays the sounds nicely. I meant to mention in the previous mail but forgot... Is pulse supposed to maintain several EsounD socket connections. After logging in I see about 10 or 11 such clients in paman. While doing lsof and grepping for the socket file itself only pulseaudio is recorded as having them open. Perhaps it's not closing the sockets correctly? Or perhaps apps just maintain a permananet socket connection and all is as it should be? Certainly several apps have libesound open so it's entirely possible. Also (completly OT now but as I may have your attention ;) when I use the latest mplayer svn pulse code, when I use -ao esd (pointless I know) I see two connections in paman Clients tab... one is a standard named EsounD client... and the other is simply MPlayer (same as appears for a -ao pulse). mplayer + esd has a fairly high latency FWIW, audio and video appear out of sink for me and just playing a simple mp3 is slower to start than with -ao pulse too. Just thought I'd mention it (not really an important issue IMO but the same latency may affect other apps where no specific pulse interface exists - certainly users have reported that to me - so if you have any thoughts please share them :)). Col ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
Colin Guthrie wrote: Lennart Poettering wrote: Hmm, I wonder if there are any drawbacks of this way to start PA. Does gnome-session still upload the samples correctly if it doesn't start esd/PA by itself? It has been a while since I last had a look on the g-s source code. If that's not a problem, than I might do a similar change on Fedora, too. Not 100% sure about that one. I certainly get my login sound but I have been a little confused about not seeing samples in the cache although this is no doubt due to me restarting pulseaudio since logging in (I generally don't log out/in much provided my suspend is behaving..). I'll let you know. Just tested and it seems to load fine a gnome login plays the sounds nicely. If you want (and to save too much divergence if it's not needed), you are welcome to just copy the one I have. It also does some small checks relating to stale pid files that I should really port to pulse properly at some point You can grab the xinit.d file here: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/pulseaudio/current/SOURCES/pulseaudio.xinit?revision=HEADview=markup and a /etc/sysconfig/pulseaudio template here: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/pulseaudio/current/SOURCES/pulseaudio.sysconfig?revision=HEADview=markup HTHs Col ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] pulseaudio automatic startup
Jim Duda wrote: I'm using pulseaudio 0.9.6, on Fedora 7 installed via yum. I'm current having to start pulseaudio -D manually. Three Questions: 1) Should pulseaudio startup automatically somehow when someone logs into X? If so, how does this work? I've read all the docs, etc, but haven't found my answer. Nope. Even in pa 0.9.9 this isn't handled by pulse directly. There are two methods officially supported (more on this in a bit): 1) Use auto-spawn to automatically launch the pa server when a client tries to connect - this is very flaky and generally not recommenced it seems. 2) Use the /usr/bin/esdcompat method - this involveds removing /usr/bin/esd and replacing it with /usr/bin/esdcompat (e.g. via symlink). This will tell Gnome or Enlightenment to start pulse automatically on login. Personally I prefer to put a script in my /etc/X11/xinit.d folder that runs on login and checks a config file (/etc/sysconfig/pulseaudio) to see if the user has configured pulseaudio auto-startup. This is how I package the Mandriva pulseaudio. 2) I need to run pulseaudio on some diskless server machines which don't run X or have anyone login. As such, I need to run pulseaudio as either a system daemon or some phantom user. Is there a recommended approach to starting pulseaudio on a X-less machine, i.e., rc script? Not really, but it's fairly simple, you can just create a /etc/init.d/ script and start it that way. Phantom user with a suitibly tweaked default.pa to allow IP ACL based connections is probably what you want (that's what I do on a similar setup at work). 3) I've read in a couple of posts that pulseaudio can be used with an spdif output. Did that support start with some version after 0.9.6? Dunno anything about that one, sorry. You should be able to configure the default.pa to use the passthrough alsa device I would have thought tho' (but I'm no expert on spdif generally). HTHs Col ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss