Hi there,
I’m using a windows machine and trying to develop in wsl via my company’s docker-contained environment. All this is required by the company so I can’t change development setup.
I spent a while setting up the container to work with WSL and can successfully run glxgears, rviz, gazebo etc as the default (non root) user using the NVIDIA GPU.
However, trying to run the application I need to, which uses Optix 7.7, works just fine if I run with sudo, but if I run with the default non-root user it gives me:
what(): Optix call (optixInit()) failed with code 7805 (line 340): OPTIX_ERROR_ENTRY_SYMBOL_NOT_FOUND, Entry symbol not found
I find this odd, as there is only one instance of libnvoptix.so.1, and clearly the command is finding it, and the symbol it’s searching for is definitely present:
$ sudo find / -type f -name "libnvoptix.so.1" 2>/dev/null
/usr/lib/wsl/lib/libnvoptix.so.1
$ nm -D /usr/lib/wsl/lib/libnvoptix.so.1 | grep -i optixQueryFunctionTable
0000000000003c60 T optixQueryFunctionTable
my $LD_LIBRARY_PATH is identical between the root and default user.
Running with sudo is a real pain as I’m using ROS2. I am hoping you have some advice on how to debug this, because it seems like it should be solvable.
Maybe relevant is that I initially had to run glxgears with sudo as well, but the combination of the flags below fixed it and allowed me to run as default:
Docker flags:
GRAPHICS_SETTINGT+=" -e LIBGL_ALWAYS_INDIRECT=0 "
GRAPHICS_SETTINGS+=" --volume /usr/lib/wsl:/usr/lib/wsl "
GRAPHICS_SETTINGS+=" -e LD_LIBRARY_PATH=/usr/lib/wsl/lib "
GRAPHICS_SETTINGS+=" -e
MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA "
Container flags:
unset __NV_PRIME_RENDER_OFFLOAD
unset __GLX_VENDOR_LIBRARY_NAME
Thank you very much in advance
nvidia-smi (in the container and just in wsl):
Tue Mar 18 10:08:45 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.124.03 Driver Version: 572.60 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA RTX 4000 Ada Gene... On | 00000000:01:00.0 On | Off |
| N/A 48C P8 8W / 105W | 736MiB / 12282MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+