Jump to content

No sound in 0AD Flatpak build


abdorable2016
 Share

Recommended Posts

Hi all,

I'm running Fedora 37 Workstation. I installed 0AD from Flathub (Flatpak) version 26. The game runs and I can start a game and change settings, but the sound isn't working.

I looked into the sound settings in Gnome while the game is running, and I see "pyrogenesis" in the list of apps with sound output (see attached screenshot).

I ran it from the terminal, and I see the following lines in the output:

[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
Sound: AlcInit success, using OpenAL Soft

Fedora uses Pipewire (with PulseAudio support) by default, and OpenAL-soft is installed.

I checked the Flatpak permissions, and they are set properly.

I was told that SuperTux also uses OpenAL-soft, so I installed it from flathub, and the sound is working without issues. I double-checked the permissions and compared the two; all set correctly, so this is definitely not a permissions issue, and ALSoft works normally from Flatpaks.

I installed 0AD rpm package (same version) from the Fedora repo, and it's working without issues. I also noticed that this build has a much better performance.

 

This is most likely a bug in the Flatpak build of 0AD. Can anyone try to reproduce ?

 

 

Screenshot from 2022-11-16 01-05-22.png

Link to comment
Share on other sites

@abdorable2016Thanks for posting this bug report. I remember our conversation on IRC about this.

Is it true that the native package of 0ad does not have the error messages, "Failed to set real-time priority for thread" in its log output?  Real-time priority tends to be associated with the "jack" audio system. Does supertux within the Flatpak sandbox have that error message in its output or logs?

Do you have ONLY pipewire-pulse, and NOT for example pipewire-alsa or pipewire-jack, installed both natively and in the flatpak sandbox?

A hypothesis: maybe in the Flatpak sandbox, pipewire is connecting to jack successfully and sending audio to jack, but jack isn't configured properly, so you don't hear audio. Consider uninstalling jack and pipewire-jack or else configuring jack correctly. This seems to conflict with the fact that supertux audio works in the Flatpak sandbox, but it's a good thing to check anyway.

Also, you can try the advice that I wrote in the 0 A.D. FAQ about audio troubleshooting (scroll down to "No sound, no audio, or 0 A.D. is the only app with sound "). Try bypassing pipewire and configuring openal to output audio directly to pulse. You might even try configuring it to output audio directly to alsa, but be aware that by default alsa usually only allows one process to output audio unless you use the dmix output device.

For ideas on reproducing the symptoms, try to temporarily configure your native system to match the audio subsystem configuration of the Flatpak sandbox. That is, try to get the error messages about real-time priority to appear during 0ad startup, probably by installing the same subsystem packages as in the Flatpak sandbox, such as pipewire-jack and jackd, and by configuring jack the same (probably wrong) way. If you then don't get audio output in the native system with 0ad then that's an important clue.

And, sandbox permissions are different from Unix filesystem permissions. How did you check the permissions? And, you've read through this article on pipewire to get troubleshooting ideas? "PipeWire also supports containers like Flatpak and does not rely on the audio and video user groups. Instead, it uses a Polkit-like security model, asking Flatpak or Wayland for permission to record screen or audio." If the Flatpak sandbox is anything like firejail then the permissions are application-specific, configured in system-level and user-level config files named according to the application. This hypothesis would be consistent with supertux audio working in the Flatpak sandbox, but 0ad audio not working.

Edited by Norse_Harold
Link to comment
Share on other sites

Hi @Norse_Harold,

Thank you for caring.

 

The rpm package that comes from Fedora runs without issues and doesn't show this error (It also has better performance).

SuperTux flatpak runs without issues, and this error doesn't appear.

Today, I installed WarZone2100 (net.wz2100.wz2100) from Flathub, and I experienced this exact same issue (no audio, and same error message).

 

This could be related to the Flatpak builds, or my Fedora configuration. If anyone can try to reproduce on other distros, that would be helpful.

 

Regarding your question: I check Flatpak permissions using an app called "Flatseal".

 

Looking for Jack on my system:

#dnf list -C *jack*
Last metadata expiration check: 3:15:23 ago on Thu 24 Nov 2022 12:51:06 PM EET.
Installed Packages
pipewire-jack-audio-connection-kit.x86_64                                                 0.3.60-5.fc37                                                         @updates
qemu-audio-jack.x86_64   

Trying to uninstall either would remove so many things (including ffmpeg and some virtualization packages).

 

I never mess with audio in my distro (if it's not broken, don't fix it! :D ), so my experience with these things is almost /dev/null :D. I'll look into these details/links tomorrow, but no promises, as I don't want to break my main setup. I'll let you know if I have any updates. Meanwhile, any attempt to reproduce is much appreciated.

 

Thanks again, and have a great day! :)

Edited by abdorable2016
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...