I'm part-way to a solution, but am not sure whether I'm doing things
right, please comment.
Currently, I notice the variables PULSE_SERVER and the like are not set
on my Arch Linux install. Setting them did not make a difference,
initially, until I did further things.
Basically, I changed pulseaudio to a system-wide instance (starting as
root with --system), copied the /var/run/pulse/.pulse-cookie to
/etc/pulse-cookie in the 32-bit chroot, did the appropriate chown to
pulse:pulse-access and chmod 640 to the cookie, and was able to play
sound using paplay -s localhost. It also works with
PULSE_SERVER=localhost.
As I understand it, what I'm doing is using pulseaudio over a network
(though the chroot is actually on the same machine). All I'd have to do
now is set the PULSE_SERVER environment variable to get sound working.
Is this the right way to do it? Seems overly complicated for a
single-machine setup to me. Please advise.
Ng Oon-Ee wrote:
> Hi all, first post here but I've been following the list for quite a while.
>
> Been shifting to a 64-bit setup in Arch Linux, previously used it for a
> while in Ubuntu with a multi-lib system but went back to 32-bit for a
> variety of reasons, chiefly work-related. Now willing to try 64-bit
> again, but with non-64 bit apps safely tucked away in a 32-bit chroot
> instead of messing around with /lib32 stuff again.
>
> However, I'm not sure how to get PA to accept sounds from my 32-bit
> chroot. The only help I've been able to find from this mailing list's
> archives are a question and quick answer
> <http://www.mail-archive.com/pulseaudio-discuss@mail.0pointer.de/msg00141.html>
> concerning permissions on /dev/shm, which are correct as referred to
> there. In the Arch Linux forums, this thread
> <http://bbs.archlinux.org/viewtopic.php?pid=540619> contains a
> discussion on this, but without any clear statements on how the OP
> actually got his system to work. I've done the most obvious thing, which
> is to install 32-bit pulse in the chroot, but am unclear about what to
> do beyond that. Further advise in that thread refers to pulse over a
> network, and I'm not sure whether that's required, since its within the
> same machine, after all.
>
> Thanks to any who can give me pointers in this matter. Some miscellenous
> (sp?) things I noticed, when I try to run pulseaudio from the chroot I
> get errors with lots of things not being able to startup, which only go
> away on removing them from /etc/pulse/default.pa, these are:-
> module-device-restore
> module-stream-restore
> module-card-restore
> module-hal-detect
> module-bluetooth-discover
> module-{esound,native}-protocol-unix
> module-gconf
> The rest load up, leaving me with with module-default-device-restore,
> module-rescue-streams, module-null-sink, and module-always-sink only.
>
> Also, when I run pulseaudio in the chroot, I notice /tmp contains two
> folders named pulse-XXXXXXXX, so I'm guessing that the pulseaudio daemon
> in the chroot doesn't know that there's already a daemon running and is
> trying to take control of system devices, hence why I have to disable so
> many modules since its failure to grab what pulseaudio (64bit) has
> already taken causes errors.
>
> Thank you all for your time.
Well, firstly, I'm not sure why you're using a chroot... I've been
running 64 bit mandriva for several years and it's quite simple to
install 32bit apps and libraries under a 64 bit system (the library
packages never conflict between 32/64 systems). I've got several 32 bit
sound producing apps and they all work fine.
Regardless of that, if you are using a chroot, you don't need a
"server"
as per your subject, you just need the 32 bit pulse libraries. If you
want alsa applications to work you'll need the 32 bit alsa libraries
and
the 32 bit alsa pulse plugin.
As you said earlier you'll want to make the /dev/shm stuff work on your
chroot to get best performance.
Remember that you do not want to run a second instance of the
pulseaudio
deamon. There should only be one of these for your user, and it may as
well be the 64 bit one.
Col
Am not sure whether top/bottom-posting is the way to go, please advise.
Anyway, from your answer I suppose that making /dev/shm work means
ensuring that it exists and is world-read/write-able? My ls -la /dev |
grep shm returns:-
drwxrwxrwt 2 root root 80 2009-04-23 17:30 shm
Presumably this should be correct.
So, the results of paplay -v /usr/share/sounds/alsa/Side-Right.wav from
a terminal in the 64-bit install:-
Using sample spec 's16le 1ch 48000Hz'
Connection established.
Stream successfully created
Playback stream drained.
Draining connection to server.
The same command, run from the 32-bit chroot:-
Using sample spec 's16le 1ch 48000Hz'
Connection failure: Connection terminated
So, somehow, the Pulse server/daemon won't allow the 32bit chroot to
play. The user within the chroot is identical to the user outside it,
with membership in audio, pulse, pulse-access, and pulse-rt. If I try
with user 'root' from the 32bit chroot, its the same result except for
an additional complaint about /home/<user_name> not belonging to
the user. Is there anything else I could try, some sort of permissions
thing with the server I could change?
Finally, thanks for your quick response, Colin.
|