Wayland Crash when forcing native wayland

This is possible as the other day I was looking at VScode’s wayland bug reports and they were lamenting frequent crashes.

I suggest you run Obsidian using x11, or xwayland, until the pair electron/wayland is mature. They are not there yet, we other bug reports involving Obsidian not working well under wayland.

1 Like

Thanks, I have a high res laptop monitor so unfortunately I can’t use Xwayland due to the blurry scaling issue. Until this is fixed i think I’ll just need to stay on Obsidian v1.3.7

For anyone else coming across this, using the flatpak this command will take you back to the last working version which uses electron 24.3.1:

flatpak update --commit=df4ad574288b02356d5318f6d5c1edd1d7d88320a5c08d96472d695cd509bff4 md.obsidian.Obsidian

Or use the previous AppImage version downloadable from the official github.

4 Likes

Setting “Window frame style” to “Hidden” in Settings/Appearance (as opposed to “Native”) seems to prevent segfault on launch. The app does segfault for me when I quit it, but it seems functional otherwise.

i noticed this as well but it was still segfaulting for me when hovering over random things so I’m currently still on the old version

Any information on this? I am unable to launch Obsidian because it crashes on startup and my stacktrace looks similar:

2023-11-13 11:44:58 Loading main app package /tmp/.mount_obsidiAl4Ikl/resources/obsidian.asar
2023-11-13 11:44:59 Checking for update using Github
2023-11-13 11:44:59 Success.
2023-11-13 11:44:59 Latest version is 1.4.16
2023-11-13 11:44:59 App is up to date.
Debug: Enabling Wayland backend
Deleting cache directory: /home/andreasbackx/.var/app/md.obsidian.Obsidian/config/obsidian/GPUCache
Debug: Will run Obsidian with the following arguments: --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations
Debug: Additionally, user gave: --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto
2023-11-13 11:45:03 Loading main app package /app/resources/obsidian.asar
LaunchProcess: failed to execvp:
xdg-settings
Error: ENOENT: no such file or directory, open '/home/andreasbackx/.var/app/md.obsidian.Obsidian/config/obsidian/46410bd304928bd7.json'
    at Object.openSync (node:fs:601:3)
    at Object.func [as openSync] (node:electron/js2c/asar_bundle:2:1869)
    at Object.readFileSync (node:fs:469:35)
    at t.readFileSync (node:electron/js2c/asar_bundle:2:9212)
    at /app/resources/obsidian.asar/main.js:1:3390
    at R (/app/resources/obsidian.asar/main.js:1:2117)
    at E (/app/resources/obsidian.asar/main.js:1:3371)
    at N (/app/resources/obsidian.asar/main.js:25:1074)
    at se (/app/resources/obsidian.asar/main.js:25:3516)
    at /app/resources/obsidian.asar/main.js:25:11880 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/andreasbackx/.var/app/md.obsidian.Obsidian/config/obsidian/46410bd304928bd7.json'
}
2023-11-13 11:45:03 Checking for update using Github
2023-11-13 11:45:03 Success.
2023-11-13 11:45:03 Latest version is 1.4.16
2023-11-13 11:45:03 App is up to date.
/app/bin/obsidian.sh: line 62:    14 Segmentation fault      (core dumped) zypak-wrapper /app/obsidian $@ ${EXTRA_ARGS[@]}

Want to update this with my latest info because I think my previous logs were because it was trying to go from AppImage to Flatpak due to one of my personal scripts. I’ve now rules that out however and on AppImage I am not getting logs but a straight segfault:

2023-11-13 13:00:27 Loading main app package /tmp/.mount_obsidixro5Tx/resources/obsidian.asar
2023-11-13 13:00:27 Checking for update using Github
2023-11-13 13:00:28 Success.
2023-11-13 13:00:28 Latest version is 1.4.16
2023-11-13 13:00:28 App is up to date.

~ took 20.0s                                                                                                                                                                                                [13:00]
➜ echo $?
139

I can reliably trigger this by opening the vault selection screen. Then it will crash within 5 seconds for me.

yip, i’m still getting this on latest update 1.4.16. Reliably happens on vault selection screen but other random things seem to trigger it.
Still happens on flatpak, appimage and the native Nix package so its not a sandboxing issue

Also, for some reason Obsidian seg faults regardless of how it is closed. Running in a terminal and then clicking the close button gives:
segmentation fault (core dumped) obsidian --enable-features=ozone --ozone-platform=wayland

This makes it harder to workout whats actually going on

I upgraded today and had the same problem. I’m running on wayland and it crashes on the Vault selection screen. Upgrading to the older version with Electron 24 works.

I’m not sure how to get the logs, when I run it in the terminal I just get:

2023-11-22 13:25:06 Loading updated app package /home/argo/.config/obsidian/obsidian-1.4.16.asar
2023-11-22 13:25:06 Checking for update using Github

and then it crashes when I pick a vault. there is no error message

Just want to leave an update, running:

rm -rf .config/obsidian/GPUCache

Fixed the problem for me.

@argonaut’s update does not fix it in my case unfortunately.

@WhiteNoise with Wayland being adopted as a first party citizen on Linux now. Is it possible to look at improving Wayland support here? Falling back to XWayland is a bad experience due to it not supporting hidpi displays. I’m unsure if it did not support fractional scaling or scaling in general. Regardless, Obsidian is not really usable right now on Wayland.

I tried reaching out about this via email on 13/11/2023 considering Obsidian lists “Priority Support” under the commercial license which I have in addition to Obsidian Sync. Though I never got a reply except an automated one saying: " Please note that we only respond to inquiries about commercial licenses, your account, payment, add-on services (Obsidian Sync and Obsidian Publish) and security-related issues (i.e., potential vulnerabilities in Obsidian).".

Is it possible to update this “priority support” mention on the website at least as this is is false advertising the “priority support”?
image

I am sorry you didn’t get a reply. You should have been redirect to searching/posting on the forum.

Is your expectation that priority support means that we expedite your feature requests and bug reports?

Regarding native wayland on linux. Electron, the upstream project we use, still has some unresolved problems with wayland. Until those problems are fixed, xwayland is the way to go.

Could you elaborate about the unresolved problems. I have multiple electron applications running without problems on wayland. One thing I noticed is that Obsidian uses pretty old version of electron (25) where current one is 28, maybe updating dependency would help?

We will update to a newer version of electron in the next cycle. However, I am not confided that all issues have been solved upstream, especially the drag and drop one.

Posting here because my post was closed

In my case obsidian doesn’t launch at all. I don’t even see “Select vault” screen.


Steps to reproduce

  1. Use Wayland
  2. Start obsidian in terminal: obsidian
  3. Get error:
2024-01-31 16:31:19 Loading main app package /usr/lib/obsidian/obsidian.asar
[11795:0131/193119.640822:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[11795:0131/193119.640885:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[11795:0131/193119.640898:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[11795:0131/193119.640906:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2024-01-31 16:31:19 Checking for update using Github
[11795:0131/193119.679818:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 
[11943:0131/193119.783965:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[11943:0131/193119.784060:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[11943:0131/193119.784180:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[11943:0131/193119.784215:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[11943:0131/193119.784242:ERROR:shared_image_factory.cc(673)] CreateSharedImage: could not create backing.
[11943:0131/193119.784268:ERROR:shared_image_factory.cc(527)] DestroySharedImage: Could not find shared image mailbox
[11943:0131/193119.784315:ERROR:gpu_service_impl.cc(1010)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[11795:0131/193119.789935:ERROR:gpu_process_host.cc(954)] GPU process exited unexpectedly: exit_code=8704
[11948:0131/193119.812509:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
2024-01-31 16:31:19 Success.
2024-01-31 16:31:19 Latest version is 1.5.3
2024-01-31 16:31:19 App is up to date.
[11974:0131/193119.907682:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[11974:0131/193119.907748:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[11974:0131/193119.907856:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[11974:0131/193119.907890:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[11974:0131/193119.907919:ERROR:shared_image_factory.cc(673)] CreateSharedImage: could not create backing.
[11974:0131/193119.907976:ERROR:shared_image_factory.cc(527)] DestroySharedImage: Could not find shared image mailbox
[11974:0131/193119.908030:ERROR:gpu_service_impl.cc(1010)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[11948:0131/193119.910441:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[11795:0131/193119.912246:ERROR:gpu_process_host.cc(954)] GPU process exited unexpectedly: exit_code=8704
[11994:0131/193120.023154:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[11994:0131/193120.023234:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[11994:0131/193120.023347:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[11994:0131/193120.023387:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[11994:0131/193120.023419:ERROR:shared_image_factory.cc(673)] CreateSharedImage: could not create backing.
[11994:0131/193120.023453:ERROR:shared_image_factory.cc(527)] DestroySharedImage: Could not find shared image mailbox
[11994:0131/193120.023522:ERROR:gpu_service_impl.cc(1010)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[11795:0131/193120.028642:ERROR:gpu_process_host.cc(954)] GPU process exited unexpectedly: exit_code=8704
[11948:0131/193120.118290:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

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

Doesn’t change anything

Did you follow the troubleshooting guide?

Yes, but I can’t even launch obsidian so it’s not applicable.

Expected result

Obsidian launching

Actual result

Obsidian crashing

Environment

Artix Linux, wayland
Nvidia Driver Version: 545.29.06
GPU: Nvidia GTX 1080
Obsidian pacman version: 1.5.3-4
Wayland pacman version: 1.22.0-1

Obsidian 1.5.8 now comes with electron 28 which has fixed the crashing for me. Everything seems to work perfectly with the exception of dragging tabs but i believe that’s an electron issue.

Seems to be fixed in new obsidian version!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.