Object_detection_birds_view.py fails with freeglut error

Hello,
I’m trying to run object_detection script but it’s failing with the following error. Did anybody encounter this type of issue? My machine configuration is Ubuntu 20, CUDA 11.7, ZED SDK 3.7.6, ZED2 camera, Intel Core i9-12900H vPro with NVIDIA RTX A2000 8 GB graphics.

freeglut (object_detection_birds_view.py): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

Here is the output for nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.43.04    Driver Version: 515.43.04    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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 A200...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   48C    P8     3W /  N/A |      9MiB /  8192MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      3605      G   /usr/lib/xorg/Xorg                  4MiB |
|    0   N/A  N/A      8234      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

@nkamidi were you using an old ZED SDK version and you upgraded to v3.7.6?

In this case, I suggest you clean your build folder to clean the CMake cache and then you try to re-compile and launch the software to check if this fixes the issue.

Hello Walter,
I’m running the Python script. It won’t have any build folder, right?

Are other examples working or is the problem present only in the object_detection_birds_view.py script?

Hi Walter,
Copying the message content I sent in the other email.

Here is the report for samples. I tried running the python scripts in tutorials, and they all ran without any issues (object_detection.py, depth_sensing.py, body_tracking.py). Could be that the call to launch the ZED explorer is failing in the samples scripts.

  • samples

** object_detection_birds_view.py - FAILED
** body_tracking.py - FAILED
** plane_detection.py - NO ISSUES
** depth_sensing.py - NO ISSUES
** positional_tracking.py - NO ISSUES

  • tutorials

** object_detection.py - NO ISSUES
** depth_sensing.py - NO ISSUES
** body_tracking.py - NO ISSUES

The errors for the failed attempts

neel@neel-Precision-5570:/usr/local/zed/samples/object detection/birds eye viewer/python$ python3 object_detection_birds_view.py
Running object detection … Press ‘Esc’ to quit
freeglut (object_detection_birds_view.py): ERROR: Internal error in function fgOpenWindow

neel@neel-Precision-5570:/usr/local/zed/samples/body tracking/python$ python3 body_tracking.py
Running Body Tracking sample … Press ‘q’ to quit
/usr/local/zed/resources/skeleton_perf 100%[============================================================================>] 26.55M 12.9MB/s in 2.1s
Optimizing skeleton_performance_2.1 | 100.0%[=============================>] Done ! in 1min 50s
freeglut (foo): ERROR: Internal error in function fgOpenWindow

What is the output of the command?
$ glxinfo | grep OpenGL

Here is what I see.

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.6
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

What is the output of the command $ prime-select query?

Walter,
It returns “on-demand”

I saw that we could run “prime-select nvidia” and here is the output from that.

neel@neel-Precision-5570:~/projects-work/app-brand-profile$ sudo prime-select nvidia
[sudo] password for neel:
Info: selecting the nvidia profile
Deleting /lib/modprobe.d/nvidia-runtimepm.conf
Updating the initramfs. Please wait for the operation to complete:
Done

Walter,
It returns “on-demand”

Hello,

Make sure you reboot after running sudo prime-select nvidia
Then run sudo ubuntu-drivers install
Then it should work. If you run again glxinfo | grep OpenGL, the output should be different than before.

Antoine

@nkamidi please let me know if the prime-select command solved the issue

Good news. This resolved my issue. I could not run “sudo ubuntu-drivers install” as it complained about broken packages. However, I already had the drivers installed (NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7 ) and I went ahead with the test. It worked.

Here is the output for “glxinfo | grep OpenGL”. So, it seems the “prime-select nvidia” solved the issue for me.

neel@neel-Precision-5570:/usr/local/zed/samples/object detection/birds eye viewer/python$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA RTX A2000 8GB Laptop GPU/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 515.65.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 515.65.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 515.65.01
OpenGL ES profile shading language version string: O

Thank you for the feedback. Finally, we found the good solution to those OpenGL issues.
We are going to create a new support page for it so everyone can find it easily.

Thank you for testing

Update: Link to the support page: https://support.stereolabs.com/hc/en-us/articles/8422008229143

1 Like