PCSX2 is a video game emulator. When running firejail --noprofile PCSX2 the sound quality is a complete noisy mess. The application console is littered with many entries that say ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
This doesn't happen outside firejail. Any ideas on how to further debug or fix this? Is ALSA running in some fallback or degraded mode?
Any ideas on how to further debug or fix this? Is ALSA running in some fallback or degraded mode?
Firejail has several _debug_ options explained in more detail in the man page. But with --noprofile my guess is those won't show very much. AFAIK neither ALSA nor sound in general are crippled in any way, at least not with a default profile. Codebase does however seem to rely on / assumes usage of PulseAudio.
It might be more informative if you'd be able to supply logs/output of the commands you've tried. When using the --noprofile option, Firejail uses /etc/firejail/default.profile (and what gets included by that file. I'd try to test again by making a local copy of it in ${HOME}/.config/firejail/default.local file in which you start out completely blank (so commenting out everything that is in default.profile). Keep enabling options one by one and report back if that changes anything, for the better hopefully... Also, can you show us what version of firejail you are seeing this on, and the OS?
Thanks for the tip! I actually misunderstood the 鈥攏oprofile option because I thought it would use no profile at all, rather than default.profile. Will check that.
I think there was some misunderstanding here because --noprofile works as you thought and doesn't use default.profile.
@adrianlshaw I misinformed you here, my apologies. See @Vincent43's statement above.
@adrianlshaw still need help?
Yes, what should I try next? I could try on a different distro that may have different versions of ALSA...
Maybe firejail built-in blacklist block some alsa functionality on your system. Could you take a look if there is something alsa-related in /sys/firmware?
Maye try firejail --noprofile --noblacklist=/sys/module PCSX2
I'm closing here due to inactivity, please fell free to reopen if you still have this issue.
Thanks for reminding me @rusty-snake . I tried @Vincent43's suggestion but that didn't make a difference. I can't re-open the issue due to lack of privileges :-)
You cloud try my noprofile.profile, but I don't think that this works. Likely that there is a general incompatibility.
# - Make sure firejail.config has no changes.
# - The sandbox still have an own PID-namespace.
allow-debuggers
allusers
#keep-dev-shm
#keep-var-tmp
#noautopulse
writable-etc
writable-run-user
writable-var
writable-var-log
noblacklist /sys/fs
noblacklist /sys/module
I think this issue can be closed. These underruns and crackling only seem to occur before a game starts. The game I just tried seems fine after initial launch. I'll reopen if I see further issues.
Most helpful comment
I think there was some misunderstanding here because
--noprofileworks as you thought and doesn't usedefault.profile.