Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some flatpak apps do not work on X11, but do work on Wayland #3880

Open
garrett opened this issue Sep 30, 2020 · 9 comments
Open

Some flatpak apps do not work on X11, but do work on Wayland #3880

garrett opened this issue Sep 30, 2020 · 9 comments

Comments

@garrett
Copy link

@garrett garrett commented Sep 30, 2020

Linux distribution and version

Fedora 33 beta, Silverblue

Flatpak version

Flatpak 1.8.2

RPM: flatpak-1.8.2-2.fc33.x86_64
Silverblue: 33.20200929.n.0 (2020-09-29T08:06:48Z), 215677333515cc11110cf016a4cbb021eb929b552f5ed25bb6d403c9f19c1a4a

Description of the problem

Launching some apps simply doesn't work from the UI when in X11. They work in Wayland.

Launching the same apps from the terminal show the following:

$ flatpak run org.mozilla.firefox

(firefox:2): Gtk-WARNING **: 10:17:33.993: cannot open display: 
$ flatpak run org.gnome.Characters
Unable to init server: Could not connect: Connection refused

(org.gnome.Characters:2): Gtk-WARNING **: 10:07:23.167: cannot open display: 
$ flatpak run org.gnome.Epiphany.Devel
Unable to init server: Could not connect: Connection refused
Failed to parse arguments: Cannot open display: 

Steps to reproduce

Use Fedora 33 (possibly Silverblue), try to use some apps from Flathub. Some will work, some will not. The ones that don't work consistently do not work, including Firefox and GNOME Characters.

These work:

  • com.calibre_ebook.calibre
  • org.darktable.Darktable
  • org.signal.Signal
  • org.gimp.GIMP
  • org.inkscape.Inkscape
  • org.gnome.Evolution
  • org.gnome.Geary

These do not work:

  • org.mozilla.firefox
  • org.gnome.Characters
  • org.gnome.Calendar
  • org.gnome.clocks
  • org.gnome.GTG
  • org.gnome.Epiphany.Devel
  • com.github.tchx84.Flatseal
@felipehw
Copy link

@felipehw felipehw commented Oct 24, 2020

Is this a problem yet? I'm using Fedora 33 and everything works here.

@jurf
Copy link
Member

@jurf jurf commented Oct 28, 2020

Still is a problem, and has been since F32, maybe sooner.

I’ve been able to narrow it down to the --socket=fallback-x11 permission.

@BrainBlasted
Copy link

@BrainBlasted BrainBlasted commented Oct 28, 2020

Seems like this happens if you start a wayland session, log out, then start an X11 session.

@fushinari
Copy link

@fushinari fushinari commented Dec 13, 2020

@BrainBlasted seems to be right. Just tested on Arch. Logged into an X11 session, works fine. Logged into a Wayland session, works fine. Logged into an X11 session again, doesn't work anymore.

@MightyCreak
Copy link

@MightyCreak MightyCreak commented Jan 11, 2021

I do have the issue as well on my app: Diffuse (on Fedora 33).

Although I have the option --socket=fallback-x11, it works on Wayland, but not on Xorg.

Edit: I concur with @BrainBlasted (I forgot I didn't reboot since I changed the X server), after a reboot my app runs again properly.

@jurf
Copy link
Member

@jurf jurf commented Jan 12, 2021

Yeah, a restart fixes it here too.

@jurf
Copy link
Member

@jurf jurf commented Jan 17, 2021

This has become a considerable annoyance because I frequently change between Xorg and Wayland as some apps have problems screen-sharing under Wayland. I’d gladly help if there is a way I can.

@X-m7
Copy link

@X-m7 X-m7 commented Feb 2, 2021

In my case (Fedora Silverblue 33) I didn't need to reboot to fix it, logging out and back in with X11 again works.

@X-m7
Copy link

@X-m7 X-m7 commented Feb 2, 2021

Also I noticed in flathub/flathub#1985 a bug regarding getting GDM/GNOME to clean up Wayland sockets on logout has been reported in https://gitlab.gnome.org/GNOME/gnome-session/-/issues/75, the maintainer there noticed that Flatpak apparently has wayland-0 hardcoded as a fallback below:

wayland_display = g_getenv ("WAYLAND_DISPLAY");
if (!wayland_display)
wayland_display = "wayland-0";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants