30000ms Startup time on Arch Linux/Wayland environment with intel/nvidia GPU

Bug report

Hello folks,
I recently switched from MacOS to Arch Linux.
I now encounter some issues while startup. Inkdrop needs up to 30 seconds to start, which is crazy.
Some member in the dc community recommended to use the --enable-logging flag - brilliant:

[3904:0113/091323.942745:WARNING:wayland_object.cc(164)] Binding to wl_seat version 8 but version 9 is available.
[3904:0113/091323.942805:WARNING:wayland_object.cc(164)] Binding to wp_cursor_shape_manager_v1 version 1 but version 2 is available.
[3904:0113/091323.942820:WARNING:wayland_object.cc(164)] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available.
[3904:0113/091323.942886:WARNING:wayland_object.cc(164)] Binding to zwp_linux_dmabuf_v1 version 3 but version 5 is available.
  app:info Creating app window +0ms
[3904:0113/091324.029691:WARNING:wayland_surface.cc(189)] Server doesn't support zcr_alpha_compositing_v1.
[3904:0113/091324.029725:WARNING:wayland_surface.cc(204)] Server doesn't support overlay_prioritizer.
[3904:0113/091324.029729:WARNING:wayland_surface.cc(220)] Server doesn't support surface_augmenter.
[3904:0113/091324.029734:WARNING:wayland_surface.cc(254)] Server doesn't support zcr_color_management_surface.
  app:info Initializing inkdrop app.. +142ms
  app:info Starting the main process.. +3ms
  app:info axios default config: { proxy: false, httpAgent: undefined, httpsAgent: undefined } +2ms
  app:info Starting a session +54ms
[3940:0113/091324.256909:WARNING:vaapi_wrapper.cc(1524)] Skipping nVidia device named: nvidia-drm
[3904:0113/091324.301412:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
  app:info Finished starting the main process +174ms
  app:info Command line argument: /usr/lib/inkdrop/inkdrop +1ms
  app:info Arguments: /usr/lib/inkdrop/inkdrop +0ms
  app:info Command line argument: --enable-logging +1ms
  app:info Arguments: --enable-logging +0ms
  app:info Migrating credentials from keytar to safeStorage +8ms
  app:error Failed to migrate credentials to safeStorage: Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
    at te (/usr/lib/inkdrop/resources/app.asar/main.js:2:21473)
    at Object.migrateToSafeStorage (/usr/lib/inkdrop/resources/app.asar/main.js:2:23866) +0ms
[3940:0113/091324.822078:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[3940:0113/091324.892253:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[3940:0113/091324.892573:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[3940:0113/091324.892747:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[3904:0113/091324.915586:INFO:CONSOLE(77)] "isDarkMode? true", source: file:///usr/lib/inkdrop/resources/app.asar/index.html?windowType=full&entry=main&windowId=1 (77)
intel: the execbuf ioctl keeps returning ENOMEM
[3904:0113/091342.545896:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=134
[3904:0113/091342.545915:WARNING:gpu_process_host.cc(1436)] The GPU process has crashed 1 time(s)
[4073:0113/091342.716197:WARNING:vaapi_wrapper.cc(1524)] Skipping nVidia device named: nvidia-drm
[4073:0113/091343.222274:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[3904:0113/091343.223501:WARNING:gpu_process_host.cc(1024)] Reinitialized the GPU process after a crash. The reported initialization time was 673 ms
[4073:0113/091343.227397:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[4073:0113/091343.227691:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[4073:0113/091343.227865:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
intel: the execbuf ioctl keeps returning ENOMEM
[3904:0113/091400.763576:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=134
[3904:0113/091400.763612:WARNING:gpu_process_host.cc(1436)] The GPU process has crashed 2 time(s)
[4139:0113/091400.937603:WARNING:vaapi_wrapper.cc(1524)] Skipping nVidia device named: nvidia-drm
[4139:0113/091401.447962:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[3904:0113/091401.449155:WARNING:gpu_process_host.cc(1024)] Reinitialized the GPU process after a crash. The reported initialization time was 677 ms
[4139:0113/091401.452663:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[4139:0113/091401.452981:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[4139:0113/091401.453229:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
intel: the execbuf ioctl keeps returning ENOMEM
[3904:0113/091419.048100:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=134
[3904:0113/091419.048116:WARNING:gpu_process_host.cc(1436)] The GPU process has crashed 3 time(s)
[4186:0113/091419.180574:WARNING:vaapi_wrapper.cc(1524)] Skipping nVidia device named: nvidia-drm
[4186:0113/091419.698591:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[3904:0113/091419.700092:WARNING:gpu_process_host.cc(1024)] Reinitialized the GPU process after a crash. The reported initialization time was 648 ms

So, apparently it is an issue with my stack of hardware/environment configs.
When I start inkdrop with disabled gpu and gpu-compositing, it works as expected.

NOTE: Log with disabled gpu:

…/share/applications ❯ inkdrop --disable-gpu --disable-gpu-compositing

  app:info Creating app window +0ms
  app:info Initializing inkdrop app.. +100ms
  app:info Starting the main process.. +1ms
  app:info axios default config: { proxy: false, httpAgent: undefined, httpsAgent: undefined } +1ms
  app:info Starting a session +49ms
  app:info Finished starting the main process +142ms
  app:info Command line argument: /usr/lib/inkdrop/inkdrop +1ms
  app:info Arguments: /usr/lib/inkdrop/inkdrop +0ms
  app:info Command line argument: --disable-gpu +0ms
  app:info Arguments: --disable-gpu +0ms
  app:info Command line argument: --disable-gpu-compositing +1ms
  app:info Arguments: --disable-gpu-compositing +0ms
  app:info Migrating credentials from keytar to safeStorage +5ms
  app:error Failed to migrate credentials to safeStorage: Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
    at te (/usr/lib/inkdrop/resources/app.asar/main.js:2:21473)
    at Object.migrateToSafeStorage (/usr/lib/inkdrop/resources/app.asar/main.js:2:23866) +0ms
  app:info Unloading app +6s

I don’t know IF this is something really necessary to be fixed within the application, because I downloaded other electron applications to test it like discord and obsidian, but they just work fine out-of-the-box.

Hi @anon7780473 ,

Thanks for the report.
It looks like a GPU memory allocation failure according to these logs:

intel: the execbuf ioctl keeps returning ENOMEM
GPU process exited unexpectedly: exit_code=134
The GPU process has crashed 1 time(s)

How did you install the app? The deb package or snap package?
How did you install the other apps?

The version of Electron in the stable Inkdrop binary might be outdated.
Is it possible to reproduce the issue on v6-canary?

Also, you have a keyring issue:

  app:error Failed to migrate credentials to safeStorage: Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.

See also this topic for it:

Bumped up Electron to 39.4.0 in v5.11.8:

The user has already quit though, I hope it addresses the startup time issue for other people.