CUDA error: Unknown error

Hi,

I have the following CUDA error whenever I try and switch to viewport rendering (It renders fine with F12)

CUDA error: Unknown error
CUDA error: Invalid context in cuMemAlloc(&device_pointer, mem.memory_size())
CUDA error: Invalid context in cuMemsetD8(cuda_device_ptr(mem.device_pointer), 0, mem.memory_size())
CUDA error: Invalid context in cuMemAlloc(&device_pointer, mem.memory_size())
CUDA error: Invalid context in cuMemcpyHtoD(cuda_device_ptr(mem.device_pointer), (void*)mem.data_pointer, mem.memory_size())
CUDA error: Invalid context in cuGraphicsGLRegisterBuffer(&pmem.cuPBOresource, pmem.cuPBO, CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE)

System Spec:
Lenovo Z570 - M556CUK
Intel Core i7-2670QM
6GB Ram
HD Graphics 3000
GeForce GT 540M
Windows 7 64 Bit

Have installed latest blender version and latest graphics drivers. Not really sure where to go now. Any help would be much appreciated.

TIA

Dave.

PS. Could someone tell me how to copy and paste from the Blender System Console Window as I had to type that error code in manually :slight_smile:

You are a star. Changed the setting as detailed in the link and it now works perfectly. Thank you very much. For anyone else with this error this is the solution as posted by David Black.

The way to get around this is to close Blender. Right click on your desktop and select ‘NVIDIA Control Panel’

In the window that opens, make sure ‘Manage 3D settings’ is selected on the left.
On the right hand side you will see two tabs, ‘Global Settings’ and ‘Program Settings’, click on ‘Program Settings’

Click the ‘Add’ button and in the new window locate Blender’s folder and click on Blender.exe.

Once that is selected you will be taken back to the previous window, here you can now select to use the Intel card for Blender’s interface (Default), or select the Nvidia Card. Select the Nvidia Card and click ‘Apply’

Thanks Again

Dave.

*** Additional Info ***
An easier way to achieve the same result is to right click on the Blender shortcut and select “Run with graphics processor” then select the nvidia card from the pop out menu. Hope this helps anyone with the same issue.