[GH-ISSUE #2037] Machine-ID breaks Pulseaudio #1374

Closed
opened 2026-05-05 07:57:57 -06:00 by gitea-mirror · 13 comments
Owner

Originally created by @Futureknows on GitHub (Jul 11, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2037

This was discussed but a solution isn't clear.
--machine-id flag breaks Pulseaudio so no sound in Tor-browser and other firejails.
Turning off MID spoofing exposes the persistent machine-id (hardware fingerprint) inside the sandbox.
We are running Pulseaudio 11.1 and this issue persists.
Is there a current solution?

Originally created by @Futureknows on GitHub (Jul 11, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/2037 This was discussed but a solution isn't clear. --machine-id flag breaks Pulseaudio so no sound in Tor-browser and other firejails. Turning off MID spoofing exposes the persistent machine-id (hardware fingerprint) inside the sandbox. We are running Pulseaudio 11.1 and this issue persists. Is there a current solution?
Author
Owner

@Vincent43 commented on GitHub (Jul 11, 2018):

In which profile machine-id breaks Pulseaudio? It works for me in firefox.

<!-- gh-comment-id:404310285 --> @Vincent43 commented on GitHub (Jul 11, 2018): In which profile `machine-id` breaks Pulseaudio? It works for me in firefox.
Author
Owner

@Futureknows commented on GitHub (Jul 11, 2018):

Tor-Browser-Launcher, Brave, Firefox, Chromium pretty much every firejail I launch with --machine-id.

<!-- gh-comment-id:404312725 --> @Futureknows commented on GitHub (Jul 11, 2018): Tor-Browser-Launcher, Brave, Firefox, Chromium pretty much every firejail I launch with --machine-id.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 11, 2018):

I don't even have /etc/machine-id available in many of my personal profiles (I use private-etc filters in many of them), and sound hasn't broken for me yet.

What do you get if you put in a private-etc filter leaving out machine-id. For example, this is the one I use with my firefox profile: private-etc hosts,passwd,mime.types,fonts,mailcap,firefox,xdg,gtk-3.0,X11,pulse,alternatives,localtime,nsswitch.conf (you might also need resolv.conf in there depending on your setup).

<!-- gh-comment-id:404312965 --> @chiraag-nataraj commented on GitHub (Jul 11, 2018): I don't even _have_ `/etc/machine-id` available in many of my personal profiles (I use `private-etc` filters in many of them), and sound hasn't broken for me yet. What do you get if you put in a `private-etc` filter leaving out `machine-id`. For example, this is the one I use with my `firefox` profile: `private-etc hosts,passwd,mime.types,fonts,mailcap,firefox,xdg,gtk-3.0,X11,pulse,alternatives,localtime,nsswitch.conf` (you might also need `resolv.conf` in there depending on your setup).
Author
Owner

@Vincent43 commented on GitHub (Jul 12, 2018):

Both Chromium and Firefox have sound working while using machine-id on Archlinux and KDE for me. What distro and desktop environment are you using?

<!-- gh-comment-id:404347461 --> @Vincent43 commented on GitHub (Jul 12, 2018): Both Chromium and Firefox have sound working while using `machine-id` on Archlinux and KDE for me. What distro and desktop environment are you using?
Author
Owner

@Futureknows commented on GitHub (Jul 12, 2018):

I didn't add --machine-id to any profile. I'm issuing firejail commands as documented firejail --machine-id firefox. Any time I include --machine-id I lose Pulseaudio in any Browser (Chromium, Brave, Firefox, Tor).
Current Fedora 28 with Cinnamon but I am seeing similar issue on Mint 18.3.

I'm going to figure out private-etc and report back.
Thanks!

<!-- gh-comment-id:404352445 --> @Futureknows commented on GitHub (Jul 12, 2018): I didn't add `--machine-id `to any profile. I'm issuing firejail commands as documented `firejail --machine-id firefox`. Any time I include `--machine-id ` I lose Pulseaudio in any Browser (Chromium, Brave, Firefox, Tor). Current Fedora 28 with Cinnamon but I am seeing similar issue on Mint 18.3. I'm going to figure out private-etc and report back. Thanks!
Author
Owner

@Vincent43 commented on GitHub (Jul 12, 2018):

I didn't add --machine-id to any profile. I'm issuing firejail commands as documented firejail --machine-id firefox

It doesn't matter. It has same effect.

<!-- gh-comment-id:404488844 --> @Vincent43 commented on GitHub (Jul 12, 2018): > I didn't add --machine-id to any profile. I'm issuing firejail commands as documented firejail --machine-id firefox It doesn't matter. It has same effect.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 15, 2018):

@Futureknows Did you test the private-etc filter? I've turned on machine-id on all of my (personal) profiles with no issues so far. What exactly is your pulseaudio setup? Is it the default/standard setup? Did you make any changes?

<!-- gh-comment-id:405112885 --> @chiraag-nataraj commented on GitHub (Jul 15, 2018): @Futureknows Did you test the `private-etc` filter? I've turned on `machine-id` on all of my (personal) profiles with no issues so far. What exactly is your `pulseaudio` setup? Is it the default/standard setup? Did you make any changes?
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 15, 2018):

(Also, btw, machine-id is useful even if you use a private-etc filter, since the machine ID is also available at /var/lib/dbus/machine-id which is also spoofed by firejail)

<!-- gh-comment-id:405112969 --> @chiraag-nataraj commented on GitHub (Jul 15, 2018): (Also, btw, `machine-id` is useful _even_ if you use a `private-etc` filter, since the machine ID is also available at `/var/lib/dbus/machine-id` which is also spoofed by `firejail`)
Author
Owner

@netblue30 commented on GitHub (Jul 15, 2018):

--machine-id flag breaks Pulseaudio so no sound in Tor-browser and other firejails.

Somehow pulseaudio ends up reading /etc/machine-id and it will refuse to start if it doesn't find it. Also some part of the dbus code might read it. I don't know why they do that. I'll have to try Arch, maybe they removed it, see @Vincent43 comment above.

<!-- gh-comment-id:405117186 --> @netblue30 commented on GitHub (Jul 15, 2018): > --machine-id flag breaks Pulseaudio so no sound in Tor-browser and other firejails. Somehow pulseaudio ends up reading /etc/machine-id and it will refuse to start if it doesn't find it. Also some part of the dbus code might read it. I don't know why they do that. I'll have to try Arch, maybe they removed it, see @Vincent43 comment above.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 15, 2018):

The same is true for me on Debian - I can get away without having pulse read the machine ID.

<!-- gh-comment-id:405117304 --> @chiraag-nataraj commented on GitHub (Jul 15, 2018): The same is true for me on Debian - I can get away without having pulse read the machine ID.
Author
Owner

@Futureknows commented on GitHub (Jul 16, 2018):

I didn't make any changes to Pulseaudio, it is the default install from Fedora 28 Cinnamon which must have just recently been updated to 12.0, it was 11.1. It is persistent across all apps, I don't get Pulseaudio output from Rhythmbox, VLC or anything firejailed with --machine-id.

I noticed a dbus error when --machine-id is present:


(rhythmbox:10): dbind-WARNING **: 17:04:26.792: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-BqrQlHOiVH: Connection refused

(rhythmbox:10): Rhythmbox-WARNING **: 17:04:27.302: Unable to grab media player keys: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon.MediaKeys was not provided by any .service files

When I enable private-etc (removing comment firefox-common.profile it breaks my networking in Firefox.


"Secure Connection Failed
An error occurred during a connection to travis-ci.org. security library failure. Error code: SEC_ERROR_LIBRARY_FAILURE "
<!-- gh-comment-id:405128342 --> @Futureknows commented on GitHub (Jul 16, 2018): I didn't make any changes to Pulseaudio, it is the default install from Fedora 28 Cinnamon which must have just recently been updated to 12.0, it was 11.1. It is persistent across all apps, I don't get Pulseaudio output from Rhythmbox, VLC or anything firejailed with --machine-id. I noticed a dbus error when --machine-id is present: ``` (rhythmbox:10): dbind-WARNING **: 17:04:26.792: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-BqrQlHOiVH: Connection refused (rhythmbox:10): Rhythmbox-WARNING **: 17:04:27.302: Unable to grab media player keys: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon.MediaKeys was not provided by any .service files ``` When I enable private-etc (removing comment firefox-common.profile it breaks my networking in Firefox. ``` "Secure Connection Failed An error occurred during a connection to travis-ci.org. security library failure. Error code: SEC_ERROR_LIBRARY_FAILURE " ```
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 16, 2018):

Huh...you probably need ca-certificates and ca-certificates.conf I guess? That's weird that I don't end up require it...
[edit] never mind...hold on. At least on my system, the certificates are in /usr/share/ca-certificates. If your system is different, you may need to also include ca-certificates in your private-etc predicate.

<!-- gh-comment-id:405131947 --> @chiraag-nataraj commented on GitHub (Jul 16, 2018): Huh...you probably need `ca-certificates` and `ca-certificates.conf` I guess? That's weird that I don't end up require it... [edit] never mind...hold on. At least on my system, the certificates are in `/usr/share/ca-certificates`. If your system is different, you may need to also include `ca-certificates` in your `private-etc` predicate.
Author
Owner

@Futureknows commented on GitHub (Jul 16, 2018):

Incidentally the problem was similar on my Mint machine and although private-etc doesn't break networking Pulseaudio was still blocked by machine-id.

After digging I applied an older solution
echo "enable-shm = no" >> ~/.config/pulse/client.conf"
In addition I applied the same to daemon.conf:
echo "enable-shm = no" >> ~/.config/pulse/daemon.conf"

Now audio works along with machine-id everywhere.
I noticed if I add machine-id to globals.local for some reason I lose Pulseaudio again.
If I launch it per instance --machine-id then it works perfect.

<!-- gh-comment-id:405378451 --> @Futureknows commented on GitHub (Jul 16, 2018): Incidentally the problem was similar on my Mint machine and although private-etc doesn't break networking Pulseaudio was still blocked by machine-id. After digging I applied an older solution `echo "enable-shm = no" >> ~/.config/pulse/client.conf"` In addition I applied the same to daemon.conf: `echo "enable-shm = no" >> ~/.config/pulse/daemon.conf"` Now audio works along with machine-id everywhere. I noticed if I add machine-id to globals.local for some reason I lose Pulseaudio again. If I launch it per instance --machine-id then it works perfect.
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#1374
No description provided.