[GH-ISSUE #5329] firefox: no audio with bluez-alsa on NixOS (dbus-system) #2959

Closed
opened 2026-05-05 09:37:24 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @imxade on GitHub (Aug 21, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5329

Discussed in https://github.com/netblue30/firejail/discussions/5328

Originally posted by imxade August 20, 2022
On NixOS,
im using bluez-alsa for bluetooth headset

firejail --noprofile firefox

plays audio through default Bluetooth device

but

firejail firefox

doesn't play audio when default device is a Bluetooth one.

i've whitelisted $HOME & $XDG_RUNTIME_DIR but no luck.

In case of pulseaudio, firejailed firefox plays fine through bluetooth.

how can i get it working with bluez-alsa ?

Originally created by @imxade on GitHub (Aug 21, 2022). Original GitHub issue: https://github.com/netblue30/firejail/issues/5329 ### Discussed in https://github.com/netblue30/firejail/discussions/5328 <div type='discussions-op-text'> <sup>Originally posted by **imxade** August 20, 2022</sup> On **NixOS**, im using **bluez-alsa** for bluetooth headset ``` firejail --noprofile firefox ``` plays audio through default Bluetooth device but ``` firejail firefox ``` doesn't play audio when default device is a Bluetooth one. i've whitelisted $HOME & $XDG_RUNTIME_DIR but no luck. In case of **pulseaudio, firejailed firefox** plays fine through bluetooth. how can i get it working with bluez-alsa ?
gitea-mirror 2026-05-05 09:37:24 -06:00
  • closed this issue
  • added the
    needinfo
    label
Author
Owner

@jaens commented on GitHub (Aug 22, 2022):

Try using PulseAudio or PipeWire instead of raw ALSA? PulseAudio has working firejail integration.

<!-- gh-comment-id:1222550148 --> @jaens commented on GitHub (Aug 22, 2022): Try using PulseAudio or PipeWire instead of raw ALSA? PulseAudio has working firejail integration.
Author
Owner

@imxade commented on GitHub (Aug 22, 2022):

Try using PulseAudio or PipeWire instead of raw ALSA? PulseAudio has working firejail integration.

2nd last line

In case of pulseaudio, firejailed firefox plays fine through bluetooth.

<!-- gh-comment-id:1222671973 --> @imxade commented on GitHub (Aug 22, 2022): > Try using PulseAudio or PipeWire instead of raw ALSA? PulseAudio has working firejail integration. 2nd last line > In case of pulseaudio, firejailed firefox plays fine through bluetooth.
Author
Owner

@jaens commented on GitHub (Aug 22, 2022):

If it works with PulseAudio, what's the point of using ALSA? (granting sandboxed programs access to raw audio devices does not seem very security-minded either...)

<!-- gh-comment-id:1222906019 --> @jaens commented on GitHub (Aug 22, 2022): If it works with PulseAudio, what's the point of using ALSA? (granting sandboxed programs access to raw audio devices does not seem very security-minded either...)
Author
Owner

@imxade commented on GitHub (Aug 22, 2022):

granting sandboxed programs access to raw audio devices does not seem very security-minded either

Got it, but still is there any way to get bluealsa working ?

<!-- gh-comment-id:1223238841 --> @imxade commented on GitHub (Aug 22, 2022): > granting sandboxed programs access to raw audio devices does not seem very security-minded either Got it, but still is there any way to get bluealsa working ?
Author
Owner

@kmk3 commented on GitHub (Aug 25, 2022):

@imxade commented on Aug 21:

On NixOS, im using bluez-alsa for bluetooth headset

firejail --noprofile firefox

plays audio through default Bluetooth device

but

firejail firefox

doesn't play audio when default device is a Bluetooth one.

i've whitelisted $HOME & $XDG_RUNTIME_DIR but no luck.

In case of pulseaudio, firejailed firefox plays fine through bluetooth.

how can i get it working with bluez-alsa ?

What is the output of firejail --version?

What is the path to the headset in /dev?

nou2f might be blocking it if it shows up in a path matching /dev/hidraw*
and Firefox tries to access it through that.

Does adding browser-disable-u2f no to /etc/firejail/firejail.config fix it?

If not, try commenting out lines in firefox.profile and firefox-common.profile
to find out what command is blocking it.

<!-- gh-comment-id:1227205278 --> @kmk3 commented on GitHub (Aug 25, 2022): @imxade commented [on Aug 21](https://github.com/netblue30/firejail/issues/5329#issue-1345409752): > On **NixOS**, im using **bluez-alsa** for bluetooth headset > > ``` > firejail --noprofile firefox > ``` > > plays audio through default Bluetooth device > > but > > ``` > firejail firefox > ``` > > doesn't play audio when default device is a Bluetooth one. > > i've whitelisted $HOME & $XDG_RUNTIME_DIR but no luck. > > In case of **pulseaudio, firejailed firefox** plays fine through bluetooth. > > how can i get it working with bluez-alsa ? What is the output of `firejail --version`? What is the path to the headset in /dev? `nou2f` might be blocking it if it shows up in a path matching `/dev/hidraw*` and Firefox tries to access it through that. Does adding `browser-disable-u2f no` to /etc/firejail/firejail.config fix it? If not, try commenting out lines in firefox.profile and firefox-common.profile to find out what command is blocking it.
Author
Owner

@imxade commented on GitHub (Aug 25, 2022):

@kmk3
on adding --ignore=dbus-system, bluetooth device is playing fine.

Is there any better way to achieve the same behavior without sacrificing much security ?

<!-- gh-comment-id:1227507128 --> @imxade commented on GitHub (Aug 25, 2022): @kmk3 on adding ``` --ignore=dbus-system```, bluetooth device is playing fine. Is there any better way to achieve the same behavior without sacrificing much security ?
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#2959
No description provided.