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

Google Chrome {dev,beta,stable} and Chromium crash on Desktop Sharing on xdpw-git #205

Closed
kriive opened this issue May 4, 2022 · 16 comments
Labels
upstream bug Something is broken in a dependency

Comments

@kriive
Copy link
Contributor

kriive commented May 4, 2022

I am on Arch Linux. I have installed xdpw via the AUR package xdg-desktop-portal-wlr-git. The issue seems to disappear if I install the xdg-desktop-portal-wlr release (on pacman).

Using the latest Firefox I can share my desktop without issues (using https://mozilla.github.io/webrtc-landing/gum_test.html).

Different story when trying the same on Chromium-based browsers.
I've tried with:

  • Google Chrome 103.0.5028.0 dev,
  • Google Chrome 101.0.4951.54 stable
  • Google Chrome 102.0.5005.27 beta
  • Chromium 101.0.4951.54 Arch Linux
    with the same result:
❯ chromium --ozone-platform-hint=auto
[10745:10771:0504/153214.642087: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”
[10745:10771:0504/153214.642103:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property
[10745:10745:0504/153214.716937:ERROR:cursor_loader.cc(116)] Failed to load a platform cursor of type kNull
[10780:10780:0504/153214.725585:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is 
[10745:11011:0504/153228.517111:ERROR:egl_dmabuf.cc(569)] Failed to record frame: Error creating EGLImage - EGL_BAD_ALLOC
[10745:11011:0504/153228.517127:ERROR:shared_screencast_stream.cc(716)] Dropping DMA-BUF modifier: 72057594037927940 and trying to renegotiate stream parameters
[0504/153228.526044:ERROR:elf_dynamic_array_reader.h(64)] tag not found
zsh: illegal hardware instruction (core dumped)  chromium --ozone-platform-hint=auto

I attach the /lib64/xdg-desktop-portal-wlr -l DEBUG -r output here.
debug.txt

Let me know if you need other info or debug stuff.

@columbarius
Copy link
Collaborator

@grulja: This looks to my like renegotiation is tripping sth. in chromium.

@columbarius
Copy link
Collaborator

columbarius commented May 4, 2022

@kriive I can confirm this happening with chromium native and with the flatpak version.
Can you please check if OBS is working? You need to build from master or use the version from flathub-beta.

@kriive
Copy link
Contributor Author

kriive commented May 4, 2022

I can confirm OBS (from master, with -DENABLE_BROWSER=OFF -DENABLE_AJA=OFF -DENABLE_VLC=OFF) PipeWire capture is working.

@mahkoh
Copy link

mahkoh commented May 4, 2022

On my system I don't get any crashes in 101.0.4951.54 (Official Build) Arch Linux (64-bit) but the shared image is corrupted. My graphics card (RX570) does not support explicit modifiers. There is no problem in OBS. Firefox does not support DMABUF screen sharing. Running with RADEON_DEBUG=nodcc did not fix the issue.

Edit: Forcing GBM_BO_USE_LINEAR fixes the issue.

@columbarius
Copy link
Collaborator

Edit: Forcing GBM_BO_USE_LINEAR fixes the issue.

@mahkoh You only have one gpu and the image was still corrupt without the force_mod_linear option?
Didn't know that can happen.

@columbarius columbarius added the upstream bug Something is broken in a dependency label May 4, 2022
@mahkoh
Copy link

mahkoh commented May 4, 2022

You only have one gpu and the image was still corrupt without the force_mod_linear option?

Correct.

@grulja
Copy link

grulja commented May 5, 2022

I'm trying to reproduce in Sway with latest xdg-desktop-portal-wlr from git, but it doesn't even get to settle the format:

2022/05/05 10:46:00 [INFO] - dbus: create session method invoked
2022/05/05 10:46:00 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_269/webrtc402987779
2022/05/05 10:46:00 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_269/webrtc_session91513507
2022/05/05 10:46:00 [INFO] - dbus: app_id: org.chromium.Chromium
2022/05/05 10:46:00 [INFO] - dbus: select sources method invoked
2022/05/05 10:46:00 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_269/webrtc908434979
2022/05/05 10:46:00 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_269/webrtc_session91513507
2022/05/05 10:46:00 [INFO] - dbus: app_id: org.chromium.Chromium
2022/05/05 10:46:00 [INFO] - dbus: option types:3
2022/05/05 10:46:00 [INFO] - dbus: option multiple: 0
2022/05/05 10:46:00 [DEBUG] - dbus: select sources: found matching session /org/freedesktop/portal/desktop/session/1_269/webrtc_session91513507
2022/05/05 10:46:00 [INFO] - wlroots: capturable output: Sharp Corporation model: 0x1516: id: 41 name: eDP-1
2022/05/05 10:46:00 [INFO] - wlroots: capturable output: Dell Inc. model: DELL P2418D: id: 42 name: DP-4
2022/05/05 10:46:00 [INFO] - wlroots: capturable output: Dell Inc. model: DELL P2418D: id: 43 name: DP-5
2022/05/05 10:46:00 [DEBUG] - wlroots: output chooser called
2022/05/05 10:46:00 [DEBUG] - wlroots: output chooser called
2022/05/05 10:46:01 [DEBUG] - wlroots: output chooser selects DP-4
2022/05/05 10:46:01 [INFO] - xdpw: screencast instance 0x11c1720 has 1 references
2022/05/05 10:46:01 [INFO] - xdpw: 1 active screencast instances
2022/05/05 10:46:01 [INFO] - wlroots: output: DP-4
2022/05/05 10:46:01 [INFO] - dbus: start method invoked
2022/05/05 10:46:01 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_269/webrtc1250331382
2022/05/05 10:46:01 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_269/webrtc_session91513507
2022/05/05 10:46:01 [INFO] - dbus: app_id: org.chromium.Chromium
2022/05/05 10:46:01 [INFO] - dbus: parent_window: 
2022/05/05 10:46:01 [DEBUG] - dbus: start: found matching session /org/freedesktop/portal/desktop/session/1_269/webrtc_session91513507
2022/05/05 10:46:01 [INFO] - wlroots: num_modififiers 1
2022/05/05 10:46:01 [INFO] - pipewire: stream state changed to "connecting"
2022/05/05 10:46:01 [INFO] - pipewire: node id is -1
2022/05/05 10:46:01 [INFO] - pipewire: stream state changed to "paused"
2022/05/05 10:46:01 [INFO] - pipewire: node id is 73
2022/05/05 10:46:01 [DEBUG] - dbus: start: returning node 73
2022/05/05 10:46:01 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
2022/05/05 10:46:01 [INFO] - wlroots: num_modififiers 1

and it keeps repeating last two lines. This is with NVIDIA proprietary driver.

Edit: same happens with OBS studio

@grulja
Copy link

grulja commented May 5, 2022

@columbarius I see that xdg-desktop-portal-wlr uses the first render node it can find, but that doesn't necessarily be the one used by the compositor. I had same issue in WebRTC, where I used the first render node, but DMA-BUFs provided to me might be created by a different one. This will be case in multi-GPU setup, like I have for example with Intel + Nvidia.

See https://webrtc-review.googlesource.com/c/src/+/250661 for reference.

And indeed, using the other render node makes it to finally settle on the format and reproduce the issue. I will keep investigating now on my (WebRTC) side.

@grulja
Copy link

grulja commented May 5, 2022

The crash should be fixed with flathub/org.chromium.Chromium#228. There should be a test build available soon.

@columbarius
Copy link
Collaborator

@grulja Can you please check if #207 selects the right device?

@grulja
Copy link

grulja commented May 6, 2022

@grulja Can you please check if #207 selects the right device?

I will, but I might not have time to test it today so it will have to wait until the next week.

@grulja
Copy link

grulja commented May 10, 2022

@grulja Can you please check if #207 selects the right device?
It does.

Without #207: xdpw: Using render node /dev/dri/renderD129
With #207: xdpw: Using render node /dev/dri/renderD128

@columbarius
Copy link
Collaborator

Great!. Thanks for testing.

@columbarius
Copy link
Collaborator

@kriive I tested xdpw master with current chromium on flatpack and it worked. Can we close this?

@sentriz
Copy link

sentriz commented Jun 1, 2022

all works for me too now with ungoogled-chromium/chromium/chrome flatpak 👍👍

@kriive
Copy link
Contributor Author

kriive commented Jun 2, 2022

Yes, of course! Thanks to everyone involved in the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream bug Something is broken in a dependency
Projects
None yet
Development

No branches or pull requests

5 participants