Score:3

OBS Wayland screen capture not working on GNOME

in flag

I've been trying to capture my screen with OBS for so long on Wayland, but never got it working really.

I run Ubuntu 21.04 with GNOME 3.38.4 and Wayland, OBS 27.1.3, xdg-desktop-portal 1.8.1-1, xdg-desktop-portal-gtk 1.8.0-1 and pipewire 0.3.24-3. The versions of these packages were installed automatically.

When I try to capture a screen or application, I just get a black screen and the following messages from OBS:

info: [pipewire] available cursor modes:
info: [pipewire]     - Metadata
info: [pipewire]     - Always visible
info: [pipewire]     - Hidden
info: PipeWire initialized (sender name: 1_455)
info: User added source 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) to scene 'Scene'
info: [pipewire] screencast session created
info: [pipewire] asking for desktop…
info: [pipewire] desktop selected, setting up screencast
[W][04590.125806][  module-rtkit.c:  200 translate_error()] RTKit error: org.freedesktop.DBus.Error.AccessDenied
[W][04590.125821][  module-rtkit.c:  460 set_nice()] could not set nice-level to -11: Permission denied
[W][04590.125972][  module-rtkit.c:  200 translate_error()] RTKit error: org.freedesktop.DBus.Error.AccessDenied
[W][04590.129800][  module-rtkit.c:  200 translate_error()] RTKit error: org.freedesktop.DBus.Error.AccessDenied
[W][04590.129980][  module-rtkit.c:  200 translate_error()] RTKit error: org.freedesktop.DBus.Error.AccessDenied
[W][04590.129994][  module-rtkit.c:  633 impl_acquire_rt()] could not make thread realtime: Permission denied
info: [pipewire] created stream 0x559a9a9d4e10
info: [pipewire] playing stream…
[E][04590.130755][        stream.c:  365 stream_set_state()] stream 0x559a9a9d4e10: error wrong resource type/version
error: [pipewire] Error id:2 seq:2 res:-71 (Unknown error -71): wrong resource type/version
[W][04590.130905][     impl-node.c:  386 suspend_node()] node 0x559a9be9db00: error unset format input: Input/output error
error: [pipewire] Error id:0 seq:3 res:-2 (Unknown error -2): unknown resource 2 op:2
error: [pipewire] Error id:0 seq:4 res:-2 (Unknown error -2): unknown resource 2 op:3

And the following messages from xdg-desktop-portal-gtk:

Okt 28 14:00:12 saphuntu systemd[6864]: Starting Portal service (GTK+/GNOME implementation)...
Okt 28 14:00:12 saphuntu systemd[6864]: Started Portal service (GTK+/GNOME implementation).
Okt 28 14:00:16 saphuntu xdg-desktop-por[48783]: Unhandled parent window type 
Okt 28 14:00:16 saphuntu xdg-desktop-por[48783]: Failed to associate portal window with parent window 
Okt 28 14:00:17 saphuntu xdg-desktop-por[48783]: g_app_info_get_display_name: assertion 'G_IS_APP_INFO (appinfo)' failed

I tried setting the QT_QPA_PLATFORM variable to "wayland" or "xcb", which didn't change anything.

I read somewhere that it might be a version incompatibility (and noticed the error message "wrong resource type/version"), but I honestly have no clue where the problem lies.

Any suggestions?

EDIT:

After a system update, Pipewire seems to work now. But only non-scaled displays are displayed correctly. Scaled ones though look really funky and are unusable. Unfortunately, I can't say what (partially) fixed it... I'm still on Ubuntu 21.04.

OBS display capture on scaled displays Wayland

OBS display capture on a UHD display with 1.5x scaling

Score:0
cn flag

Indeed there may be a version compatibility. Only recently did OBS-studio complete support for Wayland. Thus, either

  • Run Gnome on Xorg
  • or install a more recent version, e.g. using the PPA of the OBS developpers, or installing through Snap or Flatpak (the latter not enabled by default on Ubuntu).

You will need to upgrade to Ubuntu 21.10 soon anyway, because the support for 21.04 will end soon. The version of OBS that comes with Ubuntu 21.10 supports Wayland.

Begus avatar
in flag
On newer versions of OBS it doesn't work either. And running Xorg is not addressing my problem, as that is exactly what I am trying to avoid. What I don't understand, why does screen sharing work flawlessly in e.g. MS Teams or Zoom, but not on OBS. I will eventually upgrade to 21.10, thanks for the reminder. I upgraded initially when it came out, but I've had problems with the graphics driver not working, so I reverted to 21.04. I hope my problems will be fixed then.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.