Summary: | [GTK][Stable] When using wayland webkit wants to take over the alsa device | ||
---|---|---|---|
Product: | WebKit | Reporter: | Haelwenn (lanodan) Monnier <contact+bugs.webkit.org> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | bugs-noreply, pnormand |
Priority: | P2 | ||
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Haelwenn (lanodan) Monnier
2020-04-07 02:23:06 PDT
These issues don't happen when you use gst-play-1.0 ? (In reply to Philippe Normand from comment #1) > These issues don't happen when you use gst-play-1.0 ? Yeah, they're specific to webkit as far as I can tell. I don't understand... In WebKit we don't have any specific audio sink yet. Relying directly on ALSA is a bit old-school. Any chance you could switch to... Pulseaudio? (In reply to Philippe Normand from comment #3) > I don't understand... In WebKit we don't have any specific audio sink yet. > > Relying directly on ALSA is a bit old-school. Any chance you could switch > to... Pulseaudio? Nah, in my experiences pulseaudio has been a major pain in the last ten years, from general stability issues to a configuration so large you can end up without sound for a number of reasons that only seems to grow over the years. ALSA has occasional issues like this one but they can be (hot)fixed quite quickly. Cool. If you want to debug this, you're welcome to. I found a fix to make it work. The reason is from the usage of `--unshare-ipc` in the bubblewrap sandbox when wayland is used which I tried at first with these two commands: $ bwrap --proc /proc --dev /dev --ro-bind $PWD/theday.wav{,} --ro-bind /lib64{,} --ro-bind /bin{,} --ro-bind /usr{,} --ro-bind /etc/asound.conf{,} --dev-bind /dev/dsp{,} --dev-bind-try /dev/snd/{,} --ro-bind /etc{,} --unshare-ipc aplay theday.wav ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.2-r1/work/alsa-lib-1.2.2/src/pcm/pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave aplay: main:830: audio open error: Device or resource busy $ bwrap --proc /proc --dev /dev --ro-bind $PWD/theday.wav{,} --ro-bind /lib64{,} --ro-bind /bin{,} --ro-bind /usr{,} --ro-bind /etc/asound.conf{,} --dev-bind /dev/dsp{,} --dev-bind-try /dev/snd/{,} --ro-bind /etc{,} aplay theday.wav Playing WAVE 'theday.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo And I tested it against WebKitGTK with applying the following patch: diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp --- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp @@ -797,7 +797,7 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces #if PLATFORM(WAYLAND) && USE(EGL) if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland) { bindWayland(sandboxArgs); - sandboxArgs.append("--unshare-ipc"); + //sandboxArgs.append("--unshare-ipc"); } else #endif bindX11(sandboxArgs); |