[Sway] Sharing microphone with GDK_BACKEND=wayland exits with channel error
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: imyxhuang, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: wayland)
Attachments
(1 file)
258.44 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Steps to reproduce:
Using Nightly 80.0a1 (2020-07-21) (64-bit) on Wayland (Swaywm) on Arch Linux with pulseaudio:
0. ensure that GDK_BACKEND=wayland is set (is NOT reproducible with GDK_BACKEND=x11, even on wayland);
- visit any site that asks to use the microphone (e.g. hangouts.google.com, or mozilla.github.com/webrtc-landing/gum_test.html);
- click "allow" when prompted;
- observe that Firefox exits.
Actual results:
Surprisingly, Firefox does not attempt to ask me to submit a crash report, nor does the crash show in about:crashes. The only information I've been able to glean through GDB (though I don't have debug symbols) is the same information that I get from running Firefox from a terminal:
$ ./firefox-nightly/firefox/firefox -P secondary
Gdk-Message: 17:56:48.925: Error 71 (Protocol error) dispatching to Wayland display.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Expected results:
I would expect the microphone to work on Wayland. In fact, I'm pretty sure this is a regression as I didn't notice it before and it's prevalent on a brand new profile. I can try to bisect this soon.
I'm very glad there is still a workaround, which is just setting GDK_BACKEND=x11 before running Firefox. However, this causes the UI to look weird and so far GDK_BACKEND=wayland has been otherwise seamless.
Please let me know how else I can help debug this. Thanks for all your hard work!
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•4 years ago
|
||
Please run with WAYLAND_DEBUG=1 and attach the log here. Also note that correct Wayland env variable is MOZ_ENABLE_WAYLAND=1, not GDK_BACKEND=wayland.
(In reply to Martin Stránský [:stransky] from comment #2)
Please run with WAYLAND_DEBUG=1 and attach the log here. Also note that correct Wayland env variable is MOZ_ENABLE_WAYLAND=1, not GDK_BACKEND=wayland.
Thanks for the response! Log attached. If I were to take a guess, it seems that the error is actually in trying to create the sharing indicator, rather than anything to do with the actual audio input?
And I should note that regardless of if I set MOZ_ENABLE_WAYLAND to 0 or 1, what determines whether or not this bug happens is still GDK_BACKEND=wayland. Is that supposed to be set to x11 for Firefox?
Comment 5•4 years ago
|
||
[3806506.952] wl_display@1.error(xdg_surface@71, 4294967295, "Tried to set invalid xdg-surface geometry")
Gdk-Message: 14:45:06.643: Error 71 (Protocol error) dispatching to Wayland display.
Can you try nested mutter compositor please? Run on terminal:
$mutter --wayland --nested &
$WAYLAND_DISPLAY=wayland-1 MOZ_ENABLE_WAYLAND=1 ./firefox
I can't get the mutter nested compositor to work properly in Sway as it throws:
Window manager warning: Failed to set environment variable WAYLAND_DISPLAY for gnome-session:
GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
which causes Firefox to open in Sway even if I set WAYLAND_DISPLAY=1.
However, I managed to test this in GNOME both with and without nested mutter—I cannot find a way to reproduce there. It seems that this is only reproducible on Sway with GDK_BACKEND=wayland. Hope that helps.
Comment 7•2 years ago
|
||
Marking this S2 because Wayland is/will become the default, and this would seem to kill WebRTC functionality, though I'm not sure how reproducible it is.
Updated•1 years ago
|
Comment 8•1 years ago
|
||
(In reply to imyxhuang from comment #0)
Does this problem still occur?
(In reply to Martin Stránský [:stransky] (ni? me) from comment #5)
[3806506.952] wl_display@1.error(xdg_surface@71, 4294967295, "Tried to set invalid xdg-surface geometry")
if (width <= 0 || height <= 0) {
wl_resource_post_error(resource, XDG_SURFACE_ERROR_INVALID_SIZE, "Tried to set invalid xdg-surface geometry");
bug 1608705 comment 14 also had this message.
(In reply to Darkspirit from comment #8)
(In reply to imyxhuang from comment #0)
Does this problem still occur?
Just tested on Firefox 113.0.1 and sway 1.8.1 and I can no longer reproduce it!
Comment 10•1 years ago
|
||
Thanks for testing!
Description
•