I have a desktop computer with a gtx 660, a gtx 960 and a gtx 1050ti
I installed version 375 of the nvidia drivers from ppa:graphics-drivers/ppa on ubuntu 16.04 in order to make a 1050ti card function.
After a reboot everything was working. Then the system offered to apply some updates which IIRC didn't have anything to do with graphics, or blender, and since then when I try to render with the gtx 960 I get
CUDA error at cuCtxCreate: Invalid device Refer to the Cycles GPU rendering documentation for possible solutions: http://www.blender.org/manual/render/cycles/gpu_rendering.html CUDA error at cuCtxCreate: Invalid device Refer to the Cycles GPU rendering documentation for possible solutions: http://www.blender.org/manual/render/cycles/gpu_rendering.html CUDA error: Invalid context in cuMemAlloc(&device_pointer, size) CUDA error: Invalid context in cuMemAlloc(&device_pointer, size) CUDA error: Invalid context in cuMemAlloc(&device_pointer, size) CUDA error: Invalid context in cuMemAlloc(&device_pointer, size) CUDA error: Invalid context in cuMemAlloc(&device_pointer, size) CUDA error: Invalid context in cuMemAlloc(&device_pointer, size)
Full log with --debug-cycles here:
Rendering with the 1050ti works okay. I tried installing cuda 8.0 with the run file from nvidia's website but the problem remains.
Note that cuda 8.0 says my configuration is unsupported and wants to revert to drivers 367 but this will cause the 1050ti to be ignored.
Afterwards, I reverted to the previous situation (nvidia-367 + cuda-toolkit from the repo), and I also tried nvidia-367 with cuda-toolkit-8.0 from nvidia (the recommended configuration) and still no joy.
I also tried resetting blender preferences (not during reverted drivers though) and deleting precompiled kernels with no success.
This bug is only manifests in viewport rendering. F12 works fine (I can see all three tiles rendering) until I try to enable viewport rendered shading. After that F12 fails with
CUDA error: Invalid value in cuCtxDestroy(cuContext) CUDA error: Invalid value in cuCtxDestroy(cuContext) Error: CUDA error at cuCtxCreate: Invalid value
Full log with --debug-cycles continued from above:
I have tried with the Thomas Schiex ppa blender, *blender 2.78a* downloaded from blender.org, *blender-2.78-dd58390-linux-glibc219-x86_64* also downloaded from blender.org as well as the blender pbr branch which is a modified 2.77 release. All versions exhibit the same problem.
All attempts made with the default cube scene.
deviceQuery log:
other nvidia samples work fine with all cards
Blender on windows on the same machine functions correctly (though I think rendering is significantly slower)