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

Pulseaudio for WSL configuration #10

Open
pawelurbanski opened this issue Aug 29, 2021 · 1 comment
Open

Pulseaudio for WSL configuration #10

pawelurbanski opened this issue Aug 29, 2021 · 1 comment

Comments

@pawelurbanski
Copy link

Dear Patrick,
I am filing this issue after exhausting the following paths to solve my problem:

  • Changing variables one by one and testing the results,
  • Following 2 different threads on the web claiming that sound under WSL works,
  • WSL refers to wWSL2 witth updated Ubuntu 21.04,
  • Reinstalling Pulseaudio from scratch,

If you could help out with a working configuration if you happen to have one or clarify a bit more the following:
What configuration directory is used by the windows service? There are 3 possible places or more, where configuration files can be or are placed:

  • Program files folder with /ebc/...,
  • Program data folder with: pulseaudio mentioned in hte log output,
  • Administrator home folder .config/pulse/,

Which files should be modified to enable TCP protocol and allow connections from WSL. The WSL virtual machine is assigned a local network address from the pool in 172.16.0.0/12 - I found this vale in a few threads on the web.

Last but not least. Any hints about proper configuration on the WSL Linux side besides setting the $PULSE_SERVER environment variable to the assigned IpP address?

Thank you in advance for your time and help...
Pawel

@pgaskin
Copy link
Owner

pgaskin commented Aug 30, 2021

The %PROGRAMFILES(x86)%\PulseAudio\etc\pulse\system.pa.d\ is the correct folder to place the system config fragments. I may add support for loading it from ProgramData later.

For setting the sever from the WSL2 side, based on what I know right now, I recommend adding export PULSE_SERVER="tcp:$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')" to $HOME/.profile, then adding a Windows Firewall rule to allow the WSL2 network to access TCP port 4713. I haven't tested this yet since I don't use WSL2 right now, but it should work fine.

If anyone else is using WSL1, note that you can use the AF_UNIX interop and hardcode the default-server address in /etc/pulse/client.conf to point to the UNIX socket created by PulseAudio.

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

No branches or pull requests

2 participants