xdg-desktop-portal-hyprland: Screen capture doesn't work in Chromium (negotiation errors from Pipewire)

Screen capture works perfectly in OBS and Firefox, but when I try to screen capture in Chrome, Chromium or Vivaldi (so apparently any Chromium based application) then I just get a loading spinner that never resolves.

Meanwhile, Pipewire prints this error:

pw.context: params Spa:Enum:ParamId:EnumFormat: 0:0 Invalid argument (input format (no more input formats))
pw.context: Object: size 352, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pw.context:     Id 2        (Spa:Enum:MediaType:video)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pw.context:     Id 12       (Spa:Enum:VideoFormat:BGRA)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:modifier (131074), flags 00000018
pw.context:     Choice: type Spa:Enum:Choice:Enum, flags 00000000 88 8
pw.context:       Long 144115188622605059
pw.context:       Long 144115188622605059
pw.context:       Long 144115188622588675
pw.context:       Long 144115188622392067
pw.context:       Long 144115188621122307
pw.context:       Long 144115188084250882
pw.context:       Long 144115188075858177
pw.context:       Long 0
pw.context:       Long 72057594037927935
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Rectangle 1x1
pw.context:       Rectangle 1x1
pw.context:       Rectangle -1x-1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context: Object: size 248, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pw.context:     Id 2        (Spa:Enum:MediaType:video)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pw.context:     Id 12       (Spa:Enum:VideoFormat:BGRA)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Rectangle 1x1
pw.context:       Rectangle 1x1
pw.context:       Rectangle -1x-1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context: Object: size 352, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pw.context:     Id 2        (Spa:Enum:MediaType:video)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pw.context:     Id 11       (Spa:Enum:VideoFormat:RGBA)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:modifier (131074), flags 00000018
pw.context:     Choice: type Spa:Enum:Choice:Enum, flags 00000000 88 8
pw.context:       Long 144115188622605059
pw.context:       Long 144115188622605059
pw.context:       Long 144115188622588675
pw.context:       Long 144115188622392067
pw.context:       Long 144115188621122307
pw.context:       Long 144115188084250882
pw.context:       Long 144115188075858177
pw.context:       Long 0
pw.context:       Long 72057594037927935
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Rectangle 1x1
pw.context:       Rectangle 1x1
pw.context:       Rectangle -1x-1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context: Object: size 248, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pw.context:     Id 2        (Spa:Enum:MediaType:video)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pw.context:     Id 11       (Spa:Enum:VideoFormat:RGBA)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Rectangle 1x1
pw.context:       Rectangle 1x1
pw.context:       Rectangle -1x-1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context: Object: size 352, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pw.context:     Id 2        (Spa:Enum:MediaType:video)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pw.context:     Id 8        (Spa:Enum:VideoFormat:BGRx)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:modifier (131074), flags 00000018
pw.context:     Choice: type Spa:Enum:Choice:Enum, flags 00000000 88 8
pw.context:       Long 144115188622605059
pw.context:       Long 144115188622605059
pw.context:       Long 144115188622588675
pw.context:       Long 144115188622392067
pw.context:       Long 144115188621122307
pw.context:       Long 144115188084250882
pw.context:       Long 144115188075858177
pw.context:       Long 0
pw.context:       Long 72057594037927935
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Rectangle 1x1
pw.context:       Rectangle 1x1
pw.context:       Rectangle -1x-1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context: Object: size 248, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pw.context:     Id 2        (Spa:Enum:MediaType:video)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pw.context:     Id 8        (Spa:Enum:VideoFormat:BGRx)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Rectangle 1x1
pw.context:       Rectangle 1x1
pw.context:       Rectangle -1x-1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 0/1
pw.context:       Fraction 60/1
pw.context: params Spa:Enum:ParamId:EnumFormat: 1:0 Invalid argument (output format (no more input formats))
pw.context: Object: size 184, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pw.context:     Id 2        (Spa:Enum:MediaType:video)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pw.context:     Id 7        (Spa:Enum:VideoFormat:RGBx)
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pw.context:     Rectangle 2526x1368
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pw.context:     Fraction 0/1
pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pw.context:       Fraction 60/1
pw.context:       Fraction 1/1
pw.context:       Fraction 60/1
pw.link: (37.0 -> 40.0) negotiating -> error (no more input formats)

(Copied from journalctl --user --user-unit pipewire.service -f)

I spotted the words “framerate” and “maxFramerate” in the error message, so I thought perhaps my 240hz monitor was the culprit. I reduced my framerate to 60, restarted xdg-desktop-portal-hyprland, xdg-desktop-portal and pipewire, but I still got the exact same error.


  • chromium 112.0.5615.165-1
  • google-chrome 112.0.5615.165-1
  • vivaldi 6.0.2979.15-1
  • firefox 112.0.1-1
  • hyprland 0.24.1-1
  • xdg-desktop-portal 1.16.0-1
  • xdg-desktop-portal-hyprland 0.3.0-1
  • pipewire 1:0.3.69-2
  • wireplumber 0.4.14-1

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 27 (6 by maintainers)

Most upvoted comments

@vaxerski Chromium still does not work for me.

logs.txt

should work after c0e233955568fbea4e859336f6d3d14d51294d7c

one solution to this would be to stop using poo poo browsers.

Still having this issue running the latest release: xdg-desktop-portal 1.16.0-1 xdg-desktop-portal-hyprland 0.3.1-1 wireplumber 0.4.14-1 pipewire 1:0.3.70-1 google-chrome-beta 114.0.5735.26-1 slack-desktop 4.32.122-1

Verified that services are running without startup errors, that I don’t have any conflicting xdg-desktop-portal-* packages and that apps are running on wayland.

The <WpPortalPermissionStorePlugin:0x55f5181f02e0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera warning happends for me when running OBS as well (where recording works), so it’s probably not related.

Running xdg-desktop-portal-hyprland in debug mode while screen sharing through https://mozilla.github.io/webrtc-landing/gum_test.html I get the following output:

2023/05/17 14:40:07 [DEBUG] - hyprland: toplevel handle created 55edaeeb0cf0
2023/05/17 14:40:07 [DEBUG] - hyprland: toplevel app_id foot
2023/05/17 14:40:12 [DEBUG] - hyprland: toplevel handle created 55edaeead200
2023/05/17 14:40:12 [DEBUG] - hyprland: toplevel app_id code-url-handler
2023/05/17 14:41:53 [INFO] - dbus: create session method invoked
2023/05/17 14:41:53 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_82/webrtc_1808441346
2023/05/17 14:41:53 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_82/webrtc_session2143620336
2023/05/17 14:41:53 [INFO] - dbus: app_id: 
2023/05/17 14:41:53 [INFO] - dbus: select sources method invoked
2023/05/17 14:41:53 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_82/webrtc657185157
2023/05/17 14:41:53 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_82/webrtc_session2143620336
2023/05/17 14:41:53 [INFO] - dbus: app_id: 
2023/05/17 14:41:53 [INFO] - dbus: option types:1
2023/05/17 14:41:53 [INFO] - dbus: option multiple: 0
2023/05/17 14:41:53 [INFO] - dbus: persist 1
2023/05/17 14:41:53 [DEBUG] - dbus: select sources: found matching session /org/freedesktop/portal/desktop/session/1_82/webrtc_session2143620336
2023/05/17 14:41:53 [INFO] - wlroots: capturable output: Samsung Electric Company model: C27HG7x: id: 49 name: HDMI-A-1
2023/05/17 14:41:53 [DEBUG] - Screencast: Picker: Running command "WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_INSTANCE_SIGNATURE=_1684325237 XDPH_WINDOW_SHARING_LIST="2934624768[HC>]code-url-handler[HT>]tmp.txt - dsod - Visual Studio Code[HE>]2934639856[HC>]foot[HT>]foot[HE>]2933169728[HC>]foot[HT>]foot[HE>]2933169376[HC>]google-chrome-beta[HT>]gUM Test Page - Google Chrome[HE>]" hyprland-share-picker"
2023/05/17 14:41:57 [DEBUG] - Screencast: Attempting to find screen for screen:HDMI-A-1

2023/05/17 14:41:57 [INFO] - xdpw: screencast instance 0x55edaeeb31a0 has 1 references
2023/05/17 14:41:57 [INFO] - xdpw: 1 active screencast instances
2023/05/17 14:41:57 [INFO] - wlroots: output: HDMI-A-1
2023/05/17 14:41:57 [DEBUG] - hyprland: toplevel handle created 55edaeeb2a40
2023/05/17 14:41:57 [DEBUG] - hyprland: toplevel app_id hyprland-share-picker
2023/05/17 14:41:57 [DEBUG] - hyprland: toplevel closed hyprland-share-picker
2023/05/17 14:41:57 [INFO] - dbus: start method invoked
2023/05/17 14:41:57 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_82/webrtc1562734181
2023/05/17 14:41:57 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_82/webrtc_session2143620336
2023/05/17 14:41:57 [INFO] - dbus: app_id: 
2023/05/17 14:41:57 [INFO] - dbus: parent_window: 
2023/05/17 14:41:57 [DEBUG] - dbus: start: found matching session /org/freedesktop/portal/desktop/session/1_82/webrtc_session2143620336
2023/05/17 14:41:57 [INFO] - wlroots: no modifiers available for format 0
2023/05/17 14:41:57 [INFO] - pipewire: stream state changed to "connecting"
2023/05/17 14:41:57 [INFO] - pipewire: node id is -1
2023/05/17 14:41:57 [INFO] - pipewire: stream state changed to "paused"
2023/05/17 14:41:57 [INFO] - pipewire: node id is 72
2023/05/17 14:41:57 [INFO] - xdph: registered restoreToken with token 0F795BE1-357B-4942-9A80-E50900BEBA2A
2023/05/17 14:41:57 [DEBUG] - dbus: start: returning node 72
2023/05/17 14:41:58 [INFO] - pipewire: stream state changed to "error"
2023/05/17 14:41:58 [INFO] - pipewire: node id is 72
2023/05/17 14:42:10 [INFO] - dbus: session closed
2023/05/17 14:42:10 [DEBUG] - dbus: destroying session 0x55edaeeb25c0
2023/05/17 14:42:10 [DEBUG] - xdpw: screencast instance 0x55edaeeb31a0 now has 0 references
2023/05/17 14:42:10 [DEBUG] - xdpw: destroying cast instance
2023/05/17 14:42:10 [DEBUG] - pipewire: destroying stream
2023/05/17 14:42:10 [INFO] - pipewire: stream state changed to "unconnected"
2023/05/17 14:42:10 [INFO] - pipewire: node id is -1
2023/05/17 14:42:10 [DEBUG] - hyprland: toplevel closed google-chrome-beta

and output from chrome logs:

[14824:15323:0517/144630.195916:ERROR:shared_screencast_stream.cc(241)] PipeWire stream state error: no more input formats
[14824:15323:0517/144630.195926:ERROR:shared_screencast_stream.cc(204)] PipeWire remote error: no more input formats
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:417 pw_thread_loop_wait()
[14824:14824:0517/144638.525552:ERROR:wayland_event_watcher.cc(39)] libwayland: xdg_surface@58: error 5: Tried to set invalid xdg-surface geometry

For me, screensharing seems to work again in Electron-based applications and Firefox.

should work after c0e2339

I’ve been able to make it work on chronium using xdg-desktop-portal-hyprland-git (AUR). Color needs to be setted to 8 bits

monitor = $screen1,3840x2160@60,0x0,1,bitdepth,8

10 bit is expected to not work correctly at the moment on xdg-desktop-portal-hyprland or in xdg-desktop-portal-wlr (sway)

screenshot_2023-05-04_13-02-03_571483707

Proof. Also tested on Google Meet and Zoom (web version) and works as expected.

This doesn’t seem to change anything for me, unfortunately.

done

@Hubro I do not have a link. My work colleagues running Sway with xdg-desktop-portal-wlr 0.6 had the same problem with Chromium as xdg-desktop-portal-hyprland has. Apparently after the release 0.7 of xdg-desktop-portal-wlr Chromium started to work again. But again, this is only what has been told to me by one, two colleagues.

xdg-desktop-portal-wlr apparently fixed the problem in Sway.

firefox: works obs: works

cHrOmIuM: works doesnt work fix pushed works doesnt work