-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PulseAudio not working in --chroot
#3484
Comments
In order to play audio from inside a chroot, you need at least to bind-mount $XDG_RUNTIM_DIR/pulse/native and copy /etc/machine-id. |
Thanks @rusty-snake. I'm not quite getting what you mean. What I tried: In case you wonder, I tried with a default bootstrapped root (which does not have the Also, even if |
This was more a technical note. I don't think it is possible ATM to make PA work from inside a
|
@azurvii You can bind mount it like you normally do, outside Firejail
|
Thanks @smitsohu! That, plus copying machine-id, indeed brought sounds to the chrooted steam. However, it seemed I had only the steam app playing sounds well, e.g. playing videos in a game's store page. When starting games, some of them came with loud static in addition to the game sounds; and some of them were just silent. I might have some settings messed up, and would have more tests when I get a break. |
Closing issue. PulseAudio works in the steam app with the machine-id and bind-mounting. The static sounds are likely a config issue, which I'll take a look separately. |
I'm seeing the same problem in the Discord electron app. I tried bind as provided by smitsohu:
Problem persists. Discord doesn't report any errors connecting to Pulseaudio, but sound hardware is not detected. |
I try to get steam running with
firejail --chroot
. Steam runs, but without audio.I'm on debian bullseye, and using
firejail
from the repo, version 0.9.62-3.Steam logged the somewhat related error message:
PulseAudio connect failed (used only for Mic Volume Control) with error: Access denied
.pavucontrol
reportedFailed to create secure directory (/run/user/1000/pulse): No such file or directory
.The ancestor
/run/user/
folder was non-present in the chroot environment. In other non-chroot environments,mount
contained/run/user/$UID
from host. The chroot environment did not.I tried to create the folder structure manually, and
pulseaudio
seemed to be able to create folders of its own, but it would complainE: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
.With that, I guess the pulseaudio is not configured in chroot environment like other non-chroot ones. While X11 is functional in chroot.
I found
--bind=
but that is for root only. I have not found other related options to mount/run/user
into the chroot environment.--whitelist=
did not work.The text was updated successfully, but these errors were encountered: