Closed crisperit closed 2 months ago
Actually, you donot need starting pulseaudio
to hear the sound.
There is one pulseaudio
running in WSL system distro, and having export a pulse socket as /mnt/wslg/PulseServer
, just use that.
You can check the env vars and files:
$ env | grep -E "PULSE|XDG"
XDG_RUNTIME_DIR=/run/user/1000/
PULSE_SERVER=unix:/mnt/wslg/PulseServer
$ ls -l /mnt/wslg/PulseServer
srwxrwxrwx 1 user1 user1 0 4-12 22:36 /mnt/wslg/PulseServer
$ ls -l /run/user/1000/pulse/
lrwxrwxrwx 1 user1 user1 34 4-12 22:36 native -> /mnt/wslg/runtime-dir/pulse/native
lrwxrwxrwx 1 user1 user1 31 4-12 22:36 pid -> /mnt/wslg/runtime-dir/pulse/pid
Ok - right it seems that pulseaudio installation on mine Ubuntu22 distro has overwritten the symbolic link for /run/user/1000/pulse/native
I've removed pulseaudio via
sudo apt-get remove pulseaudio
Then I've restarted the WSL via
wsl --shutdown
And finally I've added the missing symbolic link
sudo ln -f -s /mnt/wslg/runtime-dir/pulse/native /run/user/1000/pulse/native
Now all works fine - thanks @viruscamp!
sudo ln -f -s /mnt/wslg/runtime-dir/pulse/native /run/user/1000/pulse/native
You should not use sudo
Windows build number:
10.0.22631.3374
Your Distribution version:
22.04
Your WSL versions:
Steps to reproduce:
I'm just calling
pulseaudio
in the terminal which results inWSL logs:
weston.log pulseaudio.log stderr.log
WSL dumps:
No response
Expected behavior:
Pulseaudio opens and it is possible to hear the sound out of the WSL apps like Firefox
Actual behavior:
In a fresh installation which I've done through Microsoft Store I believe the sound was working - not sure what has changed that valid behavior