NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14.01k forks source link

`smplayer` and `vlc` do not run under GNOME Wayland #313695

Open arximboldi opened 5 months ago

arximboldi commented 5 months ago

Describe the bug

These two video players do not work under wayland. The application just closes immediately. For example:

$ vlc
VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)

And just closes.

Other video players that do work fine are umpv or the Gnome Videos app.

I am using Wayland with Gnome. The programs work properly under Gnome with Xorg or other Xorg based desktop environments.

Expected behavior

The program opens and works properly.

Notify maintainers

@AndersonTorres @pcasaretto

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here

Add a :+1: reaction to issues you find important.

AndersonTorres commented 5 months ago

In the case of VLC, have you tried to set QT_QPA_PLATFORM=wayland?

About smplayer, I will search about Wayland support OOTB.

P.S.: pcasaretto is maintaining the binary package for MacOS, not the Linux one.

P.S.: From https://wiki.archlinux.org/title/VLC_media_player

vlc-gitAUR builds with Wayland support by default. Set the QT_QPA_PLATFORM=wayland environment variable to enable Wayland. See Wayland#Qt for more info.

Note that although the --enable-wayland build flag is used in the vlc PKGBUILD (which currently uses VLC version 3.0), Xwayland is used anyway, as Wayland support on VLC 3 is broken. Video output in VLC may be cropped or otherwise malformed unless xorg-xwayland is installed.

arximboldi commented 5 months ago

I have tried. I have problems with other programs as well, like Steam.

I think they are running with Xwayland. I have tried this:

$ xlsclients
ce1  gsd-xsettings
ce1  vlc
ce1  steamwebhelper
ce1  steam

So there must be something wrong with my Xwayland configuration, so that I can't see the windows at all...

arximboldi commented 5 months ago

Same with programs like glxgears or xeyes, the programs run but I see no window. No clue where the windows are going! :cry:

arximboldi commented 5 months ago

Ok, after some messing around... I changed from lightdm to gdm as session manager, and Xwayland applications now work!

arximboldi commented 5 months ago

Sorry for the noise!

arximboldi commented 5 months ago

Sorry, my bad. I actually didn't test properly, I was in an Xorg session... the problem persists :(

arximboldi commented 5 months ago

More details: the given programs seem to work properly under Sway instead of Gnome, and use wayland instead of attempting Xwayland.

Quaqqer commented 4 months ago

I had the same issue with x-windows not working under gnome in wayland. After hours of bisecting my config I found the culprit, picom. I suspect that the problem was that picom starts itself with a file in /etc/xdg/autostart which messes with how gnome handles xwayland. Maybe you have the same issue, or something similar?

arximboldi commented 4 months ago

@Quaqqer! It could be... I actually have it installed. But I must admit I gave up and went back to my previous Xmonad based configuration.

I was enticed by Wayland's increased performance (you can really feel it while scrolling), not having to maintain lots of hacks that break from time to time to keep basic stuff working (multimedia keys, etc.), Gnome seems to have actually nice tiling features, specially with extensions, and is nicer for other people to use when they borrow your computer. But in the end I was disappointed that Gnome was being even more painful to get working properly, so I just fixed a couple of my current pain points with Xmonad and went back to it, where honestly my muscle memory is really deeply ingrained :sweat_smile:

I'll give it a try soon though, if only just to see if that was the culprit so it can help others that stumble with the same issue.

Quaqqer commented 4 months ago

@arximboldi I feel you 😄, I've had the same experience with Gnome on NixOS before. First it was xdg-desktop-portals, now this. After literal years I can finally have it installed alongside sway without weird behaviours (although some hacks were required 😉).