Skip to contentSkip to conversation

pipewire etc

DISCUSSION Russell Coker 4 participants 7 messages Jun 27 – Jul 19

lore
Share & tools
lore
#0 lore raw

Why do we need different policies for alsa, pipewire, and pulseaudio? They all do the same things, why not just have an audioserver policy that supports all of them?

Why do we need an ifdef for server vs user operation of pipewire? Why not just have a policy with a pipewire_t for the system daemon and pipewire_user_t for the user process?

https://wiki.archlinux.org/title/
PipeWire#Sharing_audio_devices_with_computers_on_the_network

For people wondering as I did why we even need a pipewire_user_t domain, the above section of the Arch Wiki documents sharing audio via Airplay and RTP among others - definitely need that isolated!

Is a pipewire_client_t domain just for the test program really useful?

It looks like the policy is well structured and replacing the cruft from years of support of alsa and pulseaudio is a good thing. So I think we should go all the way and delete the separate policy for the old sound servers.

Signature · 2 lines
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/
#1 lore raw
Quoted 3 lines · Russell Coker

Why do we need different policies for alsa, pipewire, and pulseaudio? They all do the same things, why not just have an audioserver policy that supports all of them?

Why change now? Pulseaudio has a troublesome past and design and supporting that would affect the quality of the pipewire domain. Some of the issues with pa may have improved over time but then the question is where to draw the line with regards to compatibility.

Quoted 4 lines

Why do we need an ifdef for server vs user operation of pipewire? Why not just have a policy with a pipewire_t for the system daemon and pipewire_user_t for the user process?

https://github.com/SELinuxProject/refpolicy/pull/1109

In theory your suggestion is prettiest but it is probably debatable whether its worth the extra work. Running pipewire as a system service is fairly unusual and I do suspect that the two scenarios are mutually exclusive any way.

Quoted 13 lines

https://wiki.archlinux.org/title/
PipeWire#Sharing_audio_devices_with_computers_on_the_network

For people wondering as I did why we even need a pipewire_user_t domain, the above section of the Arch Wiki documents sharing audio via Airplay and RTP among others - definitely need that isolated!

Is a pipewire_client_t domain just for the test program really useful?

It looks like the policy is well structured and replacing the cruft from years of support of alsa and pulseaudio is a good thing. So I think we should go all the way and delete the separate policy for the old sound servers.

Signature · 4 lines
gpg --auto-key-locate clear,nodefault,wkd --locate-external-keys [email protected]
Key fingerprint = FCD2 3660 5D6B 9D27 7FC6  E0FF DA7E 521F 10F6 4098
Dominick Grift
Mastodon: @[email protected]
#2 lore raw
In reply to Russell Coker
Quoted 3 lines · Russell Coker

Why do we need different policies for alsa, pipewire, and pulseaudio? They all do the same things, why not just have an audioserver policy that supports all of them?

Can we add wireplumber to this, too? Before the (very) new pipewire_t domain, I put pipewire and wireplumber into the pulseaudio_t domain, and it needed minimal extra permission to work.

Quoted 11 lines

Why do we need an ifdef for server vs user operation of pipewire? Why not just have a policy with a pipewire_t for the system daemon and pipewire_user_t for the user process?

https://wiki.archlinux.org/title/
PipeWire#Sharing_audio_devices_with_computers_on_the_network

For people wondering as I did why we even need a pipewire_user_t domain, the above section of the Arch Wiki documents sharing audio via Airplay and RTP among others - definitely need that isolated!

Quoted 6 lines

Is a pipewire_client_t domain just for the test program really useful?

It looks like the policy is well structured and replacing the cruft from years of support of alsa and pulseaudio is a good thing. So I think we should go all the way and delete the separate policy for the old sound servers.

Related:

I've modified this (and am trying to get cleaned up for up-streaming) an attribute pipewire_client that mirrors the pulseaudio_client attribute. Is there a reason to prefer the many pipewire_{stream_connect,rw_stream_sockets,etc.} macros vs something like pipewire_client_domain() ?

Antonio

#3 lore raw

Related (and somewhat in opposition to the suggestion of this thread):
I have some changes [1] to the new pipewire domain that get this working.

As I stated there, I don't have a strong opinion about whether there should be one or multiple domains. However, the current state of refpolicy doesn't work on the desktop, and that MR at least starts getting it working for me.

[1] https://github.com/SELinuxProject/refpolicy/pull/1171

#4 lore raw
Quoted 7 lines · Antonio Russo

Related (and somewhat in opposition to the suggestion of this thread):
I have some changes [1] to the new pipewire domain that get this working.

As I stated there, I don't have a strong opinion about whether there should be one or multiple domains. However, the current state of refpolicy doesn't work on the desktop, and that MR at least starts getting it working for me.

FWIW, I did try to raise concerns about the quality of it, and Rahul did in stronger terms as well. There's been a recent flurry of PRs from a specific set of contributors but I am not sure they have always been properly tested.

Quoted 3 lines

[1] https://github.com/SELinuxProject/refpolicy/pull/1171

sam

#5 lore raw
Quoted 4 lines · On Tuesday, 30 June 2026 17:00:42 AEST Sam James wrote:

FWIW, I did try to raise concerns about the quality of it, and Rahul did in stronger terms as well. There's been a recent flurry of PRs from a specific set of contributors but I am not sure they have always been properly tested.

https://github.com/SELinuxProject/refpolicy/pull/1172

I've sent a PR for this. I'm currently working on a bunch of issues related to SDDM graphical logins without an unconfined module loaded. With this patch Pipewire may work in some situations less confined than what I'm working on.

Signature · 2 lines
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/
#6 lore raw
In reply to Antonio Russo
Quoted 5 lines · On Saturday, 27 June 2026 23:38:36 AEST Antonio Russo wrote:

I've modified this (and am trying to get cleaned up for up-streaming) an attribute pipewire_client that mirrors the pulseaudio_client attribute. Is there a reason to prefer the many pipewire_{stream_connect,rw_stream_sockets,etc.} macros vs something like pipewire_client_domain() ?

I think something like an audio_client attribute combined with booleans for audio domains that require more permissions would be better.

Signature · 2 lines
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/