Skip to content

[Bug]: Recording fails on niri (Wayland): "the ScreenCast portal does not offer the Embedded cursor mode" #1357

Open

Description

@EgorSK3

Search existing issues

  • I have searched the existing issues

Describe the bug

Screen recording doesn't work on niri 26.04 (Wayland, Void Linux). When I open the appand start a recording, nothing is recorded and I get an error:
"Error: the ScreenCast portal does not offer the Embedded cursor mode"

The terminal shows:
[capture-linux] portal-failed: the ScreenCast portal does not offer the Embedded cursor modeCould not prepare the native Linux capture: Error: the ScreenCast portal does not offerthe Embedded cursor mode

I use OpenScreen 2.1.2 (AppImage) on Void Linux with niri 26.04 (Wayland).

Expected behavior

The recording should just start. It looks like the app requires a cursor mode that mycompositor doesn't provide — maybe it could work without it (or draw the cursor itself)instead of refusing to record.

To Reproduce

  1. Log into niri 26.04 (Wayland session) on Void Linux
  2. Launch Openscreen-Linux-2.1.2.AppImage from a terminal
  3. Select a Display and start recording
  4. Recording fails immediately — reproduces 100% of the time

Screenshots

Image Image

OS

Linux

OS Version

Void Linux x86_64 (Kernel 6.18.57_1)

Other OS

No response

Browser

Other

Browser Version

155.0.8059.39_1

Other Browser

Chromium

Device Type

Desktop

Other Device

No response

Additional context

Other programs (Recordly, Cap) had a similar cursor problem. Recordly started recording, but in studio mode (after recording), when the cursor turned on, it was in the wrong position, and everything broke. The main cursor was displayed on the screen, but a superimposed cursor appeared on top of it at the top of the screen. I can’t check it out in Openscreen, but I think it’ll be the same.

OpenScreen 2.1.2 (AppImage)
ScreenCast backend: xdg-desktop-portal-gnome-48.0_1

./Openscreen-Linux-2.1.2.AppImage
RECORDINGS_DIR: /home/egorsk3/.config/openscreen/recordings
User Data Path: /home/egorsk3/.config/openscreen
Global shortcut registered: CommandOrControl+Shift+O
[2014:1020/200857.773968:ERROR:media/gpu/vaapi/vaapi_wrapper.cc:1640] vaInitialize failed: unknown libva error
[1947:1020/200857.897197:ERROR:base/nix/mime_util_xdg.cc:139] Invalid mime.cache file does not contain null prior to ALIAS_LIST_OFFSET=44
[capture-linux] [VAAPI @ 0x55f261330b00] Failed to initialise VAAPI connection: -1 (unknown libva error).
[capture-linux] portal-failed: the ScreenCast portal does not offer the Embedded cursor mode
Could not prepare the native Linux capture: Error: the ScreenCast portal does not offer the Embedded cursor mode
at dB.handleEvent (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111954:163)
at file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111878:10
at Qre.push (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111426:12)
at dB.handleStdout (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111868:16)
at Socket. (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111698:85)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
at Readable.push (node:internal/streams/readable:394:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
[native-linux] starting capture {
outputPath: '/home/egorsk3/.config/openscreen/recordings/recording-1792516147209.mp4',
prepared: false,
cursor: { mode: 'system' },
audio: {
system: { enabled: false },
microphone: { enabled: false, gain: 1 }
},
video: { fps: 60 }
}
[capture-linux] [VAAPI @ 0x55a6ebd2bd00] Failed to initialise VAAPI connection: -1 (unknown libva error).
[capture-linux] portal-failed: the ScreenCast portal does not offer the Embedded cursor mode
Failed to start native Linux recording: Error: the ScreenCast portal does not offer the Embedded cursor mode
at dB.handleEvent (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111954:163)
at file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111878:10
at Qre.push (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111426:12)
at dB.handleStdout (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111868:16)
at Socket. (file:///tmp/.mount_OpenscpjknLL/resources/app.asar/dist-electron/main-CgAV1LM8.js:111698:85)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
at Readable.push (node:internal/streams/readable:394:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
[app] quitting

Activity

  1. EgorSK3 commented on Oct 20, 2026

    @EgorSK3
    Author

    Control test on Kubuntu 26.04 (KDE Wayland, VM): recording works. The screen/windowpicker appeared, the recording landed in Studio. This confirms the Embedded-onlygate as the root cause — on niri the portal doesn't offer Embedded, and OpenScreenrefuses to capture without it.

    Two small notes from this test:

    I had to pick the source twice before recording started (the picker appearedtwo times).
    In Studio there is no cursor option panel for this recording — probably becausewith the Embedded mode the pointer is already burned into the frames, so thereis no pointer data to restyle. With the Metadata fallback you would not onlysupport niri, but also get pointer-as-data on KDE, which would make the cursorpanel work there too.
    (The "no compatible GPU, using CPU rendering" warning in Studio is just my VMwithout 3D acceleration, not a bug report.)

  2. EtienneLescot commented on Oct 21, 2026

    @EtienneLescot
    Member

    Thanks for the report and the control test @EgorSK3. #1363 should fix this: when the portal doesn't offer the embedded cursor mode (niri's case), the recorder now falls back to the metadata mode instead of refusing, and the editor draws the pointer from the cursor data.

    Could you try it on niri? The Linux build is the openscreen-linux artifact at the bottom of this run, once it finishes in about 40 minutes (you need to be signed in to GitHub to download it): https://github.com/getopenscreen/openscreen/actions/runs/39606646795

  3. EgorSK3 commented on Oct 21, 2026

    @EgorSK3
    Author

    @EtienneLescot
    Thanks for the quick turnaround on #1363! I've done more testing on niri 26.04 (Void Linux, NVIDIA GTX). The cursor fix works — but there is still one more blocker on the gnome portal path.

    What happens now:
    "editable-overlay" mode prepares fine and the portal stream starts (2560x1080), but then every frame is dropped as corrupted, and after 10 seconds recording fails:

    [capture-linux] frame-dropped: the compositor's buffer failed validation (producer-marked-frame-corrupted), so this frame was dropped: dataType=DmaBuf stride=10240 width=2560 height=1080 chunkOffset=0 chunkSize=0 available=11796480

    Failed to start native Linux recording: Error: OpenScreen could not start screen capture: the screen share delivered no frame within 10 s.

    (Screenshot of the error dialog attached.)

    This looks like the same problem as #1244. And here is the thing: on the exact same session, other capture apps work fine — OBS records this monitor through the same portal with the cursor visible. So the stack itself (niri + NVIDIA + portal) can clearly deliver working frames; OpenScreen is the only app that ends up with corrupted ones.

    From the analysis in #1244: when the VAAPI probe fails (which is always the case on proprietary NVIDIA), the helper seems to advertise only LINEAR/INVALID modifiers, so the compositor allocates a buffer the NVIDIA driver can't render into. Two things that would fix this on OpenScreen's side:

    1. Advertise the real EGL-importable modifiers even when the VAAPI probe fails (the fix suggested in [Bug]: No frames on niri + NVIDIA: niri allocates the screencast dmabuf with the INVALID modifier and cannot render into it #1244);
    2. Or simpler and even more robust: add a shared-memory (memfd) fallback when dmabuf negotiation fails — recording would still work everywhere, just with CPU copies. wf-recorder effectively works this way and it's perfectly fine.

    One more small thing: on portals without the Metadata cursor mode (e.g. xdg-desktop-portal-wlr), the "editable overlay" option refuses to start with "does not advertise METADATA cursor mode", even though Embedded is available. Falling back to Embedded (cursor baked into the frames) would make that path work too.

    For completeness: through the wlr portal, recording starts (465 frames, 0 dropped) but the video is a static image — that one matches a known xdg-desktop-portal-wlr bug ("screencasting freezes on first frame", void-linux#62609 / emersion#400), so it's not on OpenScreen.

    Happy to test any new build!

    .generated by GLM 5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions