Error Code 46 Devices Unavailable with CUDA 7.5 Samples on Windows 8.1


at the moment I am trying to get the CUDA 7.5 Samples running on my Computer.

It’s a Dell Precision Tower 3420 with an Intel Core i7-6700 CPU, an Intel HD Graphics 530 and a NVIDIA Quadro K620. The operating system is Windows 8.1.

I use the samples with Visual Studio 2010.

Some of the Samples work. For example the matrixMul, simpleMultiGPU and the deviceQuery. The deviceQuery detects the Quadro K620.
But some samples don’t work and produce an error code 46: CUDA devices unavailable.

Some examples + their error messages:
CUDA error at C:/ProgramData/NVIDIA Corporation/CUDA Samples/v7.5/5_Simulations/particles/ code=46(cudaErrorDevicesUnavailable) “cudaGraphicsGLRegisterBuffer(cuda_vbo_resource, vbo, cudaGraphicsMapFlagsNone)”

CUDA error at C:/…/ code=46(cudaErrorDevicesUnavailable) “cudaGraphicsGLRegisterBuffer(vbp_res, *vbo, vbo_res_flags)”

C:/…/ : CUDA Runtime API error 46: all CUDA-capable devices are busy or unavailable.

CUDA error at C:/…/ code=46(cudaErrorDevicesUnavailable) “cudaGraphicsGLRegisterBuffer(vbp_res, *vbo, vbo_res_flags)”

Does anybody know what the problem could be, or what I did wrong?

Thanks for your help,

These are all using CUDA-OpenGL interop, and they are getting tripped up by the fact that your OpenGL context is being created on the Intel display device. That won’t work for CUDA-GL interop.

As far as I understand, it should be possible to choose the device, that is used, in the Nvidia Control Panel.
However, my Nvidia Control Panel just shows one page with the title ‘Manage GPU Utilization’ and no other options beside that. In ‘Manage GPU Utilization’ is a link that says ‘To manage CUDA settings for a specific program, go to the Manage 3D settings page’ but when I click it, nothing happens.

Many of the CUDA-GL interop samples actually display OpenGL graphics. If you are using the Intel Graphics adapter for display, and don’t have a display attached to the Quadro K620 and also have the desktop set to use the Quadro K620, it may not be possible to initialize a displayable OpenGL context on that device.

If you switch everything (display, desktop) to the K620, and disable the onboard intel graphics in the system BIOS, things will probably start working for you.

You were right, the displays were connected to the onboard intel graphics.
I connected them to the Quadro K620 and now it is working. And the Control Panel also looks like it should.

Thank you!


I’ve got same error, under debian jessie, compiling with Nsight.

CUDA error at ../src/ code=46(cudaErrorDevicesUnavailable) "cudaGraphicsGLRegisterBuffer(cuda_vbo_resource, vbo, cudaGraphicsMapFlagsNone)"

But compiling (call Make file on console) cuda example from source run perfect !

So is it code editor setup problem, or ??


ps: i need bumblebee to call my Nvidia card…


I am struggling with the same kind of problem. Since the solution you provided seems to correct the issue, could you give us some instructions on how to switch display and desktop?


Hi there. I am new here. Sorry for stupid question, but I think that Windows 8 is not popular nowadays, I dont understand why so many people face the same problem? For what reason people use older versions of windows? Thanks