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

Logseq blank screen Flatpak #5642

Closed
Swoooshhh opened this issue Jun 10, 2022 · 24 comments
Closed

Logseq blank screen Flatpak #5642

Swoooshhh opened this issue Jun 10, 2022 · 24 comments

Comments

@Swoooshhh
Copy link

What happened?

When I open the app it doesn't load anything in, but when I put my mouse over it, it detects text there. Maybe a font issue?

Reproduce the Bug

  1. Download from Flatpak
  2. Open App

Expected Behavior

To be able to see the app content

Screenshots

Logseq

Desktop Platform Information

OS version: Fedora Silverblue 36
App: Flatpak

Mobile Platform Information

No response

Additional Context

No response

@ranfdev
Copy link
Contributor

ranfdev commented Jun 10, 2022

I guess It's a problem with electron (used by logseq) and wayland (used by your desktop environment).
I haven't installed logseq as a Flatpak, but I have the same issue (in wayland).

I have to run logseq with logseq --enable-features=UseOzonePlatform --ozone-platform=wayland.

@Swoooshhh
Copy link
Author

I guess It's a problem with electron (used by logseq) and wayland (used by your desktop environment). I haven't installed logseq as a Flatpak, but I have the same issue (in wayland).

I have to run logseq with logseq --enable-features=UseOzonePlatform --ozone-platform=wayland.

Oddly Logseq isn't a command, probably a different name since its from flatpak

@JonathanWallace45
Copy link

Same problem here i've tried the following command:
flatpak run com.logseq.Logseq --enable-features=UseOzonePlatform --ozone-platform=wayland
with no success the following error message is displayed in terminal
LaunchProcess: failed to execvp: xdg-settings [3:0612/140330.733207:ERROR:wayland_connection.cc(180)] Failed to connect to Wayland display [3:0612/140330.733231:FATAL:ozone_platform_wayland.cc(211)] Failed to initialize Wayland platform
Hope that helps!

@Swoooshhh
Copy link
Author

I guess It's a problem with electron (used by logseq) and wayland (used by your desktop environment). I haven't installed logseq as a Flatpak, but I have the same issue (in wayland).

I have to run logseq with logseq --enable-features=UseOzonePlatform --ozone-platform=wayland.

That worked for the .appimage except i cant move it or resize the window

@Swoooshhh
Copy link
Author

Do I just wait for them to fix it? App isn't usable.

@ranfdev
Copy link
Contributor

ranfdev commented Jun 17, 2022

A fix is certainly needed... In the meantime, you can still use the app even without having a titlebar (I'm doing so). If you are using GNOME, you can move the window by holding the Super key and dragging with the mouse over the window. To maximize, drag the window to the top border of your screen, etc...

@martin-desktops
Copy link

Downloading the Flathub beta branch release solved that issue for me, try it yourself

@kanru
Copy link
Contributor

kanru commented Jun 22, 2022

Downloading the Flathub beta branch release solved that issue for me, try it yourself

The version in beta branch is old so don't use it. However, that does indicate it's a problem introduced by later version.

Could you all share your distro and version so I can try to reproduce? I'm running Debian unstable with Wayland + XWayland and Logseq is working fine.

@martin-desktops
Copy link

I came across the problem on Fedora 36 Workstation, Wayland

@mfru
Copy link

mfru commented Jun 23, 2022

Fedora 36 Workstation (nVidia graphics w/ proprietary driver, Wayland)
Logseq 0.7.5 (Flatpak)

flatpak run com.logseq.Logseq

LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 21:58:54.677: Failed to load module "canberra-gtk-module"
Gtk-Message: 21:58:54.677: Failed to load module "pk-gtk-module"
Gtk-Message: 21:58:54.677: Failed to load module "canberra-gtk-module"
Gtk-Message: 21:58:54.677: Failed to load module "pk-gtk-module"
[3:0623/215854.684685:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
LaunchProcess: failed to execvp:
xdg-settings
21:58:54.720 › Logseq App(0.7.5) Starting... 
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

Resulting in blank screen.


flatpak run com.logseq.Logseq --enable-features=UseOzonePlatform --ozone-platform=wayland

LaunchProcess: failed to execvp:
xdg-settings
[3:0623/220155.072148:ERROR:wayland_connection.cc(180)] Failed to connect to Wayland display
[3:0623/220155.072163:FATAL:ozone_platform_wayland.cc(211)] Failed to initialize Wayland platform
/app/bin/run.sh: line 2:     3 Trace/breakpoint trap   (core dumped) zypak-wrapper.sh /app/logseq/Logseq "$@"

Resulting in no launch

@kanru
Copy link
Contributor

kanru commented Jun 23, 2022

I tried to run the flatpak with Fedora 36 Workstation live CD and didn't get blank screen. I wonder if it's related to GPU acceleration.

In this post it was mentioned problem with org.freedesktop.Platform.GL.default from gnome-nightly
https://ask.fedoraproject.org/t/no-longer-getting-gpu-acceleration-in-some-flatpak-apps-after-updating-fedora-silverblue/19927

Would you like to try the troubleshooting steps in the post?

@mfru
Copy link

mfru commented Jun 26, 2022

Would you like to try the troubleshooting steps in the post?

The steps described didn't solve the issue for me, unfortunately.

I uninstalled with flatpak remove org.freedesktop.Platform.GL.default, chose 21.08. (There is also a version 20.08 installed.)

Tried running as sanity check (maybe different errors?), but got the same errors.

Then installed flatpak install org.freedesktop.Platform.GL.default, chose 21.08 from flathub (system)

Again, same errors and blank screen.

@mfru
Copy link

mfru commented Jun 26, 2022

Running ELECTRON_ENABLE_LOGGING=true flatpak run com.logseq.Logseq

yields

LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 16:32:44.526: Failed to load module "canberra-gtk-module"
Gtk-Message: 16:32:44.526: Failed to load module "pk-gtk-module"
Gtk-Message: 16:32:44.526: Failed to load module "canberra-gtk-module"
Gtk-Message: 16:32:44.526: Failed to load module "pk-gtk-module"
[3:0626/163244.533354:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
LaunchProcess: failed to execvp:
xdg-settings
16:32:44.569 › Logseq App(0.7.5) Starting... 
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[53:0626/163244.625355:WARNING:gpu_sandbox_hook_linux.cc(445)] dlopen(libxcb-dri3.so) failed with error: libxcb-dri3.so: cannot open shared object file: No such file or directory
[53:0626/163244.625523:WARNING:gpu_sandbox_hook_linux.cc(447)] dlopen(libxcb-present.so) failed with error: libxcb-present.so: cannot open shared object file: No such file or directory
[53:0626/163244.625595:WARNING:gpu_sandbox_hook_linux.cc(450)] dlopen(libxcb-sync.so) failed with error: libxcb-sync.so: cannot open shared object file: No such file or directory
[3:0626/163246.123313:INFO:CONSOLE(2)] "[object Object]", source: file:///app/logseq/resources/app/js/lsplugin.core.js (2)
[3:0626/163246.295517:INFO:CONSOLE(71571)] "
    Welcome to Logseq!
    If you encounter any problem, feel free to file an issue on GitHub (https://github.com/logseq/logseq)
    or join our Discord server (https://discord.gg/KpN4eHY).
    .____
    |    |    ____   ____  ______ ____  ______
    |    |   /  _ \ / ___\/  ___// __ \/ ____/
    |    |__(  <_> ) /_/  >___ \\  ___< <_|  |
    |_______ \____/\___  /____  >\___  >__   |
            \/    /_____/     \/     \/   |__|
     ", source: file:///app/logseq/resources/app/js/main.js (71571)
[3:0626/163246.345812:INFO:CONSOLE(1630)] "[object Object] [object Object]", source: file:///app/logseq/resources/app/js/main.js (1630)
[3:0626/163246.353252:INFO:CONSOLE(7384)] "[query journals] ", source: lsp://logseq.io/logseq-journals-calendar/dist/assets/index.dd734841.js (7384)
[3:0626/163246.811579:INFO:CONSOLE(1630)] ""Datascript query: " [:find (pull ?b [:db/id :block/uuid :block/parent :block/left :block/collapsed? :block/format :block/refs :block/_refs :block/path-refs :block/tags :block/content :block/marker :block/priority :block/properties :block/pre-block? :block/scheduled :block/deadline :block/repeated? :block/created-at :block/updated-at :block/file :block/heading-level {:block/page [:db/id :block/name :block/original-name :block/journal-day]} {:block/_parent ...}]) :in $ % :where [?b :block/refs ?bp] [?bp :block/name "card"] nil]", source: file:///app/logseq/resources/app/js/main.js (1630)
[3:0626/163246.912264:INFO:CONSOLE(1630)] "reloading custom.css", source: file:///app/logseq/resources/app/js/main.js (1630

Looks like there might be a library missing?

[53:0626/163244.625355:WARNING:gpu_sandbox_hook_linux.cc(445)] dlopen(libxcb-dri3.so) failed with error: libxcb-dri3.so: cannot open shared object file: No such file or directory
[53:0626/163244.625523:WARNING:gpu_sandbox_hook_linux.cc(447)] dlopen(libxcb-present.so) failed with error: libxcb-present.so: cannot open shared object file: No such file or directory
[53:0626/163244.625595:WARNING:gpu_sandbox_hook_linux.cc(450)] dlopen(libxcb-sync.so) failed with error: libxcb-sync.so: cannot open shared object file: No such file or directory

The flatpak version of Brave seems to (sometimes?) have a similar issue: flathub/com.brave.Browser#133

@mfru
Copy link

mfru commented Jun 26, 2022

So libxcb is for interfacing with X11.

And

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

might be a recent error with electron electron/electron#30902

@mfru
Copy link

mfru commented Jun 26, 2022

By overriding the socket as described in

https://stackoverflow.com/questions/63187542/how-to-run-electron-apps-for-wayland

flatpak override --user --socket=wayland com.logseq.Logseq

GDK_BACKEND=wayland flatpak run com.logseq.Logseq --enable-features=UseOzonePlatform --ozone-platform=wayland

I get a populated window now, but without decoration and without it being movable.

From microsoft/vscode#124202 I got the tip for using SUPER + <left mouse> to move the window, which works.

Adding WaylandWindowDecorations from microsoft/vscode#109176 (comment) does not bring back window decorations.

(GDK_BACKEND=wayland flatpak run com.logseq.Logseq --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland)

For now at least having a movable window with a working application is good enough for me.

@Srijal97
Copy link

I have the same issue on Fedora 36 with Nvidia drivers and Wayland. The temporary workaround described by @mfru above works for me. Thanks!

@mfru
Copy link

mfru commented Jul 18, 2022

The jump from 0.7.5 to 0.7.6 seems to have fixed it.

I can launch Logseq without a workaround now.

@DoodlesEpic
Copy link

DoodlesEpic commented Jul 18, 2022

This seems to be similar problem to what was reported on the Bitwarden repositories at:
bitwarden/clients#2661 (comment)

The upstream issue on Electron I'm referring to is this one:
electron/electron#33355

If this is the case then updating the Electron version should fix the problem as this was a problem with the Chromium version Electron was shipping and Wayland support has gotten much better since then. Updating will allow the application to display perfectly on Wayland without the need to add the --enable-features=UseOzonePlatform --ozone-platform=wayland or --use-gl=desktop parameters to the application desktop file (or changing to Nouveau drivers)

@Srijal97
Copy link

I still have the same issue in 0.7.6

Does the Electron update have to come with a future Logseq build, or is it something I can install on my system with the current version?

@Swoooshhh
Copy link
Author

Reopening because I switched from Fedora Silverblue to Fedora Workstation and now I'm getting a blank screen again.

@Swoooshhh Swoooshhh reopened this Jul 23, 2022
@Srijal97
Copy link

Can confirm that I still have the error even with the latest Nightly build on Fedora 36 Workstation. Here is the error I get on my terminal:

16:43:42.150 › Logseq App(0.7.8) Starting... 
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Error occurred in handler for 'main': Error: An object could not be cloned.
    at Object.on.e._reply (node:electron/js2c/browser_init:165:10058)
    at node:electron/js2c/browser_init:201:556

@Swoooshhh
Copy link
Author

Swoooshhh commented Jul 24, 2022

$ flatpak run com.logseq.Logseq
Gtk-Message: 04:44:19.109: Failed to load module "canberra-gtk-module"
Gtk-Message: 04:44:19.109: Failed to load module "pk-gtk-module"
Gtk-Message: 04:44:19.109: Failed to load module "canberra-gtk-module"
Gtk-Message: 04:44:19.109: Failed to load module "pk-gtk-module"
[3:0724/044419.115513:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directorypak run com.logseq.Logseq
Gtk-Message: 04:44:19.109: Failed to load module "canberra-gtk-module"
Gtk-Message: 04:44:19.109: Failed to load module "pk-gtk-module"
Gtk-Message: 04:44:19.109: Failed to load module "canberra-gtk-module"
Gtk-Message: 04:44:19.109: Failed to load module "pk-gtk-module"
[3:0724/044419.115513:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

and i get this if i run it normally

$ ./Logseq 
05:02:01.874 › Logseq App(0.7.8) Starting... 
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Error occurred in handler for 'main': Error: An object could not be cloned.
    at Object.on.e._reply (node:electron/js2c/browser_init:165:10058)
    at node:electron/js2c/browser_init:201:556

@mxafi
Copy link

mxafi commented Jul 24, 2022

I came across the problem on Fedora 36 Workstation, Wayland

Tried running flatpak, appimage, and from src (Logseq 0.7.7). On Fedora 36 Workstation, gnome, x11, nvidia 515.57

Everything has this in common:
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

and at least on flatpak (0.7.6 - 0.7.7) this repeated on multiple lines:
[3:0724/202157.925401:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

Currently can still launch the flatpak with the --in-process-gpu flag.

@cnrpman cnrpman added the need-to-reproduce More clues are required to reproduce the issue. label Jul 26, 2022
@github-actions
Copy link

Hi There! 👋

We haven't seen any activity on this issue in a while 😴, and we just wanted to make sure that it's still relevant. If you're still experiencing this issue, you might find it helpful to update to the latest version of Logseq. The latest version includes bug fixes and new features that may help to resolve this issue, and you can download it from our website. If updating to the latest version doesn't help, please let us know by adding a comment 💬. We're here to help!

If the issue has been resolved or is no longer relevant, that's great news! 🎉
We'll go ahead and close this issue to keep our backlog organized. Please note that this issue will be closed automatically in 20 days if there is no further activity. If you need more time to resolve the issue or provide more information, please just let us know by adding a comment.

Access additional Logseq 🚀 resources:

Thanks for your contributions to Logseq! If you have any other issues or feature requests, please don't hesitate to let us know. We always welcome pull requests too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

10 participants