Skip to content

Conversation

@russelltg
Copy link
Owner

@russelltg russelltg commented Aug 25, 2025

Fixes #127

Could you test & lmk how it goes?

Good catch--doesn't seem like I was particularly careful about this one.

Curious, for a new compositor why wlr-sreencopy and not ext-image-copy-capture? It's not like loads of stuff support the wlr- one anyways and ext-image-copy-capture is quite nice.

@kenoss
Copy link

kenoss commented Aug 30, 2025

Negotiation looks working correctly and the app failed as my compostior returns Xbgr8888 first. Thanks!

$ cargo run
   Compiling wl-screenrec v0.1.7 (/home/kenoss/src/github.com/russelltg/wl-screenrec)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.58s
     Running `target/debug/wl-screenrec`
08:25:06 [WARN] hw flag is specified, but there's no known vaapi codec for MPEG4. Using a generic encoder...
[AVHWDeviceContext @ 0xaaaafdde2240] Failed to initialise VAAPI connection: -1 (unknown libva error).
08:25:06 [ERROR] failed to create encoder(s): Failed to load vaapi device: Input/output error. This is likely *not* a bug in wl-screenrec, but an issue with your vaapi installation. Follow your distribution's instructions. If you're pretty sure you've done this correctly, create a new issue with the output of `vainfo` and if `wf-recorder -c h264_vaapi -d /dev/dri/renderD128` works.

Stack backtrace:
(...snip...)

Curious, for a new compositor why wlr-sreencopy and not ext-image-copy-capture? It's not like loads of stuff support the wlr- one anyways and ext-image-copy-capture is quite nice.

Long story short,

  1. Ecosystem is not yet matured.
    1-1. There is no compositor-agnostic XDG Portal backend using ext-image-copy-capture like xdg-desktop-portal-wlr for wlr-screencopy yet. COSMIC has its backend, but IIUC it's for COSMIC.
    1-2. grim doesn't support ext-image-copy-capture yet.
  2. wlr-screencopy is relatively easier to implement.
  3. Smithay looks to have a plan [smithay#781] to implement ext-image-copy-capture-v1.

So, I decided to implement wlr-screencopy for a shot-term solution.

@russelltg russelltg merged commit 8732c2c into main Sep 4, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

[bug] Crash if an Wayland compositor returns multiple linux_dmabuf for zwlr_screencopy_manager_v1

3 participants