Gnome remote desktop not loading NVIDIA linked library and failing to connect

I just wanted to post my issue here before jumping to the bug tracker to see if I’m just doing something wrong.

The issue

The gnome-remote-desktop-daemon executable in /nix/store/???-gnome-remote-desktop-48.1/libexec/gnome-remote-desktop-daemon seams to try to dynamically link to libcuda.so.1 and libnvidia-encode.so.1 on my system but fails, resulting in subsequent connection attempts also failing.

Running gnome-remote-desktop-daemon with the line: LD_LIBRARY_PATH=/nix/store/???-nvidia-x11-???/lib/:$LD_LIBRARY_PATH /nix/store/???-gnome-remote-desktop-48.1/libexec/gnome-remote-desktop-daemon allows it to link to those libraries, and then everything works just fine!

(replace the ??? and version numbers as appropriate)

For now, I’m just using a script that stops the systemd user service for gnome-remote-desktop and runs the daemon manually with the new LD_LIBRARY_PATH. But should I report this in nixpkgs so that it can be fixed there? Is there a more elegant way than just manually fiddling with LD_LIBRARY_PATH?

Steps to reproduce

  1. Use an NVIDIA GPU
  2. Set services.gnome.gnome-remote-desktop.enable = true;
  3. Configure gnome-remote-desktop via the grdctl cli tool to accept non-system non-headless (headful?) connections with credentials.
  4. Stop both user and system systemd servicers for gnome-remote-desktop
  5. Run /nix/store/???-gnome-remote-desktop-48.1/libexec/gnome-remote-desktop-daemon
  6. Try to connect but have it fail.
  7. Stop that process and run LD_LIBRARY_PATH=/nix/store/???-nvidia-x11-???/lib/:$LD_LIBRARY_PATH /nix/store/???-gnome-remote-desktop-48.1/libexec/gnome-remote-desktop-daemon
  8. Try to connect and find it working (hopefully)!

Log

Here’s the log from the gnome-remote-desktop-daemon executable running without the new LD_LIBRARY_PATH:

Cannot load libcuda.so.1
Cannot load libnvidia-encode.so.1
** Message: 13:13:09.421: [HWAccel.Vulkan] Initialization of Vulkan was successful
** Message: 13:13:09.421: RDP server started
[13:16:10:465] [59136:0000e700] [WARN][com.freerdp.core.rdp] - [log_build_warn][0xd01080]: *************************************************
[13:16:10:465] [59136:0000e700] [WARN][com.freerdp.core.rdp] - [log_build_warn][0xd01080]: This build is using [runtime-check] build options:
[13:16:10:465] [59136:0000e700] [WARN][com.freerdp.core.rdp] - [log_build_warn][0xd01080]: * 'WITH_VERBOSE_WINPR_ASSERT=ON'
[13:16:10:465] [59136:0000e700] [WARN][com.freerdp.core.rdp] - [log_build_warn][0xd01080]: 
[13:16:10:465] [59136:0000e700] [WARN][com.freerdp.core.rdp] - [log_build_warn][0xd01080]: [runtime-check] build options might slow down the application
[13:16:10:465] [59136:0000e700] [WARN][com.freerdp.core.rdp] - [log_build_warn][0xd01080]: *************************************************
** Message: 13:16:10.666: [RDP.CLIPRDR] Relieving CLIPRDR filename restriction
** Message: 13:16:10.670: [RDP.CLIPRDR] Client capabilities: long format names
** Message: 13:16:10.693: [RDP.AUDIO_INPUT] Setting up Audio Source
** Message: 13:16:10.717: [RDP.AUDIO_PLAYBACK] Client Formats: [AAC: true, Opus: true, PCM: true]
libva info: VA-API version 1.22.0
libva info: Trying to open /run/opengl-driver/lib/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
** Message: 13:16:10.931: [RDP] Did not initialize VAAPI: Unsuitable device, missing required AVC encoding entrypoint
** Message: 13:16:10.932: [RDP.RDPGFX] CapsAdvertise: Accepting capability set with version RDPGFX_CAPVERSION_107, Client cap flags: H264 (AVC444): true, H264 (AVC420): true

** (gnome-remote-desktop-daemon:59136): WARNING **: 13:16:11.130: [RDP] Failed to register PipeWire buffer: Required image format not supported by device
[13:16:11:114] [59136:0000e700] [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_GRAPHICS_SUBSYSTEM_FAILED (0x0000112F):The server-side graphics subsystem is in an error state and unable to continue graphics encoding.
[13:16:11:114] [59136:0000e700] [ERROR][com.freerdp.core.peer] - [rdp_set_error_info]: ERRINFO_GRAPHICS_SUBSYSTEM_FAILED [0x0001112F]
** Message: 13:16:11.897: [RDP.CLIPRDR] Relieving CLIPRDR filename restriction
** Message: 13:16:11.901: [RDP.CLIPRDR] Client capabilities: long format names
** Message: 13:16:11.903: [RDP.AUDIO_INPUT] Setting up Audio Source
** Message: 13:16:11.938: [RDP.AUDIO_PLAYBACK] Client Formats: [AAC: true, Opus: true, PCM: true]
libva info: VA-API version 1.22.0
libva info: Trying to open /run/opengl-driver/lib/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
** Message: 13:16:12.083: [RDP] Did not initialize VAAPI: Unsuitable device, missing required AVC encoding entrypoint
** Message: 13:16:12.083: [RDP.RDPGFX] CapsAdvertise: Accepting capability set with version RDPGFX_CAPVERSION_107, Client cap flags: H264 (AVC444): true, H264 (AVC420): true

** (gnome-remote-desktop-daemon:59136): WARNING **: 13:16:12.193: [RDP] Failed to register PipeWire buffer: Required image format not supported by device
[13:16:12:177] [59136:0000e700] [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_GRAPHICS_SUBSYSTEM_FAILED (0x0000112F):The server-side graphics subsystem is in an error state and unable to continue graphics encoding.
[13:16:12:177] [59136:0000e700] [ERROR][com.freerdp.core.peer] - [rdp_set_error_info]: ERRINFO_GRAPHICS_SUBSYSTEM_FAILED [0x0001112F]

System metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.57, NixOS, 25.05 (Warbler), 25.05.812676.c2448301fb85`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.28.5`
 - channels(root): `"nixos-25.05"`
 - nixpkgs: `/nix/store/igxxaqzi057by2pjgh4rqsv1xz5hr8np-nixos-25.05/nixos`