You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: OpenScreen crashes when starting a recording on Ubuntu 24.04 #1340
I installed OpenScreen 2.1.1 on Ubuntu 24.04. When I select the screen and start recording, the application crashes with this error:
The Linux capture helper exited (code=null, signal=SIGSEGV)
The crash report shows a segmentation fault inside OpenScreen's bundled FFmpeg library (libavcodec.so.62) while opening a video codec (avcodec_open2).
My system has AMD Radeon graphics. VA-API is available and reports H.264 encoding support.
Could you help identify the cause and advise how to fix this?
Thank you.
Thanks for the report. The libavcodec crash in avcodec_open2 is a lead, but your report says both Ubuntu 24.04 and 22.04: which one is it? Could you also send the Mesa version, the output of vainfo, the lines of the terminal output containing capture-linux after the crash, and a Save Diagnostics file if the app still opens? That tells us which encoder it tried to open.
Sorry for the delay. The OS is Ubuntu 24.04.5 LTS (22.04 was my mistake).
I updated to 2.1.2. Now recording never starts: I select "Entire Screen" in the GNOME Share Screen dialog and click Share, and after 1–2 seconds OpenScreen shows "Error: The screen capture request was cancelled." So I can't reach the old libavcodec crash anymore.
System:
Ubuntu 24.04.5, GNOME 46, X11 session
xdg-desktop-portal-gnome 46.2
AMD Radeon R5 (carrizo), Mesa 25.2.8
vainfo: H.264 encode supported (VAEntrypointEncSlice), HEVC decode only
Log:
[capture-linux] click-capture-unavailable: no readable /dev/input pointer device ...
[capture-linux] click-capture-unavailable: no readable /dev/input pointer device ...
[capture-linux] portal-cancelled: The screen capture request was cancelled.
Could not prepare the native Linux capture: Error: The screen capture request was cancelled.
[native-linux] starting capture { prepared: false, cursor: { mode: 'editable-overlay' }, video: { fps: 60 } }
[capture-linux] portal-cancelled: The screen capture request was cancelled.
Failed to start native Linux recording: Error: The screen capture request was cancelled.
The portal itself works: calling the ScreenCast portal directly (CreateSession -> SelectSources -> Start) with the same options (types=1, cursor_mode=4, persist_mode=2) and clicking Share returns a stream normally.
Two "click-capture-unavailable" lines appear before the first cancel, so maybe two capture sessions are started at once.
Save Diagnostics is not attached: the app hangs after the error.
Thanks @PyVoyager, your log was the key: the two click-capture-unavailable lines do mean two capture sessions. A second Record press while the GNOME picker is open started a second one, and the two discarded each other's grant, so prepared: false followed your Share. #1413 ignores that second press.
One question to confirm it is your case: did the picker take a moment to show, or open behind another window, so that Record got pressed again? If you saw only one dialog and pressed once, the X11 portal itself is at fault and #1328's direct X11 capture is the way. @marcscama, same question on KDE X11.
Thanks. Not the double-press case on my side: I pressed Record once, and no picker dialog appeared at all. So it’s the second case, the X11 portal itself is at fault.
Debian sid, KDE Plasma on X11 (kwin_x11), xdg-desktop-portal 1.20.4, xdg-desktop-portal-kde 6.6.5, OpenScreen 2.1.2 (.deb).
In my diagnostic the two failures are sequential, not overlapping: prepare (CreateSession fails), then start ~3 s later after the countdown (fails again), each within ~50 ms, with portal-failed: CreateSession: Portal request didn't succeed: Other (not portal-cancelled). The portal journal says each time:
xdp-kde-screencast: zkde_screencast_unstable_v1 does not seem to be available
KWin only exposes that protocol on Wayland (known KDE limitation: https://bugs.kde.org/show_bug.cgi?id=454985). Wayland works for me.
One caveat for #1328: on KDE X11 org.freedesktop.portal.ScreenCast is on the bus (busctl --user introspect org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop lists it), only CreateSession fails. A check based on the interface being absent (the Xfce case) wouldn’t select direct X11 capture here, so it should also cover a failing CreateSession.
Activity
EtienneLescot commentedon Oct 19, 2026
Thanks for the report. The
libavcodeccrash inavcodec_open2is a lead, but your report says both Ubuntu 24.04 and 22.04: which one is it? Could you also send the Mesa version, the output ofvainfo, the lines of the terminal output containingcapture-linuxafter the crash, and a Save Diagnostics file if the app still opens? That tells us which encoder it tried to open.PyVoyager commentedon Oct 24, 2026
Sorry for the delay. The OS is Ubuntu 24.04.5 LTS (22.04 was my mistake).
I updated to 2.1.2. Now recording never starts: I select "Entire Screen" in the GNOME Share Screen dialog and click Share, and after 1–2 seconds OpenScreen shows "Error: The screen capture request was cancelled." So I can't reach the old libavcodec crash anymore.
System:
Log:
The portal itself works: calling the ScreenCast portal directly (CreateSession -> SelectSources -> Start) with the same options (types=1, cursor_mode=4, persist_mode=2) and clicking Share returns a stream normally.
Two "click-capture-unavailable" lines appear before the first cancel, so maybe two capture sessions are started at once.
Save Diagnostics is not attached: the app hangs after the error.
marcscama commentedon Oct 25, 2026
I confirm a similar bug with X11 with Debian Sid KDE! Wayland works.
EtienneLescot commentedon Oct 28, 2026
Thanks @PyVoyager, your log was the key: the two
click-capture-unavailablelines do mean two capture sessions. A second Record press while the GNOME picker is open started a second one, and the two discarded each other's grant, soprepared: falsefollowed your Share. #1413 ignores that second press.One question to confirm it is your case: did the picker take a moment to show, or open behind another window, so that Record got pressed again? If you saw only one dialog and pressed once, the X11 portal itself is at fault and #1328's direct X11 capture is the way. @marcscama, same question on KDE X11.
fix(linux): ignore a second record press while the portal picker is up
marcscama commentedon Oct 28, 2026
Thanks. Not the double-press case on my side: I pressed Record once, and no picker dialog appeared at all. So it’s the second case, the X11 portal itself is at fault.
Debian sid, KDE Plasma on X11 (kwin_x11), xdg-desktop-portal 1.20.4, xdg-desktop-portal-kde 6.6.5, OpenScreen 2.1.2 (.deb).
In my diagnostic the two failures are sequential, not overlapping: prepare (CreateSession fails), then start ~3 s later after the countdown (fails again), each within ~50 ms, with portal-failed: CreateSession: Portal request didn't succeed: Other (not portal-cancelled). The portal journal says each time:
xdp-kde-screencast: zkde_screencast_unstable_v1 does not seem to be available
KWin only exposes that protocol on Wayland (known KDE limitation: https://bugs.kde.org/show_bug.cgi?id=454985). Wayland works for me.
One caveat for #1328: on KDE X11 org.freedesktop.portal.ScreenCast is on the bus (busctl --user introspect org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop lists it), only CreateSession fails. A check based on the interface being absent (the Xfce case) wouldn’t select direct X11 capture here, so it should also cover a failing CreateSession.
Happy to test a #1328 build on KDE X11.