I just did this guide to run Firefox as an isolated user - https://www.burnison.ca/articles/running-firefox-as-an-isolated-linux-user It's a nice idea for security and also I don't like .mozilla directory in my home. Mozilla Firefox developers won't add support for XDG Base Directory unfortunately.
Everything looks fine but speakers and mic doesn't work. I've got some warnings about it:
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
ATTENTION: default value of option mesa_glthread overridden by environment.
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
[Child 101772, MediaDecoderStateMachine #1] WARNING: 7f463372f020 OpenCubeb() failed to init cubeb: file /build/firefox/src/firefox-94.0.1/dom/media/AudioStream.cpp:324
[Child 101772, MediaDecoderStateMachine #1] WARNING: Decoder=7f4643c11c00 [OnMediaSinkAudioError]: file /build/firefox/src/firefox-94.0.1/dom/media/MediaDecoderStateMachine.cpp:4001
Do anyone have any idea how to fix it? Your suggestions will be greatly appreciated.
Thank you for your comprehensive answer.
I just switched to ALSA from Pulseaudio. It works fine.