Screen share for Chromium under Wayland
Closed this issue · 9 comments
Hey there @jbuchermn,
we've already had contact in the AUR ;)
I'm using newm since 3 days now as my daily driver for work and personale use. I have to say - This is without doubt the best WM out there! So clean and beautiful at the same time.
The only issue I have is that screenshare in Chromium is not working, when Chromium is started under Wayland. When launched in XWayland it's not scaled correctly, but screencast does work.
I've already tried your solution posted in #17, but without success.
I've set up the ENV variables as you suggest in the master branch.
Here's the log from chromium:
[4208:4235:0215/114554.442304:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[4208:4235:0215/114554.442324:ERROR:select_file_dialog_impl_portal.cc(243)] Failed to read portal version property
[4244:4244:0215/114554.503169:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is egl, ANGLE is
[4208:4208:0215/114554.507168:ERROR:cursor_loader.cc(116)] Failed to load a platform cursor of type kNull
[4244:4244:0215/114554.518570:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[4208:4208:0215/114556.259024:ERROR:interface_endpoint_client.cc(658)] Message 1 rejected by interface blink.mojom.WidgetHost
[4208:4277:0215/114612.991173:ERROR:wayland_event_watcher.cc(292)] Fatal Wayland protocol error 3 on interface xdg_surface (object 42). Shutting down..
[0215/114613.010277:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0215/114613.034799:ERROR:process_memory_linux.cc(49)] pread64: Input/output error (5)
[4245:4269:0215/114614.395868:ERROR:broker_posix.cc(40)] Recvmsg error: Connection reset by peer (104)
[4245:4269:0215/114614.396305:ERROR:broker_posix.cc(110)] Error sending sync broker message: Broken pipe (32)
Trace/breakpoint trap (core dumped)
And the output from xdg-desktop-portal-wlr:
2022/02/15 11:45:00 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:00 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:00 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:03 [ERROR] - pipewire_loop_iterate failed: Unknown error -2
2022/02/15 11:45:03 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:03 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:27 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:27 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:27 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:29 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:29 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:45:29 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:46:10 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:46:10 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:46:10 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:46:12 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:46:12 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
2022/02/15 11:46:12 [ERROR] - pipewire_loop_iterate failed: Unknown error -1
Are there packages missing or is it just pipewire?
Thank you so much for your awesome work! :)
install WirePlumber and try the following command chromium --enable-features=WebRTCPipeWireCapturer
@CRAG666 Thank you for your reply. But I get the exact same behaviour.
I forgot to mention, that screenshare works fine with Firefox.
Running Chromium and WebRTC screen share with WAYLAND_DEBUG gives me:
wl_display@1.error(xdg_surface@42, 3, "xdg_surface has never been configured")
I think and I'm sure this is a chromium bug not newm
I'll take a look into it. (I've experienced issues with chromium screen share before - up to crashes). xdg_surface has never been configured
could be something compositor-related..
Could it be, that this tiny popup, which only states that you're sharing the screen is not configured?
Sharing a tab in Chromium does work.
I can reproduce the crash (where no crash happens on sway), although I can't really tell, if it's a chromium or compositor bug.
Generelly, committing a buffer to an unconfigured surface (error 3) is a client error, whcih the compositor cannot really influence (see for example https://bugaevc.gitbooks.io/writing-wayland-clients/content/beyond-the-black-square/xdg-shell.html). I'm quite baffled by it.
@CRAG666 Does screenshare work for you using chromium? Including the popup surface stating "... is sharing your screen"
Yeah I've read yesterday about WL protocol and the xdg-shell.
I figured out, that Chromium definitely is the problem. I downgraded Chromium to version 96 and screenshare is working under wayland.
Thank you for your investigations ;)
Okay, if downgrading chromium helps, at least there's a workaround. Maybe this will change again in future versions