Firefox and ALSA
Context
Since FF 52, the support for ALSA has been officially dropped.
I don’t know about the details of the Linux audio subsystem, and I don’t have special requirements for it, other than it can play sound from multiple sources. So I just installed ALSA, and use dmix for the latter.
Void Linux provides the firefox package compiled with support for alsa
, sndio
and pulseaudio
,
the latter being the blessed option which is officially supported by the FF team.
After setting security.sandbox.content.syscall_whitelist
to 16
in about:config
, audio worked.1
Problem
After upgrading to version 59.0.2 during this month, audio broke in Firefox.
Solution
Uninstall Firefox. Only half-joking at this point.
Set or create the following about:config
entries2:
security.sandbox.content.read_path_whitelist
:/dev/snd/,/home/username/.asoundrc
security.sandbox.content.write_path_whitelist
:/dev/snd/
The trailing slashes are important. Don’t omit.
How it works?
Due to security concerns, Firefox is now running each tab in its own isolated sandbox environment.
While that’s a good thing for a browser, ALSA requires r/w access the /dev/snd/
device, which we
add to the whitelists by ourselves.
- Reference: Discussion thread [return]
- Reference: Code Laboratorium - Firefox drops ALSA; apulse to the rescue [return]