You are not logged in.

#1 2009-01-18 13:52:39

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Pulse output from 32-bit chroot/64-bit system combined?

I previously had errors with the bin32-skype package not playing nice with PulseAudio. I got nowhere down that path, and decided to try installing a 32-bit chroot system, and running Skype from that.

I followed the guide on the wiki, and have the system set up. Skype runs from it. First of all, I got the same error as before:

ALSA lib control.c:874:(snd_ctl_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_ctl_pulse.so

Fair enough, I thought, that doesn't exist inside my 32-bit environment. So I installed PulseAudio inside the chroot, not really knowing what to expect. What I get is:

E: core-util.c: Home directory /home/tsv not ours.
ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused

spat out over and over whenever Skype tries to play sound. Not sure how relevant that first error is, or whether it's important, but the main problem is I still have no sound!

All ideas appreciated, I'm getting desperate. Booting to Windows just to call some people is not cool :-(

Offline

#2 2009-01-19 00:18:43

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Re: Pulse output from 32-bit chroot/64-bit system combined?

Just realised maybe PulseAudio wasn't started up within the 32-bit environment. Running /etc/rc.d/pulseaudio start gives

:: Starting D-BUS system messagebus                                             [DONE] 
:: Starting Hardware Abstraction Layer                                          [FAIL] 
:: Starting pulseaudio daemon                                                   [FAIL]

Why would HAL fail? Doesn't like being run from a chroot? Where would any relevant logs be, I can't see anything under /var/log that looks useful.

Offline

#3 2009-01-24 10:34:06

Aradreth
Member
Registered: 2009-01-24
Posts: 6

Re: Pulse output from 32-bit chroot/64-bit system combined?

Firstly read http://wiki.archlinux.org/index.php/Pul … er_network
A few changes need to be made to work with a chroot but nothing hard...

In /etc/hosts.allow I prefer using :

pulseaudio-native: 127.0.0.1

but it makes no difference tbh.

Your /etc/rc.d/arch32 needs to be changed to:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case $1 in
    start)
        stat_busy "Starting Arch32 chroot"
        mount --bind /proc /opt/arch32/proc
        mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb
        mount --bind /dev /opt/arch32/dev
        mount --bind /dev/pts /opt/arch32/dev/pts
        mount --bind /dev/shm /opt/arch32/dev/shm
        mount --bind /sys /opt/arch32/sys
        mount --bind /tmp /opt/arch32/tmp
        mount --bind /home /opt/arch32/home
    cp /var/run/pulse/.pulse-cookie /opt/arch32/etc/pulse-cookie
    chown pulse:pulse-access /opt/arch32/etc/pulse-cookie
    chmod 640 /opt/arch32/etc/pulse-cookie
        add_daemon arch32
        stat_done
        ;;
    stop)
        stat_busy "Stopping Arch32 chroot"
        umount /opt/arch32/proc/bus/usb
        umount /opt/arch32/proc
        umount /opt/arch32/dev/pts
        umount /opt/arch32/dev/shm
        umount /opt/arch32/dev
        umount /opt/arch32/sys
        umount /opt/arch32/tmp
        umount /opt/arch32/home
        rm_daemon arch32
        stat_done
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
esac
exit 0

and that should, I think, get it working with pulseaudio 0.9.10 or lower... with 0.9.14 (what's in the repo's now) it stopped working for me and I've yet to figure out why, although I'd put my money on it being the new policykit stuff it depends on. If I ever work out why it stopped working for me after upgrading to 0.9.14 I'll post it here.

Offline

#4 2009-01-24 16:34:07

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Re: Pulse output from 32-bit chroot/64-bit system combined?

Thanks for the reply. As you say, this doesn't seem to work any more, but it's good to know there should at least be a way of getting it done, I'd almost given up.

This isn't actually as important to me as it was as I now have Skype on my phone, but it would still be nice to have it on Arch too.

Cheers again smile

Offline

#5 2009-01-24 19:20:01

Aradreth
Member
Registered: 2009-01-24
Posts: 6

Re: Pulse output from 32-bit chroot/64-bit system combined?

They changed the name of one of the configuration files roll
/etc/pulse/default.pa is now /etc/pulse/system.pa make the required changes in the new file and it should work (did for me at least)

Offline

#6 2009-01-24 20:10:16

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Re: Pulse output from 32-bit chroot/64-bit system combined?

Ah, I just figured it out too :-) This is so very close to working, but I still have a couple of errors.

I can playback sounds from other apps as well as Skype but only if I start Skype first. Otherwise, Skype still can't produce any output (although it doesn't output errors either). Also, the sound is choppy sometimes and I get

RtApiAlsa: underrun detected

errors. But it's definitely more usable than it was.

Cheers for all the help!

Offline

#7 2009-01-24 22:24:58

Aradreth
Member
Registered: 2009-01-24
Posts: 6

Re: Pulse output from 32-bit chroot/64-bit system combined?

The choppy play back can be fixed by editing /etc/pulse/daemon.conf the two lines you need to add/change are:

 default-fragments = 8
 default-fragment-size-msec = 5

You might need to play around with the values though.

Offline

#8 2009-04-20 08:25:31

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: Pulse output from 32-bit chroot/64-bit system combined?

Hi, I'm trying to get my chroot playing to the pulseaudio server running on my 64-bit system. Do I have to set pulseaudio to run in multi-user mode (as implied by the above advise on pulse over a network, surely that shouldn't be needed within my own machine?)?

Basically, similarly to the OP, I can't start pulse up within the chroot, error message is:-

E: polkit.c: Cannot connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Am I supposed to mount /var/run/dbus within the chroot as well?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2009-04-22 03:29:21

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: Pulse output from 32-bit chroot/64-bit system combined?

Just thought of something else, do I need to be running pulseaudio as system-wide instance?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#10 2009-04-28 02:41:15

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: Pulse output from 32-bit chroot/64-bit system combined?

Solved it, after discussion on the pulseaudio ML. No need for system-wide or pulse over network or copying of any cookies at each boot. Simply put, /etc/rc.d/arch32 and /etc/schroot/mounts-arch32 need to be modified to mount --bind /var/lib/dbus /opt/arch32/var/lib/dbus. That's where the machine-id is stored which Pulse refers to, once that matches, Pulse will search in ~/.pulse/ for the run-time symlink which then directs it to /tmp/pulse-XXXX for actual operation, as far as I can tell.

Updated both the bundled 32-bit system and pulseaudio wiki with the information I got from the pulse devs.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#11 2009-05-22 17:14:07

tjwallace
Member
Registered: 2009-03-07
Posts: 40
Website

Re: Pulse output from 32-bit chroot/64-bit system combined?

ngoonee wrote:

Solved it, after discussion on the pulseaudio ML. No need for system-wide or pulse over network or copying of any cookies at each boot. Simply put, /etc/rc.d/arch32 and /etc/schroot/mounts-arch32 need to be modified to mount --bind /var/lib/dbus /opt/arch32/var/lib/dbus. That's where the machine-id is stored which Pulse refers to, once that matches, Pulse will search in ~/.pulse/ for the run-time symlink which then directs it to /tmp/pulse-XXXX for actual operation, as far as I can tell.

Updated both the bundled 32-bit system and pulseaudio wiki with the information I got from the pulse devs.

I have followed your instructions from both wiki pages.  Do I need to start the pulse daemon in the 32bit-chroot?

Offline

#12 2009-05-23 05:12:50

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: Pulse output from 32-bit chroot/64-bit system combined?

No, it is not at all necessary. If you can use paplay within the chroot, then its working.

Please note that the mounts used for /etc/rc.d/arch32 are NOT the same as the mounts used by schroot (and, by extension, probably by the older dchroot which I have no experience with).

If you have any problems, please state specifically what you've tried here, I'll be reading replies and will try to help you out.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#13 2009-05-23 19:52:31

tjwallace
Member
Registered: 2009-03-07
Posts: 40
Website

Re: Pulse output from 32-bit chroot/64-bit system combined?

Thanks.  I got it working but pulse audio output option in Skype (running inside the chroot) is not showing up now.  I guess that is another thread.

Offline

#14 2009-05-23 23:11:07

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: Pulse output from 32-bit chroot/64-bit system combined?

For the pulse audio output to show up, you'd need to modify your .asoundrc in your home directory (I assume its mounted in the chroot). Basically, you'd want the following

pcm.!default {
    type pulse
}

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

Of course, there's other things you'd need to set in .asoundrc (for example, access to the default mixer instead of the pulse mixer), but this should get you started. Search around for asoundrc stuff, there's tons, its not very well-documented, but its there. You can ask on these boards if you want, as well. From here on its not 64-bit specific anymore, so suggest you ask in the Multimedia and Games forum.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#15 2009-05-23 23:19:12

tjwallace
Member
Registered: 2009-03-07
Posts: 40
Website

Re: Pulse output from 32-bit chroot/64-bit system combined?

Thanks!  I just hard-linked my /etc/asound.conf to my chroot and that worked.  Not I just need to deal with the quality / tearing problems.

EDIT:
Tried this:

 default-fragments = 8
 default-fragment-size-msec = 5

but after restarting pulse my chroot is getting "connection refused"...

Last edited by tjwallace (2009-05-23 23:28:17)

Offline

Board footer

Powered by FluxBB