Error: unable to open display :0 using NVIDIA or Intel GPUs acceleration

Hi there!
I’m trying to use NVIDIA and/or Intel GPUs acceleration to run the docker image of ROS 2 version in Ubuntu 20.04. (Docker hub image version: 4.4.27). When I run the image and open any exercise the displays in the browser are showing nothing and I’m getting these errors in the ubuntu terminal:

Error: unable to open display :0
Error: Command ‘glxinfo | grep direct’ returned non-zero exit status 1.

Using CPU only is working well.
Can you please give me some clue about it?

Hi @bdager ,

that is a known issue for ROS-2 Humble based RADIs (= RADI 4.X.X). It is pending. Please launch the docker with only-CPU parameters or even try ROS-1 Noetic based RADI.

Could you please share here the output of "glxinfo | grep direct’, ‘ls -altr /dev/dri’ and ‘lspci | grep VGA’ on your native OS?

Hi, thanks for the response.

Here are the outputs of the commands on my native OS:

glxinfo | grep direct
direct rendering: Yes
GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture,
GL_ARB_direct_state_access, GL_ARB_draw_buffers,
GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts,
GL_ARB_indirect_parameters, GL_ARB_instanced_arrays,
GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
GL_EXT_depth_bounds_test, GL_EXT_direct_state_access,
GL_NV_bindless_multi_draw_indirect,
GL_NV_bindless_multi_draw_indirect_count, GL_NV_bindless_texture,
GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture,
GL_ARB_direct_state_access, GL_ARB_draw_buffers,
GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts,
GL_ARB_indirect_parameters, GL_ARB_instanced_arrays,
GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
GL_EXT_depth_bounds_test, GL_EXT_direct_state_access,
GL_NV_bindless_multi_draw_indirect,
GL_NV_bindless_multi_draw_indirect_count, GL_NV_bindless_texture,
GL_EXT_memory_object, GL_EXT_memory_object_fd, GL_EXT_multi_draw_indirect,

ls -altr /dev/dri
total 0
crw-rw----+ 1 root render 226, 128 nov 30 09:52 renderD128
crw-rw----+ 1 root video 226, 0 nov 30 09:52 card0
drwxr-xr-x 2 root root 80 nov 30 09:52 by-path
drwxr-xr-x 3 root root 100 nov 30 09:52 .
drwxr-xr-x 19 root root 4660 dic 13 13:16 …

lspci | grep VGA
04:00.0 VGA compatible controller: NVIDIA Corporation Device 2208 (rev a1)