Graph view is broken for Flatpak version of Obsidian

Thank you, I think Obsidian give a flatpak version rather than .deb file. But I can’t decide that.
I look the config of Obsidian. And it’s not using Wayland now. So, it’s working on X11 or XWayland.


I’am gonna try that unselect X11 in Socets and OBSIDIAN_USE_WAYLAND value to 1 in Environment. And viceversa.

It’s works now, I think because of I’am using wayland on my Desktop, but I didn’t do “OBSIDIAN_USE_WAYLAND value to 1 in Environment.” So it’s used the XWayland I guess. Now I’am using with Wayland and problem solved. Thank you again.

What hardware and drivers are you using?

On another note, the build you’re using may have been using a buggy version of Electron:

EDIT: Re-built a couple of hours after the original release due to the original one using the wrong Electron version.

The builds had to be manually updated because of this:

Please update your Obsidian flatpak and see if the issue persists.

1 Like

image
All of them up to date.
Thanks.

I just notice something that cursor theme different from my system. It’s not following my system cursor theme. I’am using Breeze cursor theme and Obsidian uses windows-like cursor theme. I tried to set XCURSOR_PATH to /usr/share/icons but it didn’t work (I have also give the filesystem access).



Also cursor’s size bigger than normal.
I’am using Obsidian with Wayland now.

But, later I notice that drag and drop tabs doesn’t work. Then I enabled X11 and Wayland option and then I do that “OBSIDIAN_USE_WAYLAND value to 0 in Environment.”. Now It’s working because I updated Obsidian this morning. And there is no cursor issue anymore.

Drag-and-drop in Obsidian has never worked when it’s using native Wayland instead of XWayland:

I don’t think this will change until upstream Obsidian makes Wayland support a blocking issue. That’s why I implemented OBSIDIAN_USE_WAYLAND as an opt-in feature and is unlikely to be used by default for a long time.

1 Like

Thank you for the explanation. Soon, Wayland will be first option for Linux DE. Then Obsidian team would be handle it properly, I suppose.

Considering that upstream Gnome uses Wayland by default, upstream KDE is planning to make it the default session, and various toolkits and distributions now support it, it’s safe to say that native Wayland support is definitely an important feature for an optimal experience on Linux these days.

1 Like

We do not have platform specific code. The problems you are experiencing is either due to electron/chrome or Wayland itself or both.

They can set Wayland as default but that does mean it’s ready. My advice is to use x11 or xwayland until the upstream issues are ironed out.

1 Like

Thank you.
May I ask that why the Obsidian team chose distribute .deb file rather than flatpak format.

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