2
4
Fork
You've already forked apps
1

OBS Studio native & flatpak do not Screen Capture (Pipewire) #240

Open
opened 2026年07月09日 14:05:02 +02:00 by Openguin_Kernelnobi · 10 comments

Submission type

  • Bug report
  • Feature Request

Package name & version you are having issues with or have a request for

OBS Studio native version = 32.1.2
OBS Studio flatpak version = 32.1.2

Used repositories

native installed through sudo pacman -S obs-studio
flatpak installed through flatpak install com.obsproject.Studio

Expected behaviour

Screen Capture (Pipewire) should pop up a window for the user to select the screen they wish to capture and then capture that screen in real time

Actual behaviour

Screen Capture (Pipewire) does not pop up any window and just after clicking anywhere on the screen, it grabs the built-in laptop display but it isn't a real time screen capture but instead it is just a static image!

Steps to reproduce the problem

Load any version of OBS Studio > Add Source > Screen Capture (Pipewire) > OK on the pop up window > click anywhere on the screen > OK.

I uploaded 2 files: Octopi system info and a file with info that I read on the https://kaosx.us/bugs/ website that it is good to provide.

#### Submission type - [X] Bug report - [ ] Feature Request #### Package name & version you are having issues with or have a request for > OBS Studio native version = 32.1.2 > OBS Studio flatpak version = 32.1.2 #### Used repositories > native installed through sudo pacman -S obs-studio > flatpak installed through flatpak install com.obsproject.Studio #### Expected behaviour > Screen Capture (Pipewire) should pop up a window for the user to select the screen they wish to capture and then capture that screen in real time #### Actual behaviour > Screen Capture (Pipewire) does not pop up any window and just after clicking anywhere on the screen, it grabs the built-in laptop display but it isn't a real time screen capture but instead it is just a static image! #### Steps to reproduce the problem > Load any version of OBS Studio > Add Source > Screen Capture (Pipewire) > OK on the pop up window > click anywhere on the screen > OK. #### System info link created by Octopi > Tools > SysInfo > I uploaded 2 files: Octopi system info and a file with info that I read on the https://kaosx.us/bugs/ website that it is good to provide.
Owner
Copy link

warning: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: Connection already associated with an application ID")

That looks like the usual polkit issue. Portals trying to connect to polkit, and polkit not functioning due to it not connecting to an existing PID (turnstile runing as backgound seat, while polkit only works with systemd/elogind foreground seat.
So, two options for now, create workarounds so obs does not use portals (gpu-screen-recorder functions fine with the screen option, same errors when using the portal option), maybe packaging it so it defaults to 4vl2loopback or trying to make it use gpu-screen-recorder. Other option is waiting to see if a solution can be found to force polkit to work with turnstile/seatd. Not hopeful for the latter, see https://todo.sr.ht/~kennylevinsen/seatd/18?__goaway_challenge=meta-refresh&__goaway_id=6f6a208a074ed7fbc606562a3173bc1b

`warning: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: Connection already associated with an application ID")` That looks like the usual polkit issue. Portals trying to connect to polkit, and polkit not functioning due to it not connecting to an existing PID (turnstile runing as backgound seat, while polkit only works with systemd/elogind foreground seat. So, two options for now, create workarounds so obs does not use portals (gpu-screen-recorder functions fine with the `screen` option, same errors when using the `portal` option), maybe packaging it so it defaults to 4vl2loopback or trying to make it use gpu-screen-recorder. Other option is waiting to see if a solution can be found to force polkit to work with turnstile/seatd. Not hopeful for the latter, see https://todo.sr.ht/~kennylevinsen/seatd/18?__goaway_challenge=meta-refresh&__goaway_id=6f6a208a074ed7fbc606562a3173bc1b

Hi again! On the KaOS forums I posted something yesterday https://forum.kaosx.us/d/3313-obs-does-not-capture-the-screen/18 that although not the best option, it does work for me. Hopefully a solution will reveal itself in the near future or something. Thanks beforehand!

Hi again! On the KaOS forums I posted something yesterday https://forum.kaosx.us/d/3313-obs-does-not-capture-the-screen/18 that although not the best option, it does work for me. Hopefully a solution will reveal itself in the near future or something. Thanks beforehand!
Owner
Copy link

Actually some good news, it is not turnstile, seatd or portals, just tested OBS & gpu-screen-recorder (with the portal as backend) in a Plasma session, all just works. So this looks to be an environment or permissions issues. Plasma already needed a script to start up correctly, see:
78637c9dd9/greetd/plasma.sh
I will run some tests now if the missing part is setting the seatd backend in niri.

Actually some good news, it is not turnstile, seatd or portals, just tested OBS & gpu-screen-recorder (with the portal as backend) in a Plasma session, all just works. So this looks to be an environment or permissions issues. Plasma already needed a script to start up correctly, see: https://codeberg.org/KaOS/apps/src/commit/78637c9dd968f0992f0ebbdb135ed58086ac649a/greetd/plasma.sh I will run some tests now if the missing part is setting the seatd backend in niri.
Owner
Copy link

For comparison, attaching the output of obs in plasma (fully working), so it can be compared with the ouput of the log in the initial post.

For comparison, attaching the output of obs in plasma (fully working), so it can be compared with the ouput of the log in the initial post.

Hi there. Sorry if I am understanding this in the wrong way but in order to have a completely functional OBS Studio, I have to switch from niri/noctalia to KDE Plasma or I just need to figure how to go about this? 78637c9dd9/greetd/plasma.sh Thanks beforehand!

Hi there. Sorry if I am understanding this in the wrong way but in order to have a completely functional OBS Studio, I have to switch from niri/noctalia to KDE Plasma or I just need to figure how to go about this? https://codeberg.org/KaOS/apps/src/commit/78637c9dd968f0992f0ebbdb135ed58086ac649a/greetd/plasma.sh Thanks beforehand!
Owner
Copy link

No, it needs to work in niri, that is default (and how KaOS is now installed).
But instead of it yet again being a polkit (turnstile/seatd) issue (which effects plasma in exact the same way), it is something wrong in how the portals env is setup in niri (KaOS issue, not niri). I am trying different settings for niri startup in .config/niri/config.kdl, and the /usr/share/xdg-desktop-portal/niri-portals.conf, no solution yet.

No, it needs to work in niri, that is default (and how KaOS is now installed). But instead of it yet again being a polkit (turnstile/seatd) issue (which effects plasma in exact the same way), it is something wrong in how the portals env is setup in niri (KaOS issue, not niri). I am trying different settings for niri startup in `.config/niri/config.kdl`, and the `/usr/share/xdg-desktop-portal/niri-portals.conf`, no solution yet.

Hello. Let me know if you want me to try something on my system too. Thanks and good luck!

Hello. Let me know if you want me to try something on my system too. Thanks and good luck!
Owner
Copy link

I'm pretty sure I found the issue, no KaOS env or portal settings, but niri having known issues with the xdg-desktop-portal-wlr backend.
Examples:
https://github.com/niri-wm/niri/issues/2808
https://github.com/niri-wm/niri/issues/3700

Plasma just works, since it uses it's own xdg-desktop-portal-kde, that fully runs through kwin (and can only be used with kwin for screencasting).
I will keep working on getting the wlr backend working following all the upstream bug reports, in the meantime, I will add the gnome backend to the repo, since that is what niri fully supports.

I'm pretty sure I found the issue, no KaOS env or portal settings, but niri having known issues with the xdg-desktop-portal-wlr backend. Examples: https://github.com/niri-wm/niri/issues/2808 https://github.com/niri-wm/niri/issues/3700 Plasma just works, since it uses it's own xdg-desktop-portal-kde, that fully runs through kwin (and can only be used with kwin for screencasting). I will keep working on getting the wlr backend working following all the upstream bug reports, in the meantime, I will add the gnome backend to the repo, since that is what niri fully supports.
Owner
Copy link

Using the gnome portal is no option, it requires the full gnome shell to build.
Quite a lot of extra configuration files have been tried to make the xdg-desktop-portal-wlr works, no change (not really expected, looking at all the bug reports in niri, it is not really supported).
Since the gpu-screen-recorder also only works with portals on wayland, and you already noted things worked with wf-recorder, I added wl-screenrec to the repo, so a fully working option is available (without having to go through X11 as with gpu-screen-recorder).
Let me know if you can use wl-screenrec in OBS the same way as wl-recorder.
It has not moved to all users yet, so for now you can get it with:

sudo pacman -U http://kaosx.tk/repo/build/wl-screenrec-0.2.0-1-x86_64.pkg.tar.zst

For details on what is possible with it:
https://github.com/russelltg/wl-screenrec/blob/main/README.md

Using the gnome portal is no option, it requires the full gnome shell to build. Quite a lot of extra configuration files have been tried to make the xdg-desktop-portal-wlr works, no change (not really expected, looking at all the bug reports in niri, it is not really supported). Since the gpu-screen-recorder also only works with portals on wayland, and you already noted things worked with wf-recorder, I added wl-screenrec to the repo, so a fully working option is available (without having to go through X11 as with gpu-screen-recorder). Let me know if you can use wl-screenrec in OBS the same way as wl-recorder. It has not moved to all users yet, so for now you can get it with: ``` sudo pacman -U http://kaosx.tk/repo/build/wl-screenrec-0.2.0-1-x86_64.pkg.tar.zst ``` For details on what is possible with it: https://github.com/russelltg/wl-screenrec/blob/main/README.md

Hi Demm and thank you for everything. If I understood you correctly, I had to use the same logic but after this:
sudo insmod ~/v4l2loopback/v4l2loopback.ko video_nr=10 card_label="OBS Virtual Camera" exclusive_caps=1

and after using it like this:
wl-screenrec --v4l2-sink=/dev/video10 --codec rawvideo

I am getting this:

`error: unexpected argument '--v4l2-sink' found
Usage: wl-screenrec [OPTIONS]
For more information, try '--help'.`

I tried compiling wl-screenrec from the source to the latest version with support for v4l2 and also by installing v4l2 support for Kaos Linux like this:
sudo pacman -S v4l-utils

Also I needed rust and clang which I grabbed like this:
sudo pacman -S rust clang

I had to take care afterwards the issue of having 2 different versions of wl-screenrec and still failed to do what I have been doing with wf-recorder.

Maybe I don't remember the exact sequence of events and/or all this is way -WAY- over my head but long story short, I failed replicating the wf-recorder way of having OBS Studio record and/or stream the laptop screen with wl-screenrec.

I wish I could be of a better help.

Hi Demm and thank you for everything. If I understood you correctly, I had to use the same logic but after this: `sudo insmod ~/v4l2loopback/v4l2loopback.ko video_nr=10 card_label="OBS Virtual Camera" exclusive_caps=1` and after using it like this: `wl-screenrec --v4l2-sink=/dev/video10 --codec rawvideo` I am getting this: ``` `error: unexpected argument '--v4l2-sink' found Usage: wl-screenrec [OPTIONS] For more information, try '--help'.` ``` I tried compiling wl-screenrec from the source to the latest version with support for v4l2 and also by installing v4l2 support for Kaos Linux like this: `sudo pacman -S v4l-utils` Also I needed rust and clang which I grabbed like this: `sudo pacman -S rust clang` I had to take care afterwards the issue of having 2 different versions of wl-screenrec and still failed to do what I have been doing with wf-recorder. Maybe I don't remember the exact sequence of events and/or all this is way -WAY- over my head but long story short, I failed replicating the wf-recorder way of having OBS Studio record and/or stream the laptop screen with wl-screenrec. I wish I could be of a better help.
Sign in to join this conversation.
No Branch/Tag specified
master
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
KaOS/apps#240
Reference in a new issue
KaOS/apps
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?