Auto-connection requests for plex-desktop

Edit: I was asked to consolidate my requests for this snap into one, so here goes:

  1. alsa - used for audio-passthrough. Pulse and audio-playback is not sufficient, alsa is the only way it seems to work. The lack of proper multiplexing is acknowledged, but likely not an actual issue for the use-case of Plex Desktop (which is media consumption without multitasking).
  2. hardware-observe - Plex Desktop uses Qt, Chromium and libmpv as its core technologies. If this interface is not connected, the application crashes with the following message: pcilib: Cannot open /sys/bus/pci/devices/0000:00:03.1/resource: Permission denied. As far as I can tell, there is nothing I can do to avoid this requirement, apart from ditching Chromium (but I’m open to suggestions).

@reviewers can I get an update on this? (and my other requests)

Can you please provide more details about what this is doing and why pulseaudio and hence audio-playback is not sufficient?

Also instead of auto-connecting alsa you could use something like instead - which redirects via pulseaudio and can support the use of alsa still if required by prompting the user at startup to connect this interface themselves.

I’m +1 on this one. As Tamas has already explored the pulseaudio and audio-playback interfaces, this might be the most convenient solution, and it aligns with the core functionality of the snap. However, if there is a bug on the snapd side, we should discuss that separately.

1 Like

Audio passthrough is about passing the audio stream directly to the receiver hardware in order to perform decoding (i.e. it’s not the Plex HTPC/Desktop client that does the decoding).

I asked one of our team members for a clarification why this doesn’t seem to work with Pulse and this is what he answered:

  • Passthrough of HD audio codecs doesn’t work properly in pulseaudio. Even after trying experimental newer versions that what shipped with Ubuntu 20.04 it still fails.
  • It upconverts channels incorrectly. If you have a 7.1 system and thus configure PA with 7.1, then play content that’s in stereo, it will map that stereo into 7.1 and do so very badly. It sounds horrendous.

With ALSA, if you play something that’s in stereo, it sends only that stereo to the AVR and the AVR will do it’s Dolby ProLogic (or whatever) as it is supposed to do. I mentioned this in my blog post about it here:

FWIW, it might work in some setups, but we weren’t able to find one where it does.

@reviewers as requested, I consolidated my requests into one topic (see the edited first post).

(adding random words to circumvent discourse spam detection :man_facepalming:)

@reviewers can I please get an update on this?

+1 from me both for alsa and hardware-observe.

1 Like

+1 from me as well for auto-connect both alsa and hardware-observe to plex-desktop due to the explanation provided. +2 votes for, 0 votes against, granting the requested auto-connections. This is now live.

@tamas: could you please report a bugs to pulseaudio detailing the issues your team is experiencing (and maybe describing your setups to be able to reproduce them)? Thanks!

1 Like

@tamas also, as clarified here I have not granted raw-usb as originally requested. Thanks!

1 Like

Thanks! I’ll ask the team to follow up. Is this the right place to report them?