Logseq on NixOS not functioning with Nvidia

Hello all!

I installed the NixOS install of Logseq via my configuration.nix file and my install uses the official Nvidia drivers. But when I open Logseq I get the following error:

[12352:0629/172646.336673:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[12352:0629/172646.336769:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[12352:0629/172646.336875:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[12352:0629/172646.336912:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[12352:0629/172646.336945:ERROR:shared_image_factory.cc(926)] CreateSharedImage: could not create backing.
[12352:0629/172646.336979:ERROR:shared_image_factory.cc(758)] DestroySharedImage: Could not find shared image mailbox
[12352:0629/172646.337030:ERROR:gpu_service_impl.cc(1089)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[4682:0629/172646.341410:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=8704
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.

This seems related to this: NVK error when using prop nvidia drivers - Help - NixOS Discourse

  • Are you aware of the thread and have you tried setting the environment variable VK_DRIVER_FILES?
  • Are you encountering the same with other electron apps?

So I was able to fix this by jumping up to Nvidia driver version 555 as the version that comes with NixOS 24.05 is an older version that has all sorts of problems

Here is how I did it

hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
    version = "555.58";
    sha256_64bit = "sha256-bXvcXkg2kQZuCNKRZM5QoTaTjF4l2TtrsKUvyicj5ew=";
    sha256_aarch64 = "sha256-7XswQwW1iFP4ji5mbRQ6PVEhD4SGWpjUJe1o8zoXYRE=";
    openSha256 = "sha256-hEAmFISMuXm8tbsrB+WiUcEFuSGRNZ37aKWvf0WJ2/c=";
    settingsSha256 = "sha256-vWnrXlBCb3K5uVkDFmJDVq51wrCoqgPF03lSjZOuU8M=";
    persistencedSha256 = "sha256-lyYxDuGDTMdGxX3CaiWUh1IQuQlkI2hPEs5LI20vEVw=";
};

We found the solution in this other thread I posted in the NixOS forums:

2 Likes