Graph view is broken for Flatpak version of Obsidian

We do appimage too. And the flatpak is semi officially maintained by jstone. The problem is not flatpak, appimage or Deb. It’s electron-Wayland.

There might not necessarily be platform-specific code from the app developer’s side since Electron is a runtime for web technologies, but that may be something in the tab management code that’s not being presented correctly as a drag-and-drop event when running within a Wayland compositor. Some applications like Firefox have had to do some refactoring in order to reliably communicate state between windows and tabs so tabs could be split/merged and rearranged as an example.

How much of this can be fixed within Obsidian itself or in Electron, I can’t say for sure since I don’t have access to the code. However I have found other Electron apps like Discord have a similar concept of tab drag-and-drop, and I’ve found that this behavior still works as expected under Wayland.

Since our code is cross platform (win-linux-mac) and we rely on electron/chrome for mouse events, this problem is either in electron or wayland or both. There’s no if windows do this if linux do that (nor we want to add it).

We are essentially a website in an app. It’s not the website’s fault if it works on X11 but not on wayland. It’s the browser or the OS. We operate at a fairly high level of the tech stack and this is a lower level problem.

I understand that wayland users are frustrated about this and they just want somebody to do something about it.

I understand that this issue not related to the Obsidian. I asked “May I ask that why the Obsidian team chose distribute .deb file rather than flatpak format.” because when you distribute the .deb file rather than flatpak, there is OpenSuse and Fedora like popular distros that uses the .rpm package format. This distros can use Appimage format but it’s not popular like flatpak and it’s hard to set execute permission and add to the apps menu on your desktop. So for some people it is hard I think. For this, users should use an Appimage store app.
But when you distribute the flatpak format rather than .deb effort, Obsidian more reachable because most popular distros have flatpak enabled default and when users search with their app store they gonna install it very easly. And it’s more internet friendly when you update the app. I think, the only think negatif and necessary in this case that Obsidian team must be disabled the auto-update feature in the settings.
Shortly, I think the effort for the distribute the .deb file could be used on flatpak format. I wonder that what Obsidian members and community think about that. And really thank you all for patience.

I don’t believe this issue is intrinsic to Wayland, rather it might be an issue with Electron’s Wayland-specific code paths.

If you can, please file a Wayland bug with upstream Electron. I don’t have an understanding of Obsidian’s tab management logic to explain how it’s interacting with Electron, but I think it’s important enough to fix so that Obsidian can behave consistently between Wayland and X11.

I’am using org.freedesktop.Platform’s 23.08.2 version and the graph issue happened again. I guess I installed the org.freedesktop.Platform update this morning.

Does it happen on both wayland and xwayland?

You can try rolling back to see if it’s a bug in the runtime:

$ flatpak remote-info --log flathub org.freedesktop.Platform//23.08
        ID: org.freedesktop.Platform
       Ref: runtime/org.freedesktop.Platform/x86_64/23.08
      Arch: x86_64
    Branch: 23.08
Collection: org.flathub.Stable
  Download: 224.1 MB
 Installed: 589.1 MB

    Commit: 77c76ae3945175d2a48d8458f7e1129bb7102e41aae5a4eaf3228988a992e721
    Parent: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-10-04 01:32:57 +0000
   History: 

    Commit: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-21 15:57:23 +0000

    Commit: 5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-04 18:44:22 +0000
$ flatpak update org.freedesktop.Platform//23.08 --commit=5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
Looking for updates…


        ID                                Branch          Op          Remote           Download
 1.     org.freedesktop.Platform          23.08           u           flathub          < 224.2 MB

Proceed with these changes to the system installation? [Y/n]: 

I tried both xwayland and wayland and the graph issue happened.
I did this:
flatpak remote-info --log flathub org.freedesktop.Platform//23.08
result:

        ID: org.freedesktop.Platform
       Ref: runtime/org.freedesktop.Platform/x86_64/23.08
      Arch: x86_64
    Branch: 23.08
Collection: org.flathub.Stable
  Download: 224,1 MB
 Installed: 589,1 MB

    Commit: 77c76ae3945175d2a48d8458f7e1129bb7102e41aae5a4eaf3228988a992e721
    Parent: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-10-04 01:32:57 +0000
   History: 

    Commit: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-21 15:57:23 +0000

    Commit: 5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-04 18:44:22 +0000

then I choose 2023-09-21;
sudo flatpak update org.freedesktop.Platform//23.08 --commit=dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
then I open the app and issue doesn’t solved.

then I choose 2023-09-04;
sudo flatpak update org.freedesktop.Platform//23.08 --commit=5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
then I open the app and issue doesn’t solved.
then I logged out and in;
then I open the app and issue doesn’t solved.

Then I tried 2023-09-21 and this time, I logged out and in;
then I open the app and issue doesn’t solved.

And I tried all with xwayland.

Then I enabled wayland with 2023-09-21. Didn’t work either.
Then I with wayland and 2023-09-04. Didn’t work either. But this time when app I clicked the app icon to open, first I think it didn’t open then I clicked another time then 2 window opened.

Can you try running with .tar.gz with XWayland?

$ tar xf obsidian-1.4.14.tar.gz
$ cd obsidian-1.4.14/
$ ./obsidian

And then with native Wayland?

$ ./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations

And try switching between XWayland and Wayland. This feels like an intermittent graphics issue that I’ve seen before.

$ tar xf obsidian-1.4.14.tar.gz
$ cd obsidian-1.4.14/
$ ./obsidian
I tried this with wayland session on my desktop, and it is work either sandbox vault or my vault. And this is the commands wihle it’s running:

2023-10-04 13:45:06 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 13:45:07 Checking for update using Github
2023-10-04 13:45:07 Success.
2023-10-04 13:45:07 Latest version is 1.4.14
2023-10-04 13:45:07 App is up to date.
[3348:1004/164519.165370:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[3348:1004/164521.085727:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[3348:1004/164525.563366:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Username for 'https://github.com': (node:3456) Warning: Keys with collection values will be stringified due to JS Object restrictions: "{ date:YYYY-MM-DD }". Set mapAsMap: true to use object keys.
(Use `exe --trace-warnings ...` to show where the warning was created)

Then I tried with native wayland code: it is open the sandbox vault and there are no problem even the mouse correct. Then I switched to the my vault and it crashed, this is the commands:

./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations
2023-10-04 13:49:19 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 13:49:20 Checking for update using Github
2023-10-04 13:49:20 Success.
2023-10-04 13:49:20 Latest version is 1.4.14
2023-10-04 13:49:20 App is up to date.
[3786:1004/164940.981004:ERROR:shared_image_manager.cc(217)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[3786:1004/164940.997436:ERROR:shared_image_manager.cc(217)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
Segmentation fault

I tried again and it not open the app:

./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations
2023-10-04 13:51:43 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 13:51:43 Checking for update using Github
2023-10-04 13:51:44 Success.
2023-10-04 13:51:44 Latest version is 1.4.14
2023-10-04 13:51:44 App is up to date.
Segmentation fault

Then I switched to the xwayland code and I tried a couple times that close one vault to to open another. It worked with no problem:

$ ./obsidian
2023-10-04 13:52:54 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 13:52:55 Checking for update using Github
2023-10-04 13:52:55 Success.
2023-10-04 13:52:55 Latest version is 1.4.14
2023-10-04 13:52:55 App is up to date.
[4198:1004/165315.641885:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[4198:1004/165320.439503:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[4198:1004/165320.444553:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
[4198:1004/165359.521767:ERROR:shared_image_manager.cc(217)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.

I am tried again with native wayland:
it opened the app on my vault and there is no problem either graph or mouse cursor.
Then, I tried the switch to sandbox vault and it is crashed:

./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations
2023-10-04 13:55:53 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 13:55:54 Checking for update using Github
2023-10-04 13:55:54 Success.
2023-10-04 13:55:54 Latest version is 1.4.14
2023-10-04 13:55:54 App is up to date.
Username for 'https://github.com': Segmentation fault

I opened again with native wayland and it is crashed:

./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations
2023-10-04 13:58:37 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 13:58:37 Checking for update using Github
2023-10-04 13:58:38 Success.
2023-10-04 13:58:38 Latest version is 1.4.14
2023-10-04 13:58:38 App is up to date.
Segmentation fault

I tried again:

./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations
2023-10-04 13:59:31 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 13:59:32 Checking for update using Github
2023-10-04 13:59:32 Success.
2023-10-04 13:59:32 Latest version is 1.4.14
2023-10-04 13:59:32 App is up to date.
Segmentation fault

Then I tried with xwayland, The strange thing is that it is opening the two vault at the same time. In the first try with xwayland, it didn’t do that I guess:

./obsidian
2023-10-04 14:00:22 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 14:00:23 Checking for update using Github
2023-10-04 14:00:23 Success.
2023-10-04 14:00:23 Latest version is 1.4.14
2023-10-04 14:00:23 App is up to date.

Then I tried with native wayland, crashed:

./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations
2023-10-04 14:02:52 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 14:02:52 Checking for update using Github
2023-10-04 14:02:52 Success.
2023-10-04 14:02:52 Latest version is 1.4.14
2023-10-04 14:02:52 App is up to date.
Segmentation fault

I tried again and it worked, then I tried to switch to sandbox vault, and its crashed:

./obsidian --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations
2023-10-04 14:03:32 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 14:03:33 Checking for update using Github
2023-10-04 14:03:33 Success.
2023-10-04 14:03:33 Latest version is 1.4.14
2023-10-04 14:03:33 App is up to date.
Segmentation fault

It looks like you all you need for Xorg/XWayland is:

$ ./obsidian --ozone-platform=x11 

I tried this and its working but again it is opening two vault at the same time.
Then I tried to close one vault and switch to that. and viceversa:
It is working with no problem, there is no cursor or graph problem:

./obsidian --ozone-platform=x11
2023-10-04 14:05:56 Loading main app package /home/ertugruluyar/Desktop/obsidian-1.4.14/resources/obsidian.asar
2023-10-04 14:05:57 Checking for update using Github
2023-10-04 14:05:57 Success.
2023-10-04 14:05:57 Latest version is 1.4.14
2023-10-04 14:05:57 App is up to date.
Username for 'https://github.com': [6538:1004/170613.424054:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[6538:1004/170615.701262:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[6538:1004/170621.083717:ERROR:shared_image_manager.cc(217)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[6538:1004/170716.670685:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

Opening the same vault twice, or just two separate vaults? Obsidian can open multiple vaults, and remember which ones were open. Just in case you weren’t aware. (Pardon if I’m not following, exactly.)

Two separate vault.

Does the flatpak work again in either Wayland or XWayland? What about if you try using an Xorg session?

There is an update for Obsidian flathub (refresf of version), I didn’t install yet and I tried with X11 session (not tar.gz, the one that in my system) and same issue happened.
Then I installed the update for Obsidian and try with XOrg session (issue still exist) and xwayland (issue still exist).
Should I try with tar.gz and Xorg?

There’s a new Obsidian build which rolls back to a previous runtime version. Please see if running Obsidian fixes your issue.

I installed it, but issue happening. I opened with xwayland. Thank you for your efforts, maybe newer runtime versions resolve the issue.

I was getting reports of the opposite happening, where graph view was broken when running with the newer runtime. That’s why the build was rolled back to an older runtime.

Does graph view at least work with Wayland?

1 Like


I did it and it is working.