[GH-ISSUE #3165] Bad quality audio with --noprofile and PCSX2 #1984

Closed
opened 2026-05-05 08:39:02 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @adrianlshaw on GitHub (Jan 18, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3165

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?

Originally created by @adrianlshaw on GitHub (Jan 18, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3165 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?
gitea-mirror 2026-05-05 08:39:02 -06:00
Author
Owner

@ghost commented on GitHub (Jan 19, 2020):

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?

<!-- gh-comment-id:575971525 --> @ghost commented on GitHub (Jan 19, 2020): > 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?
Author
Owner

@adrianlshaw commented on GitHub (Jan 19, 2020):

Thanks for the tip! I actually misunderstood the —noprofile option because I thought it would use no profile at all, rather than default.profile. Will check that.

<!-- gh-comment-id:575998885 --> @adrianlshaw commented on GitHub (Jan 19, 2020): Thanks for the tip! I actually misunderstood the —noprofile option because I thought it would use no profile at all, rather than default.profile. Will check that.
Author
Owner

@Vincent43 commented on GitHub (Jan 19, 2020):

I think there was some misunderstanding here because --noprofile works as you thought and doesn't use default.profile.

<!-- gh-comment-id:576005246 --> @Vincent43 commented on GitHub (Jan 19, 2020): I think there was some misunderstanding here because `--noprofile` works as you thought and doesn't use `default.profile`.
Author
Owner

@ghost commented on GitHub (Jan 20, 2020):

@adrianlshaw I misinformed you here, my apologies. See @Vincent43's statement above.

<!-- gh-comment-id:576245207 --> @ghost commented on GitHub (Jan 20, 2020): @adrianlshaw I misinformed you here, my apologies. See @Vincent43's statement above.
Author
Owner

@rusty-snake commented on GitHub (Feb 10, 2020):

@adrianlshaw still need help?

<!-- gh-comment-id:584056830 --> @rusty-snake commented on GitHub (Feb 10, 2020): @adrianlshaw still need help?
Author
Owner

@adrianlshaw commented on GitHub (Feb 11, 2020):

Yes, what should I try next? I could try on a different distro that may have different versions of ALSA...

<!-- gh-comment-id:584540931 --> @adrianlshaw commented on GitHub (Feb 11, 2020): Yes, what should I try next? I could try on a different distro that may have different versions of ALSA...
Author
Owner

@Vincent43 commented on GitHub (Feb 11, 2020):

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

<!-- gh-comment-id:584815612 --> @Vincent43 commented on GitHub (Feb 11, 2020): Maybe firejail [built-in blacklist](https://github.com/netblue30/firejail/blob/afb7e0363bd630f12773876d486afed4ad485ad7/src/firejail/fs.c#L623) 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`
Author
Owner

@rusty-snake commented on GitHub (May 6, 2020):

I'm closing here due to inactivity, please fell free to reopen if you still have this issue.

<!-- gh-comment-id:624724312 --> @rusty-snake commented on GitHub (May 6, 2020): I'm closing here due to inactivity, please fell free to reopen if you still have this issue.
Author
Owner

@adrianlshaw commented on GitHub (May 6, 2020):

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 :-)

<!-- gh-comment-id:624810530 --> @adrianlshaw commented on GitHub (May 6, 2020): 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 :-)
Author
Owner

@rusty-snake commented on GitHub (May 6, 2020):

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
<!-- gh-comment-id:624813045 --> @rusty-snake commented on GitHub (May 6, 2020): 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 ```
Author
Owner

@adrianlshaw commented on GitHub (May 6, 2020):

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.

<!-- gh-comment-id:624868962 --> @adrianlshaw commented on GitHub (May 6, 2020): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1984
No description provided.