Flatpak: No audio sound in Flatpak apps when using pulseaudio in system-wide daemon mode

Created on 21 Jun 2018  路  4Comments  路  Source: flatpak/flatpak

I have use pulseaudio in system-wide daemon mode (with --daemonize argument following this manual) in my Ubuntu Linux system.

All other native apps (not installed via Flatpak) works well with audio sound, but Flatpak apps have no sound, here is my report in Nuvola Apps issue tracker about this - there are no music playing. Same problem is with Rhythmbox app, installed via Flatpak and other Flatpak apps.

So seems this is not per-app issue, but have source in Flatpak.

Linux distribution and version: Ubuntu 16.04 - 18.04
Flatpak version: 0.11.7-0ubuntu0.1

Steps to reproduce

  1. Install any Flatpak audio app and try to hear sound.
  2. Change pulseaudio daemon from per-user to system-wide via this manual or any other way.
  3. Try to hear sound from any Flatpak app - it will disappear.
  4. Revert back to per-user pulseaudio daemon - sound will be back.

Most helpful comment

After retesting it turns out that this does in fact work, but the envvar must be in the special unix:/var/something/something format that PA expects. So the following seems to work:

PULSE_SERVER=unix:/var/foo/bar flatpak run com.example.app

All 4 comments

Does this work if you point the PULSE_SERVER env var to the pulse socket?

Where should that be put? At least running PULSE_SERVER=/var/run/pulse/something flatpak run ... did not work.

After retesting it turns out that this does in fact work, but the envvar must be in the special unix:/var/something/something format that PA expects. So the following seems to work:

PULSE_SERVER=unix:/var/foo/bar flatpak run com.example.app

PULSE_SERVER=/var/run/pulse/native flatpak run org.pulseaudio.pavucontrol

The org.pulseaudio.pavucontrol say:

Connection to PulseAudio failed. Automatic retry in 5s
In this case this is likely because PULSE_SERVER in the Environment/X11 Root Window Properties or default-server in client.conf is misconfigured.

PulseAudio run in system-wide mode.
Ubuntu 18.04.

Was this page helpful?
0 / 5 - 0 ratings