flathub / com.github.iwalton3.jellyfin-media-player

https://flathub.org/apps/details/com.github.iwalton3.jellyfin-media-player
GNU General Public License v3.0
1 stars 5 forks source link

Restore Wayland support in the flatpak #4

Closed MayeulC closed 2 years ago

MayeulC commented 2 years ago

(using the jellyfin-media-player repo template as I initially started to fill it there)

Describe the bug I am using sway. jellyfin-media-player used to work perfectly on wayland, and has for a lot of time (I'd say at least a year, if not two). Wayland support seems to have relatively recently (couple months) been disabled for no apparent reason, which made it stop working on my machine.

I do have QT_QPA_PLATFORM=wayland-egl in my environment. I've been watching Qt apps steadily adopt wayland over time, this is the first time any program drops wayland compatibility.

%  com.github.iwalton3.jellyfin-media-player
Failed to create wl_display (No such file or directory)
qt.qpa.wayland: Failed to initialize EGL display 3001
qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
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, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

I can work around by setting QT_QPA_PLATFORM=xcb, but that's one step further from reducing my reliance on x, with all the privacy and security issue that entails. Moreover, wayland is a good fit for embedded systems and media centers, and a kiosk compositor such as https://github.com/Hjdskes/cage can be used together with jellyfin-media-player, though it now requires xwayland as well.

Right before posting that report, I found https://github.com/flathub/com.github.iwalton3.jellyfin-media-player/commit/381bd4a9c48d23c8aea964d7432958268404be45 and can confirm that enabling socket=wayland (can be done easily with flatseal) restores the functionality.

A clear and concise description of what the bug is.

To Reproduce

  1. Run a wayland compositor (sway can be ran inside an X11 compositor, for instance)
  2. export QT_QPA_PLATFORM=wayland-egl
  3. Launch jellyfin-media-player
  4. jellyfin-media-player refuses to launch

Expected behavior jellyfin-media-player should launch just fine, as it had been until now. Especially when the backend is forced through an environment variable. If you experience issues with wayland, the preference order can be changed.

Desktop (please complete the following information):

Additional context

june128 commented 2 years ago

I think https://github.com/jellyfin/jellyfin-media-player/issues/40 was the reason Wayland got disabled. See: https://github.com/jellyfin/jellyfin-media-player/issues/40#issuecomment-1066966495 and https://github.com/flathub/com.github.iwalton3.jellyfin-media-player/commit/381bd4a9c48d23c8aea964d7432958268404be45 . But now that this issue is closed (since titlebars work in the most recent version under Gnome Wayland), I think enabling Wayland support again should now be okay.

TingPing commented 2 years ago

But now that this issue is closed (since titlebars work in the most recent version under Gnome Wayland), I think enabling Wayland support again should now be okay.

I'm confused how this is true. Nothing has changed as far as I can tell. @MayeulC Can you confirm you have a titlebar with --socket=wayland?

nalsai commented 2 years ago

I manually enabled wayland through flatseal because I use fractional scaling and everything that doesn't use wayland looks a bit blurry with it. Jellyfin Media Player does have a titlebar with wayland now, although the titlebar uses a light theme, while the rest of the system uses dark theme (might be because it's not yet updated for gnome 42, which added new official support for dark and light theme). Reading through the issues, the other problems with wayland seem to be fixed too.

TingPing commented 2 years ago

Thanks for the input. I've re-enabled it.

MayeulC commented 2 years ago

Thanks, I'm glad to hear it. Sorry for not answering your request for re-testing, I do not have a Gnome install handy, and couldn't really install one on the computers I have at hand. I asked a few friends if they could do it, but haven't heard back from them yet.