general/other No sound in Linuxulator

I recently am trying to daily drive FreeBSD again, but am having some trouble with Linuxulator and sound, which worked perfectly last time.

I've followed some of the newer guides here on the forums and even tried a different distro in a chroot but it seems if PULSE_SERVERis set, any program trying to use pulseaudio instantly crashes with *** stack smashing detected ***: terminated, I've tried using a system wide pulse configuration, to setting XDG_RUNTIME_DIR and mounting that inside the chroot but nothing seems to work.

I've looked around online but cant seem to find anything relating to my issue and dmesg doesn't seem to have any relevant info for debugging, does anyone know what might be causing this or know where I might want to look to try to debug this?

Sound works perfectly in FreeBSD for reference.
 
I recently am trying to daily drive FreeBSD again, but am having some trouble with Linuxulator and sound, which worked perfectly last time.

I've followed some of the newer guides here on the forums and even tried a different distro in a chroot but it seems if PULSE_SERVERis set, any program trying to use pulseaudio instantly crashes with *** stack smashing detected ***: terminated, I've tried using a system wide pulse configuration, to setting XDG_RUNTIME_DIR and mounting that inside the chroot but nothing seems to work.

I've looked around online but cant seem to find anything relating to my issue and dmesg doesn't seem to have any relevant info for debugging, does anyone know what might be causing this or know where I might want to look to try to debug this?

Sound works perfectly in FreeBSD for reference.
Hi Mia_ , the same happened to me after I upgraded to 13.2-RELEASE-p3. Couldn't figure out how to solve it, so then I tried upgrading to 14.0-BETA2 and discovered it did work fine there!
Also, I didn't need LIBGL_DRI3_DISABLE=1 anymore to run Linux apps (possibly related to using graphics/drm-515-kmod now too)👍
So far so good...
 
Odd, I was thinking of upgrading to the beta regardless so I suppose I'll give that a try.
 
I have this issue since building my kernel and world too (except for me I built to 15-CURRENT from 13.2)

I suspect some kernel module needs recompiling but unsure what. Sound works fine using native FreeBSD applications, so it hasn't bothered me enough to start tearing into it just yet.
 
I finally found a solution. After upgrading from 14.0-RC2 to 14.0-RC3 (and now RC4), the same sound problem exhibited on 13.2-RELEASE-p3 started happening again...
So I tried a few things and figured out that fixing the broken symlink on /compat/ubuntu/var/run was the key:

su
rm /compat/ubuntu/var/run
cd /compat/ubuntu/var && ln -s ../run run

Now pulseaudio sound is working again on linux browsers 👍

See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274871
 
hmm, your issue looks separate as I had /var/run mounted to /run in fstab
Code:
/var/run        /run                        nullfs        rw,late,nofail,failok
/run            /compat/arch/run            nullfs        rw,late,nofail,failok
/var/run        /compat/arch/var/run        nullfs        rw,late,nofail,failok
and additionally am not even using /run but a custom XDG_RUNTIME_DIR and global root pulseaudio session and was still having these issues, however, checking just now on RC3 no issue is currently present, I'll need to check again on RC4 however

I'll keep this unresolved until the full release incase the issue does reappear however.
 
I finally found a solution. After upgrading from 14.0-RC2 to 14.0-RC3 (and now RC4), the same sound problem exhibited on 13.2-RELEASE-p3 started happening again...
So I tried a few things and figured out that fixing the broken symlink on /compat/ubuntu/var/run was the key:

su
rm /compat/ubuntu/var/run
cd /compat/ubuntu/var && ln -s ../run run

Now pulseaudio sound is working again on linux browsers 👍

See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274871
That did the trick! Thank you!

I also noticed that the "lock" soft link under the /compat/ubuntu/var directory was incorrect as well. I didn't see any ill effects but for the sake of thoroughness, I corrected it as well. Here are the relevant commands ...

cd /compat/ubuntu/var
ln -sf ../run run
ln -sf ../run/lock lock
 
Do you guys use pulseaudio on both of the host and guest? I use sndio on my host machine and I tried installing pulseaudio and sndio to the guest but I couldn't get sound working. I did given symlinks too.
 
The information here is for connecting Pulse audio server on the host to the guest Pulse audio server
 
Finally, I got it working.

How to steps:
# Use pactl info on host to see server string of pulseaudio
pactl info
Server String: /tmp/pulse-c0nud56S1vuf/native
# chroot into guest
chroot /compat/ubuntu /bin/bash
# switch to user, i created an user with same uid with on host machine
su yusuf
# export PULSE_SERVER variable
export PULSE_SERVER=/tmp/pulse-c0nud56S1vuf/native
# And launch your application. in my case it is minecraft :D


Note: you must mount your /tmp to guest
% grep tmp /etc/fstab
/tmp /compat/ubuntu/tmp nullfs rw,late 0 0
 
Back
Top