OS call failed or operation not supported on this OS

Hi All,

I have problem, which I can’t figure out. I have some code written years ago on Dell Precision M4800 with Quadro K2100M. That code use cuda for computation and create some opengl visualization. Now I want to run it on my new PC with RTX 4080. I install newest drivers: 536.40. And cuda 12.1.1, 11.8. I install Visual Studio Community 2022, and everything is integrated. Mentioned code was written in c++, project setup was done in cmake. I built it successfully with both cuda 12.1.1 and 11.8. Unfortunately I’m getting runtime error with the following output:

OpenGL version supported by this platform 4.6.0 - Build 31.0.101.4502
[ INFO:0@0.208] global registry_parallel.impl.hpp:96 cv::parallel::ParallelBackendRegistry::ParallelBackendRegistry core(parallel): Enabled backends(3, sorted by priority): ONETBB(1000); TBB(990); OPENMP(980)
[ INFO:0@0.209] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Dev\OpenCV\4.7.0_cuda_12.1\x64\vc17\bin\opencv_core_parallel_onetbb470_64d.dll => FAILED
[ INFO:0@0.209] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_onetbb470_64d.dll => FAILED
[ INFO:0@0.209] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Dev\OpenCV\4.7.0_cuda_12.1\x64\vc17\bin\opencv_core_parallel_tbb470_64d.dll => FAILED
[ INFO:0@0.209] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_tbb470_64d.dll => FAILED
[ INFO:0@0.209] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Dev\OpenCV\4.7.0_cuda_12.1\x64\vc17\bin\opencv_core_parallel_openmp470_64d.dll => FAILED
[ INFO:0@0.209] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_openmp470_64d.dll => FAILED
[ INFO:0@0.246] global registry.impl.hpp:114 cv::highgui_backend::UIBackendRegistry::UIBackendRegistry UI: Enabled backends(4, sorted by priority): GTK(1000); GTK3(990); GTK2(980); WIN32(970) + BUILTIN(WIN32UI)
[ INFO:0@0.246] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Dev\OpenCV\4.7.0_cuda_12.1\x64\vc17\bin\opencv_highgui_gtk470_64.dll => FAILED
[ INFO:0@0.246] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_highgui_gtk470_64.dll => FAILED
[ INFO:0@0.246] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Dev\OpenCV\4.7.0_cuda_12.1\x64\vc17\bin\opencv_highgui_gtk3470_64.dll => FAILED
[ INFO:0@0.246] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_highgui_gtk3470_64.dll => FAILED
[ INFO:0@0.246] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Dev\OpenCV\4.7.0_cuda_12.1\x64\vc17\bin\opencv_highgui_gtk2470_64.dll => FAILED
[ INFO:0@0.247] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_highgui_gtk2470_64.dll => FAILED
[ INFO:0@0.247] global backend.cpp:90 cv::highgui_backend::createUIBackend UI: using backend: WIN32 (priority=970)
[ INFO:0@0.247] global window_w32.cpp:3008 cv::impl::Win32BackendUI::createWindow OpenCV/UI: Creating Win32UI window:  (1)
There is 1 available device(s) on this machine.
Active device ID: 0
  CUDA Driver Version / Runtime Version:      12.2 / 12.1
  CUDA Capability Major/Minor version:        8.9
  Total amount of global memory:              16375.5 MBytes (17170956288 bytes)
  Multiprocessors count:                      76
  Constant memory:                            65536 bytes
  Shared memory per block:                    49152 bytes
  Registers available per block:              65536
  Warp size:                                  32
  Maximum threads per multiprocessor:         1536
  Maximum threads total:                      116736
  Maximum threads per block:                  1024
  Maximum sizes of each dimension of a block: 1024 x 1024 x 64
  Maximum sizes of each dimension of a grid:  65535 x 65535 x 65535
  Maximum memory pitch:                       2147483647 bytes
  Run time limit on kernels:                  Yes
  Concurrent kernels:                         1
GPUassert: OS call failed or operation not supported on this OS

I run the same code on ubuntu 22.04 with analogical setup and I’m getting exactly the same result. Similar results on Fedora 38. After this checks I return to Windows and try to run simpleCUDA2GL from cuda-samples repository. Unfortunately I’m facing the same issue and the output is:

C:\Users\morfin\Projects\Code\cuda-samples\bin\win64\Debug\simpleCUDA2GL.exe Starting...

(Interactive OpenGL Demo)
GPU Device 0: "Ada" with compute capability 8.9

CUDA error at C:\Users\morfin\Projects\Code\cuda-samples\Samples\0_Introduction\simpleCUDA2GL\main.cpp:175 code=304(cudaErrorOperatingSystem) "cudaGraphicsGLRegisterBuffer(pbo_resource, *pbo, cudaGraphicsMapFlagsNone)"

I’ve try to reinstall cuda, drivers keep only one version of cuda and some others stuff, and I google a lot for some solution, but I failed. The last try was to check some other machine. I tried on Dell Precision 7680 with RTX 5000 Mobile Ada. Everything works well, both example from cuda-samples and my code.

My final conclusion is that problem is with my PC, it’s not OS related since the same problem occurs on Windows, Ubuntu and Fedora. Do you have any idea how to investigate or solve this problem? Maybe I overlooked something. If you want to ask about any other details I’m more than happy to answer. Thanks in advance!

I have a new observation. The fix is to use at least one DisplayPort of my RTX4080. If I don’t use any then the described above error occurs. Additionally HDMI port on GPU is not fixing this issue.

Is it something usual, and I’m unaware of that, or is something wrong with my hardware? To give you more details I have i9-13900K and ROG STRIX Z790-F GAMING WIFI.

I used to use as many ports of the motherboard as I could, it is a wrong approach?

I will be extremely happy for some answers. Now I can connect many other problems in the last months to that “not used DisplayPort” issue.

I don’t have any explanation of described phenomena. Just a tip for users with the same problem - try using DisplayPort / HDMI ports on your dedicated GPU if you have a similar issue.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.