FS#72972 - [obs-studio] Missing dependencies

Attached to Project: Community Packages
Opened by Patrick (ptkato) - Friday, 10 December 2021, 22:01 GMT
Last edited by Jonathan Steel (jsteel) - Thursday, 01 December 2022, 09:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jonathan Steel (jsteel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
Due to a bug in QT, gnome-shell users need to have installed qt5-wayland for obs-studio to launch.

Additional info:
* package version(s)
27.1.3
* config and/or log files etc.
--
* link to upstream bug report, if any
https://bugreports.qt.io/browse/QTBUG-68619

Steps to reproduce:
install obs-studio package through pacman, while using gnome-shell, try to launch obs-studio.
This task depends upon

Closed by  Jonathan Steel (jsteel)
Thursday, 01 December 2022, 09:05 GMT
Reason for closing:  Upstream
Comment by Antonio Rojas (arojas) - Friday, 10 December 2021, 23:05 GMT
Can you elaborate? What happens exactly when you launch obs-studio? And what does the Qt bug you linked have to do with it?
Comment by Patrick (ptkato) - Saturday, 11 December 2021, 00:41 GMT
Of course, this error pops up:

-----
$ obs
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)
-----

Now, with qt5-wayland installed, it launches as expected.
Comment by Antonio Rojas (arojas) - Saturday, 11 December 2021, 08:59 GMT
And did you set QT_QPA_PLATFORM=wayland?
Comment by Antonio Rojas (arojas) - Saturday, 11 December 2021, 09:03 GMT
Nevermind, I see OBS tries to outsmart Qt and sets the variable itself

https://github.com/obsproject/obs-studio/blob/master/UI/obs-app.cpp#L2024
Comment by Ammako (Ammako) - Saturday, 08 January 2022, 02:41 GMT
I would like to mention that obs-studio would benefit from including xdg-desktop-portal as optional dependency as well, for pipewire display/window capture support on Wayland

As per https://github.com/obsproject/obs-studio/issues/5676
Comment by Jonathan Steel (jsteel) - Wednesday, 02 February 2022, 21:20 GMT
To clarify, you are proposing both qt5-wayland and xdg-desktop-portal are added as opt depends for wayland support? I'm not entirely convinced these are obs dependencies, and not dependencies of your desktop environment. But please share your thoughts and I'll seriously consider.
Comment by Ammako (Ammako) - Wednesday, 02 February 2022, 21:33 GMT
Is it possible to run Qt(5) apps on native Wayland without qt5-wayland?

What desktop environment allows screen capture via pipewire without xdg-desktop-portal?

https://wiki.archlinux.org/title/PipeWire#WebRTC_screen_sharing

I would probably hesitate to include qt5-wayland as a dependency on the package, because otherwise you'd need to add it to -every- Qt app and that's kind of a lot. It should be the application's responsibility to gracefully fall back to x11 when qt5-wayland is not present, and the user can do their research on Wayland support to enable native Wayland for Qt apps if they need to.

xdg-desktop-portal is kind of a hard requirement for using any pipewire capture functionality though, regardless of desktop environment. Note that this may benefit x11 as well, because you can set OBS_USE_EGL=1 to use pipewire input sources under x11.
Comment by Jonathan Steel (jsteel) - Sunday, 06 February 2022, 21:44 GMT
Yes I agree I'm not convinced. Then probably best to argue xdg-desktop-portal should be a dependency of pipewire?
Comment by Ammako (Ammako) - Sunday, 06 February 2022, 21:54 GMT
You know what, that would be a better idea, yes.
Comment by Rich (rlees85) - Wednesday, 09 February 2022, 22:57 GMT
I agree would be nice to have qt5-wayland and xdg-desktop-portal as optional dependencies. Seems a bit strange to have to install QT5 components "as explicit" when really the application has a hard requirement on it under any Wayland desktop environment. At least with an optional dependency it will allow the packages to be installed without having them removed automatically by house keeping.

.. and yes in my opinion it would make perfect sense for all QT5 apps that can run on Wayland to optionally depend on qt5-wayland in the same way I would expect all QT5 apps to depend on QT5.

I cannot make any strong argument for xdg-desktop-portal being opt depends for pipewire or apps that want to screen capture.
Comment by Ammako (Ammako) - Wednesday, 09 February 2022, 23:09 GMT
There is no hard requirement on qt5-wayland because it can and should be expected to default to XWayland when qt5-wayland is not present.

For what it's worth, qt5-wayland and qt6-wayland are already optional dependencies to qt5-base and qt6-base, respectively.
Comment by Rich (rlees85) - Tuesday, 15 February 2022, 16:14 GMT
```
For what it's worth, qt5-wayland and qt6-wayland are already optional dependencies to qt5-base and qt6-base, respectively.
```

In that case, fair enough. I should have checked that first
Comment by Antonio Rojas (arojas) - Tuesday, 15 February 2022, 16:24 GMT
@Ammako > it can and should be expected to default to XWayland when qt5-wayland is not present

That's what one should expect, yes, but as I said above obs-studio tries to outsmart Qt platform detection and enforces using the wayland platform when in a wayland session, even if it is not available.
Comment by Ammako (Ammako) - Tuesday, 15 February 2022, 21:34 GMT
Yes, but what I'm saying is that upstream issues are an upstream responsibility, not an Arch responsibility. The bug should be reported upstream, if it hasn't been yet.

If upstream refuses to fix it, it's better to patch than to hide the bug with an additional dependency, imo.

Loading...