Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pipewire permissions #315

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Add pipewire permissions #315

merged 1 commit into from
Jan 10, 2025

Conversation

viachaslavic
Copy link
Contributor

Should fix #314

@flathubbot
Copy link

Started test build 172578

@@ -15,6 +15,7 @@
"--device=all",
"--filesystem=host",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related, do you think we should split up the host permission here? I'm open to any permissions to make it align with other flatpak standards.

@RobLoach RobLoach marked this pull request as ready for review January 7, 2025 16:32
@viachaslavic
Copy link
Contributor Author

Yes, now we have the package compiled with the library and, as a result, pipewire available in the menu, but without permission to the system service, which is accessible via the socket.

host does not grant permission to the $XDG_RUNTIME_DIR. https://docs.flatpak.org/en/latest/sandbox-permissions.html#filesystem-access. There's probably a more universal solution without hardcoding the socket name, but I don't know. I've seen this trick in other projects like obs-studio.

@flathubbot
Copy link

Build 172578 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/155699/org.libretro.RetroArch.flatpakref

@viachaslavic
Copy link
Contributor Author

viachaslavic commented Jan 7, 2025

Build 172578 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/155699/org.libretro.RetroArch.flatpakref

@zephyroths could you, please, test if this build solves the issue on your PC?

UPD: I can reproduce the issue on my VM with fedora 40. This PR solves it.

@zephyroths
Copy link

Build 172578 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/155699/org.libretro.RetroArch.flatpakref

@zephyroths could you, please, test if this build solves the issue on your PC?

UPD: I can reproduce the issue on my VM with fedora 40. This PR solves it.

it works. but when I played some games using pipewire another issue appears, the audio seems to be speed up. It didn't happen with different audio drivers.

@viachaslavic viachaslavic mentioned this pull request Jan 8, 2025
13 tasks
@viachaslavic
Copy link
Contributor Author

it works. but when I played some games using pipewire another issue appears, the audio seems to be speed up. It didn't happen with different audio drivers.

Thank you! Indeed, the implementation of the driver still needs to be improved. The speed up issue you've noticed likely affects all build types, not just flatpak.

Among the ones I've noticed are workarounds by changing additional options:

  • If threaded video is enabled, then need to additionally enable Sync to Exact Content Framerate
  • For the DOSBox-pure core enable Irregular latency in the Emulation core options.

@albertescanes
Copy link

Just a suggestion: I think the :ro option is enough to allow access to the PipeWire socket:
--filesystem=xdg-run/pipewire-0:ro

I've seen many other manifests with this option, and it seems to work.

@RobLoach
Copy link
Collaborator

Good to merge, then?

@viachaslavic
Copy link
Contributor Author

Yup

@RobLoach RobLoach merged commit 3bcb1f7 into flathub:master Jan 10, 2025
1 check passed
@viachaslavic viachaslavic deleted the pipewire branch January 10, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pipewire issue in version 1.20.0
5 participants