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

Screencast: Output is corrupt with DmaBuf Transport (v0.6.0+) #223

Open
columbarius opened this issue Jun 29, 2022 · 5 comments
Open

Screencast: Output is corrupt with DmaBuf Transport (v0.6.0+) #223

columbarius opened this issue Jun 29, 2022 · 5 comments

Comments

@columbarius
Copy link
Collaborator

columbarius commented Jun 29, 2022

If you see a corrupted image (abstract art) instead of the output of your screen using xdg-desktop-portal (xdpw) v 0.6.0 and later please provide:

  • Used distribution
  • Used version/commit of xdpw (+ connected PR)
  • Installed GPU's (Vendor + Model)
  • Used configuration_file (especially if force_mod_linear is used)
  • Used client and version which displays the corrupt image
  • Is the image still corrupt on OBS 27.2.4 or later
  • Anything special with your setup

If the image is still corrupt with OBS please do the following:

Please build OBS from master, (or use the attached flatpak taken from the CI of obsproject/obs-studio#5377 [1])
and provide logs from the same session:

  • xdpw DEBUG Log: eg. the output of /usr/lib/xdg-desktop-portal-wlr -r -l TRACE
  • OBS: run it with the --verbose flag and either paste the log here or upload it via OBS and paste the URL here.
    screenshot-2022-06-29-01:54:47

The reason to ask for all that information is: DmaBufs depend highly on the used hardware and drivers. When the clients displays a corrupt image the issues can range from wrong negotiation of DmaBuf capabilities, to wrong API usage of clients or a driver bug.

This link can get invalid
[1]: https://github.com/obsproject/obs-studio/suites/7129787888/artifacts/283059476

@fbievan
Copy link

fbievan commented Jul 7, 2022

Heres some details:

  • Arch Linux
  • xdg-desktop-portal 0.6.0-1 directly from normal arch repo (Version of xdpw)
  • Intel i3-6100U ( INTEL HD Graphics 520) or Intel Skylake GT2
[screencast]
chooser_type = simple
chooser_cmd = slurp -f %o -ro
  • Chromium 103.0.5060.114
  • No
  • No
  • Also heres a small snippet of chromium log
[25753:25786:0707/124749.252816:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[25753:26113:0707/124815.935953:ERROR:egl_dmabuf.cc(569)] Failed to record frame: Error creating EGLImage - EGL_BAD_ALLOC
[25753:26113:0707/124815.935981:ERROR:shared_screencast_stream.cc(599)] Dropping DMA-BUF modifier: 72057594037927940 and trying to renegotiate stream parameters
[25753:26128:0707/124818.967920:ERROR:egl_dmabuf.cc(569)] Failed to record frame: Error creating EGLImage - EGL_BAD_ALLOC

Also for reference heres a list of intel releated packages on my system

local/intel-gmmlib 22.1.4-1
    Intel Graphics Memory Management Library
local/intel-media-driver 22.4.4-1
    Intel Media Driver for VAAPI — Broadwell+ iGPUs
local/intel-media-sdk 22.4.4-1
    Legacy API for hardware video acceleration on Intel GPUs (Broadwell to Rocket Lake)
local/intel-ucode 20220510-1
    Microcode update files for Intel CPUs
local/lib32-vulkan-intel 22.1.3-1
    Intel's Vulkan mesa driver (32-bit)
local/libmfx 22.4.4-1
    Intel Media SDK dispatcher library
local/libva-intel-driver 2.4.1-2
    VA-API implementation for Intel G45 and HD Graphics family
local/libva-utils 2.15.0-1
    Intel VA-API Media Applications and Scripts for libva
local/vulkan-intel 22.1.3-1
    Intel's Vulkan mesa driver

Includes mesa package

Also did notice a libva error, but I highly doubt that is related. If it is i can provide info.

Hopefully the information i have provided here can help, if you need anything else, lmk.

@columbarius
Copy link
Collaborator Author

This sounds like a bug in chromium which is fixed and will be in the 105 release. You might be able to check this by using a chromium dev build from their website

@mahkoh
Copy link

mahkoh commented Jul 15, 2022

This sounds like a bug in chromium which is fixed and will be in the 105 release.

Do you have a crbug.com url for this bug?

@columbarius
Copy link
Collaborator Author

#217 (comment)

@Hubro
Copy link

Hubro commented Dec 27, 2022

I just did a fresh build of fea4934 and I'm using this config:

[screencast]
max_fps=60
chooser_cmd=slurp -f %o -or
chooser_type=none
cropmode=wlroots
region=1280,0:2560x1412
force_mod_linear=1

Result:

image


GPU: AMD RX 5700 XT with amdgpu driver
Monitor: Samsung Odyssey G9, 5120x1440@240hz
OBS: 28.1.2-2
OS: Arch Linux (rolling) 6.0.12-arch1-1

I tried with and without force_mod_linear, it made no noticeable difference.

OBS verbose log: https://obsproject.com/logs/LU053S1kMTqPI0W6

XDPW log:

2022/12/27 18:07:14 [DEBUG] - config: outputname:  (null)
2022/12/27 18:07:14 [DEBUG] - config: max_fps:  60.000000
2022/12/27 18:07:14 [DEBUG] - config: exec_before:  (null)
2022/12/27 18:07:14 [DEBUG] - config: exec_after:  (null)
2022/12/27 18:07:14 [DEBUG] - config: chooser_cmd: slurp -f %o -or
2022/12/27 18:07:14 [DEBUG] - config: chooser_type: none
2022/12/27 18:07:14 [DEBUG] - config: force_mod_linear: 0
2022/12/27 18:07:14 [DEBUG] - config: cropmode: wlroots
2022/12/27 18:07:14 [DEBUG] - config: cropping_region x: 1280
2022/12/27 18:07:14 [DEBUG] - config: cropping_region y: 0
2022/12/27 18:07:14 [DEBUG] - config: cropping_region width: 2560
2022/12/27 18:07:14 [DEBUG] - config: cropping_region height: 1412
2022/12/27 18:07:14 [DEBUG] - dbus: connected
2022/12/27 18:07:14 [DEBUG] - wlroots: wl_display connected
2022/12/27 18:07:14 [DEBUG] - pipewire: pw_loop created
2022/12/27 18:07:14 [DEBUG] - pipewire: establishing connection to core
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wl_shm  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: |-- registered to interface wl_shm (Version 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wl_drm  (Version: 2)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_linux_dmabuf_v1  (Version: 4)
2022/12/27 18:07:14 [DEBUG] - wlroots: |-- registered to interface zwp_linux_dmabuf_v1 (Version 4)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wl_compositor  (Version: 4)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wl_subcompositor  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wl_data_device_manager  (Version: 3)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_gamma_control_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zxdg_output_manager_v1  (Version: 3)
2022/12/27 18:07:14 [DEBUG] - wlroots: |-- registered to interface zxdg_output_manager_v1 (Version 3)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register org_kde_kwin_idle  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_idle_inhibit_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_layer_shell_v1  (Version: 4)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register xdg_wm_base  (Version: 2)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_tablet_manager_v2  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register org_kde_kwin_server_decoration_manager  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zxdg_decoration_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_relative_pointer_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_pointer_constraints_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wp_presentation  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_output_manager_v1  (Version: 2)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_output_power_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_input_method_manager_v2  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_text_input_manager_v3  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_foreign_toplevel_manager_v1  (Version: 3)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wp_drm_lease_device_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_export_dmabuf_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_screencopy_manager_v1  (Version: 3)
2022/12/27 18:07:14 [DEBUG] - wlroots: |-- registered to interface zwlr_screencopy_manager_v1 (Version 3)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_data_control_manager_v1  (Version: 2)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_primary_selection_device_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wp_viewporter  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zxdg_exporter_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zxdg_importer_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zxdg_exporter_v2  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zxdg_importer_v2  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register xdg_activation_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_virtual_keyboard_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_virtual_pointer_manager_v1  (Version: 2)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwlr_input_inhibit_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_keyboard_shortcuts_inhibit_manager_v1  (Version: 1)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wl_seat  (Version: 7)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register zwp_pointer_gestures_v1  (Version: 3)
2022/12/27 18:07:14 [DEBUG] - wlroots: interface to register wl_output  (Version: 4)
2022/12/27 18:07:14 [DEBUG] - wlroots: |-- registered to interface wl_output (Version 1)
2022/12/27 18:07:14 [DEBUG] - wayland: registry listeners run
2022/12/27 18:07:14 [DEBUG] - wlroots: linux_dmabuf_feedback_handle_main_device called
2022/12/27 18:07:14 [INFO] - xdpw: Using render node /dev/dri/renderD128
2022/12/27 18:07:14 [DEBUG] - wlroots: linux_dmabuf_feedback_format_table called
2022/12/27 18:07:14 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_target_devices called
2022/12/27 18:07:14 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_flags called
2022/12/27 18:07:14 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_formats called
2022/12/27 18:07:14 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_done called
2022/12/27 18:07:14 [DEBUG] - wlroots: linux_dmabuf_feedback_handle_done called
2022/12/27 18:07:14 [DEBUG] - wayland: xdg output listeners run
2022/12/27 18:07:43 [INFO] - dbus: create session method invoked
2022/12/27 18:07:43 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_898/obs1
2022/12/27 18:07:43 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_898/obs1
2022/12/27 18:07:43 [INFO] - dbus: app_id: 
2022/12/27 18:07:43 [INFO] - dbus: select sources method invoked
2022/12/27 18:07:43 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_898/obs2
2022/12/27 18:07:43 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_898/obs1
2022/12/27 18:07:43 [INFO] - dbus: app_id: 
2022/12/27 18:07:43 [INFO] - dbus: option types:1
2022/12/27 18:07:43 [INFO] - dbus: option multiple: 0
2022/12/27 18:07:43 [INFO] - dbus: option cursor_mode:2
2022/12/27 18:07:43 [WARN] - dbus: unknown option persist_mode
2022/12/27 18:07:43 [DEBUG] - dbus: select sources: found matching session /org/freedesktop/portal/desktop/session/1_898/obs1
2022/12/27 18:07:43 [INFO] - wlroots: capturable output: Samsung Electric Company model: LC49G95T: id: 45 name: DP-1
2022/12/27 18:07:43 [INFO] - xdpw: screencast instance 0x562aff4eb190 has 1 references
2022/12/27 18:07:43 [INFO] - xdpw: 1 active screencast instances
2022/12/27 18:07:43 [INFO] - wlroots: output: DP-1
2022/12/27 18:07:43 [INFO] - dbus: start method invoked
2022/12/27 18:07:43 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_898/obs3
2022/12/27 18:07:43 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_898/obs1
2022/12/27 18:07:43 [INFO] - dbus: app_id: 
2022/12/27 18:07:43 [INFO] - dbus: parent_window: 
2022/12/27 18:07:43 [DEBUG] - dbus: start: found matching session /org/freedesktop/portal/desktop/session/1_898/obs1
2022/12/27 18:07:43 [INFO] - wlroots: num_modififiers 6
2022/12/27 18:07:43 [INFO] - pipewire: stream state changed to "connecting"
2022/12/27 18:07:43 [INFO] - pipewire: node id is -1
2022/12/27 18:07:43 [INFO] - pipewire: stream state changed to "paused"
2022/12/27 18:07:43 [INFO] - pipewire: node id is 41
2022/12/27 18:07:43 [DEBUG] - dbus: start: returning node 41
2022/12/27 18:07:43 [INFO] - wlroots: num_modififiers 6
2022/12/27 18:07:43 [DEBUG] - pipewire: Format negotiated:
2022/12/27 18:07:43 [DEBUG] - pipewire: buffer_type: 1 (8)
2022/12/27 18:07:43 [DEBUG] - pipewire: format: 8
2022/12/27 18:07:43 [DEBUG] - pipewire: modifier: 144115188085734146
2022/12/27 18:07:43 [DEBUG] - pipewire: size: (2560, 1412)
2022/12/27 18:07:43 [DEBUG] - pipewire: max_framerate: (60 / 1)
2022/12/27 18:07:43 [DEBUG] - pipewire: add buffer event handle
2022/12/27 18:07:43 [DEBUG] - pipewire: add buffer event handle
2022/12/27 18:07:43 [INFO] - pipewire: stream state changed to "streaming"
2022/12/27 18:07:43 [INFO] - pipewire: node id is 41
2022/12/27 18:07:43 [DEBUG] - pipewire: remove buffer event handle
2022/12/27 18:07:43 [DEBUG] - pipewire: remove buffer event handle
2022/12/27 18:07:43 [INFO] - wlroots: num_modififiers 6
2022/12/27 18:07:43 [DEBUG] - pipewire: Format negotiated:
2022/12/27 18:07:43 [DEBUG] - pipewire: buffer_type: 1 (8)
2022/12/27 18:07:43 [DEBUG] - pipewire: format: 8
2022/12/27 18:07:43 [DEBUG] - pipewire: modifier: 144115188084251394
2022/12/27 18:07:43 [DEBUG] - pipewire: size: (2560, 1412)
2022/12/27 18:07:43 [DEBUG] - pipewire: max_framerate: (60 / 1)
2022/12/27 18:07:43 [WARN] - pipewire: no buffer to queue
2022/12/27 18:07:43 [WARN] - pipewire: out of buffers
2022/12/27 18:07:43 [WARN] - wlroots: no current buffer
2022/12/27 18:07:43 [DEBUG] - pipewire: add buffer event handle
2022/12/27 18:07:43 [DEBUG] - pipewire: add buffer event handle
2022/12/27 18:07:59 [INFO] - dbus: session closed
2022/12/27 18:07:59 [DEBUG] - dbus: destroying session 0x562aff440480
2022/12/27 18:07:59 [DEBUG] - xdpw: screencast instance 0x562aff4eb190 now has 0 references
2022/12/27 18:07:59 [INFO] - pipewire: stream state changed to "paused"
2022/12/27 18:07:59 [INFO] - pipewire: node id is 41
2022/12/27 18:07:59 [DEBUG] - xdpw: destroying cast instance
2022/12/27 18:07:59 [DEBUG] - pipewire: destroying stream
2022/12/27 18:07:59 [DEBUG] - pipewire: remove buffer event handle
2022/12/27 18:07:59 [DEBUG] - pipewire: remove buffer event handle
2022/12/27 18:07:59 [INFO] - pipewire: stream state changed to "unconnected"
2022/12/27 18:07:59 [INFO] - pipewire: node id is -1

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