Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Connecting to Pulse through a chroot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Jickler
n00b
n00b


Joined: 09 Sep 2011
Posts: 72

PostPosted: Tue Oct 30, 2012 12:55 pm    Post subject: Connecting to Pulse through a chroot Reply with quote

Hello all,

Hopefully this is the right forum for this. This has been covered frequently in the past, but nothing I've seen so far has fixed the problem. Some sound works, some sound not so much....

This does not work:
Code:

# speaker-test

speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Playback open error: -111,Connection refused


This also does not work:
Code:

/usr/games/bin/supertuxkart
Irrlicht Engine version 1.7.3
Linux 3.4.9-gentoo #1 SMP PREEMPT Fri Sep 21 23:50:09 Local time zone must be set-- i686
[FileManager] Data files will be fetched from: '/usr/share/games/supertuxkart/'
creating directory </root/.config/supertuxkart>
Could not read user config file file /root/.config/supertuxkart/config.xml
[IrrDriver] Creating NULL device
Irrlicht Engine version 1.7.3
Linux 3.4.9-gentoo #1 SMP PREEMPT Fri Sep 21 23:50:09 Local time zone must be set-- i686
[IrrDriver] Trying OpenGL rendering.
[IrrDriver] Tring to create device with 32 bits
AL lib: pulseaudio.c:612: Context did not connect: Access denied
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

AL lib: alsa.c:512: Could not open playback device 'default': Connection refused
New highscore file '/root/.config/supertuxkart/highscore.xml' created.
Challenge file '/root/.config/supertuxkart/challenges.xml' will be created.
startMusic : m_normal_filename=</usr/share/games/supertuxkart//data//music/MayDayMayhem.ogg>, gain=0.7


This works great:
Code:

madplay /09\ -\ Geek.mp3


Of course, all I really want is PCSX2 which...kinda works? I get terrible, terrible, terrible sound distortion, but I do admittedly get sound. Of course in emulation sound distortion can be it's own problem, but disturbingly I get identical pulse problems:
Code:

pcsx2
...
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

What I want is for those errors to go away, and then find PCSX2's sound working perfectly (fat chance, those errors will go away and PCSX2 will probably still not work, but so is life).

This is how I mount for chroot:
Code:

mount -o bind /dev /mnt/gentoo-32bit/dev
mount -o bind /dev/pts /mnt/gentoo-32bit/dev/pts
mount -o bind /dev/shm /mnt/gentoo-32bit//dev/shm
mount -o bind /proc /mnt/gentoo-32bit/proc
mount -o bind /proc/bus/usb /mnt/gentoo-32bit/proc/bus/usb
mount -o bind /sys /mnt/gentoo-32bit/sys
mount -o bind /tmp /mnt/gentoo-32bit/tmp
mount -o bind /usr/portage/ /mnt/gentoo-32bit/usr/portage/
mount --bind /run /mnt/gentoo-32bit/run


This is roughly what I'm seeing in all the pulse in chroot howtos. Many of those howtos want to mount /var/run instead, but the friendly and always amazing support in #gentoo informs me that it's more appropriate to mount /run these days (and mounting /var/run didn't fix the problem anyways). Also, /var/lib/dbus/machine-id has matching IDs in both the host and chroot.
So what gives? Everything I read suggests the burden for getting sound to work is mount /var/run and having matching machine-ids, but this doesn't seem to be doing it for me. Thanks in advance for any help or suggestions thrown my way! :)
Back to top
View user's profile Send private message
Jickler
n00b
n00b


Joined: 09 Sep 2011
Posts: 72

PostPosted: Tue Oct 30, 2012 10:20 pm    Post subject: Reply with quote

I wouldn't say it's fixed, but my personal problem's resolved so this is solved. Removed the /etc/asound that redirected to Pulse. Errors still occur in terminal output, and pavucontrol on the host suggests that sound is not being routed through the host's pulse server but on the other hand it just works. I guess it's going through dmix.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum