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

Screen sharing not working on either gUM, firefox or chromium #317

Open
rogueai opened this issue Aug 27, 2024 · 1 comment
Open

Screen sharing not working on either gUM, firefox or chromium #317

rogueai opened this issue Aug 27, 2024 · 1 comment

Comments

@rogueai
Copy link

rogueai commented Aug 27, 2024

This used to work for me up till recently (~last week), but suddenly stopped working. I'm not sure if it's relevant, but I'm on the latest nvidia drivers on arch that just got a new version. I'm using sway, I've verified all possible checks from the FAQs and so far I'm able to select the screen with slurp but no screen sharing appears after that.

Logs from xdg-desktop-portal-wlr below, let me know if you need any additional configs or logs. Thanks!

Aug 27 09:15:10 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:10 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:10 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:10 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:10 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:10 [INFO] - pipewire: stream state changed to "paused"
Aug 27 09:15:10 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:10 [INFO] - pipewire: node id is 87
Aug 27 09:15:10 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:10 [WARN] - pipewire: no buffer to queue
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: create session method invoked
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_59/webrtc_578510625
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_59/webrtc_session1757209916
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: app_id:
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: select sources method invoked
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_59/webrtc1811195910
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_59/webrtc_session1757209916
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: app_id:
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [DEBUG] - dbus: select sources: found matching session /org/freedesktop/portal/desktop/session/1_59/webrtc_session1757209916
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: option types:3
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: option multiple: 0
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - dbus: option persist_mode:1
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - wlroots: capturable output: BOE model: 0x0853: id: 52 name: eDP-1
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [INFO] - wlroots: capturable output: Acer Technologies model: XB271HU: id: 53 name: DP-1
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [DEBUG] - wlroots: output chooser slurp -f %o -or (2)
Aug 27 09:15:34 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:34 [DEBUG] - wlroots: output chooser called
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - wlroots: output chooser selects eDP-1
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - xdpw: screencast instance 0x58e519859220 has 1 references
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - xdpw: 2 active screencast instances
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: output: eDP-1
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - dbus: start method invoked
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_59/webrtc651504153
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_59/webrtc_session1757209916
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - dbus: app_id:
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - dbus: parent_window:
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - dbus: start: found matching session /org/freedesktop/portal/desktop/session/1_59/webrtc_session1757209916
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: stream state changed to "connecting"
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: node id is -1
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: stream state changed to "paused"
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: node id is 142
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - dbus: start: returning node 142
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: Format negotiated:
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: buffer_type: 1 (8)
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: format: 8
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: modifier: 0
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: size: (1920, 1080)
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: max_framerate: (30 / 1)
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: add buffer event handle
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: add buffer event handle
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: stream state changed to "streaming"
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: node id is 142
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: buffer already exported
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [WARN] - pipewire: out of buffers
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [WARN] - pipewire: unable to export buffer
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: remove buffer event handle
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [DEBUG] - pipewire: remove buffer event handle
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api
Aug 27 09:15:35 arch-linux xdg-desktop-portal-wlr[25894]: 2024/08/27 09:15:35 [INFO] - wlroots: num_modififiers 5
@rogueai
Copy link
Author

rogueai commented Sep 5, 2024

Ok so I've managed to find the root cause of this issue.

In an attempt to enable VAAPI in firefox I had set:

export __NV_PRIME_RENDER_OFFLOAD=1

I removed this pebcak and got webrtc screen sharing working again.

As to why this was happening, and if anything could be done in xdpw to avoid the issue, that I'm unsure and it's probably up to you to decide if it's even worth investing time in an issue that is probably nvidia-only.

Nevertheless, I'll share my findings in the hope they'll be of some use:

  • when using the screen cast python script I was able to screen share
  • in xdpw, I was getting the DRM_FORMAT_MOD_INVALID modifiers: that caused gbm_bo_create_with_modifiers2 not being able to allocate the dmabuf and the reason for all the pipewire: unable to allocate a dmabuf with modifiers. Falling back to the old api logs
  • this in turn resulted in an endless loop of pwr_handle_stream_param_changed and pipewire stuck in a negotiating -> init and init -> negotiating loop

I'm attaching a pw-dump as well.
pipewire.json

I'm leaving this open, in case you guys want to take some action on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@rogueai and others