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

No audio #29

Open
lduguid opened this issue Apr 22, 2021 · 8 comments
Open

No audio #29

lduguid opened this issue Apr 22, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@lduguid
Copy link

lduguid commented Apr 22, 2021

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1
Your Distribution version: Release:        16.04
Your WSLg version: 1.0.17.1

Steps to reproduce

install vlc - sudo apt install vlc -y
vlc

VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
shm_open() failed: No such file or directory
[00000000013a9dd8] pulse audio output error: PulseAudio server connection failure: Protocol error
[00000000012af148] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
QObject::~QObject: Timers cannot be stopped from another thread
luke@duskwood:~$ uname -a
Linux duskwood 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

WSL logs:

  • Attach WSLg logs from /mnt/wslg

You can access the wslg logs using explorer at: \\wsl\<Distro-Name>\mnt\wslg (eg: \\wsl\Ubuntu-20.04\mnt\wslg)

  • puseaudio.log
    *E: [pulseaudio] module-console-kit.c: GetSessionsForUnixUser() call failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
    E: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.
    E: [rdp-sink] module-rdp-sink.c: RDP Sink - Trying to connect to /mnt/wslg/PulseAudioRDPSink
    E: [rdp-sink] module-rdp-sink.c: RDP Sink - Connected to fd 19

  • weston.log
    weston.log

  • versions.txt
    WSLg ( x86_64 ): 1.0.17+3.Branch.master.Sha.a526dfd5ad03d126bb2d8c528f6c3563e86a40da
    Mariner: VERSION="1.0.20210224"
    FreeRDP: e4a2fc2053bd8c5f99455fcd08ffee7e5591567a
    weston: fd961f5cd116c9358d82ce94d139c1578e21bd00
    pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
    mesa:

Expected behavior

Actual behavior

@lduguid lduguid added the bug Something isn't working label Apr 22, 2021
@klllr
Copy link

klllr commented Apr 22, 2021

Fixed the same problem on my WSL/Arch by deleting the existing PULSE_SERVER environment variable from my .zshrc and reloading the shell.

@PhyX-Meow
Copy link

Works fine here in WSL/Manjaro after deleting the existing PULSE_SERVER environment variable

@spronovo
Copy link
Collaborator

We run our PulseAudio server in the system distro on a socket shared back to your user distro located at /mnt/wslg/PulseServer. As part of WSL init and before your distro start up, we pre-initialize PULSE_SERVER environment variable to reference that location. If you have setting that override that environment variable, it will break audio.

If you restore it as below, audio should start working again (you'll have to restart the app too i believe).

export PULSE_SERVER=/mnt/wslg/PulseServer

So you'll want to avoid changing the value of PULSE_SERVER that we prepopulate, so the suggestion above of removing that this variable from things like your .zshrc are correct.

@lduguid
Copy link
Author

lduguid commented Apr 22, 2021

Thanks you both for the update, however, while good to know, I do not believe that is my particular issue;

luke@duskwood:~$ env | grep PULSE
PULSE_SERVER=/mnt/wslg/PulseServer
luke@duskwood:~$ vlc
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
shm_open() failed: No such file or directory
[0000000002194dd8] pulse audio output error: PulseAudio server connection failure: Protocol error
[000000000209a148] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

It looks like the env PULSE_SERVER has been set correctly and no other attempts to changes it that I can find in various startup scripts etc. However, as you can see pulse audio still appears to be failing. Let me know if more info can help with the diagnosing etc.

Cheers,

@spronovo
Copy link
Collaborator

@lduguid what WSL distro are you using? Does audio work in other app, like say firefox? Or broken across the board?

@lduguid
Copy link
Author

lduguid commented Apr 24, 2021

At the time it was Ubuntu 16.04. I also tested firefox and navigated to youtube, also no sound. I did not capture the errors with firefox at the time. Unfortunately, yesterday I required this laptop for some work related tasks and as the dev windows preview was a little unstable in other respects (non-wsl related) and slow, I reverted back to Microsoft Windows [Version 10.0.19042.928] for now. I will get back to testing this in about a weeks time. I also have Ubuntu 20.x on that machine, I will test with it as well. If there are new insights I will comment here. Thanking you.

@WMRamadan
Copy link

WMRamadan commented Jul 14, 2021

Had this problem with Debian on WSL2 using wslg, no audio was coming from firefox or google-chrome.

It was simply fixed by installing pulseaudio "sudo apt intsall pulseaudio"

@jiaqi228
Copy link

jiaqi228 commented Apr 8, 2023

It was simply fixed by installing pulseaudio "sudo apt intsall pulseaudio"

Fixed this problem with "yay pulseaudio" on Arch.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants