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

[Request]: Easy way to set up audio drivers that work for a chosen Atom #30

Open
WMan22 opened this issue Sep 22, 2022 · 3 comments
Open

Comments

@WMan22
Copy link

WMan22 commented Sep 22, 2022

Tell us the problem or your need

I have a use case where I plan on using Atoms as a way to containerize other distro functions that involve using the MPV Media Player within an Atom for my Steam Deck, which has an immutable filesystem thus I am using this as a flatpak workaround without risking potential instability in my main OS by turning read only off.

It works fine in terms of getting mpv to launch and show video for the functions I want it for, however, said video will not have audio, since the drivers aren't properly set up.

I'm trying out a Fedora atom with nonfree repositories manually enabled to do this since Arch Linux is not a stable option to choose for an atom where I can just archinstall and it'll do most of the work, and tried using sudo dnf install pipewire and sudo dnf install pulseaudio in separate fedora atoms and neither of these did the trick in getting audio working in either of them.

I tried to find some way to RTFM my way out of this situation but couldn't find the information I needed, so now I'm here as a last resort.

Describe the solution you'd like

tl;dr, Can we please get an easy way to pass our host system audio drivers to the Atom we are using, and/or have some kind of GUI checkbox that says "Allow programs/packages to use audio in Atom" if this is possible?

Other solutions?

A video tutorial guide on the Bottles Youtube channel on how to set up audio drivers inside of an Atom

Additional context and references

No response

@javaarchive
Copy link

javaarchive commented Sep 23, 2022

Seems to be as easy as sharing a "file" and authorization cookie kinda like X
https://wiki.archlinux.org/title/PulseAudio#Connection_and_authentication

Since PulseAudio runs as a daemon as the current user, clients needs to know where to find the daemon socket to connect to it as well as a shared random cookie file clients use to authenticate with it. By default, clients should be able to locate the daemon without problem using environment variables, X11 root window properties and finally by trying the default location (unix:/run/user/$ID/pulse/native). However, if you have clients that needs to access PulseAudio outside of your X11 session like mpd running as a different user [or in this case an app running in a containerized/chroot environment], you will need to tell it how to connect to your PulseAudio instance.

@mirkobrombin
Copy link
Member

Interesting, I’ll perform some tests

@WMan22
Copy link
Author

WMan22 commented Sep 23, 2022

Seems to be as easy as sharing a "file" and authorization cookie kinda like X https://wiki.archlinux.org/title/PulseAudio#Connection_and_authentication

Since PulseAudio runs as a daemon as the current user, clients needs to know where to find the daemon socket to connect to it as well as a shared random cookie file clients use to authenticate with it. By default, clients should be able to locate the daemon without problem using environment variables, X11 root window properties and finally by trying the default location (unix:/run/user/$ID/pulse/native). However, if you have clients that needs to access PulseAudio outside of your X11 session like mpd running as a different user [or in this case an app running in a containerized/chroot environment], you will need to tell it how to connect to your PulseAudio instance.

I'm seeing a lot of X11 instructions here, it's a bit unclear in regards to Wayland, where I plan to be using this the most; What I intend to do is going to be using atoms in Steam Deck's game mode to run scripts/packages that involve mpv media player using a fedora or arch based atom.

And it works as intended, it just needs audio passthrough to my system's host drivers and we're golden grams. I just would like to see a GUI checkbox for it is all that says "Allow Atom to use Host System Audio" or something that automates the process so I don't have to type a bunch of extra stuff on a touch screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants