[RESOLVED] "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Support forum for DGDecNV
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

No clue what changed. (normal system updates happened, but nothing else that comes to mind; didn't install any new software apart from updates.)
---
Removed the AMD card physically from my pc.
Deleted DGIndexNV.ini. Tried DGIndexNV (32bit). Same error.
Deinstalled all Radeon software. Rebooted system.
Deleted DGIndexNV.ini. Tried DGIndexNV (32bit). Same error.
Ran AMD Cleanup utility, to make sure all AMD stuff was removed. Rebooted system.
Deleted DGIndexNV.ini. Tried DGIndexNV (32bit). Same error. Rebooted system.
Set 'iGPU Multi-Monitor' to disabled and checked that the primary graphic card was the PCIE card (it was) in the motherboard bios. Rebooted system.
Deleted DGIndexNV.ini. Tried DGIndexNV (32bit). Same error.
(Checked inside the device manager: only graphic card shown is the NVIDIA Geforce GTX 980 Ti)
Did another clean NVIDIA driver install (version 378.49). Rebooted system.
Deleted DGIndexNV.ini. Tried DGIndexNV (32bit). Same error.

So got only one monitor running and no sound (audio system is connected to the HDMI output of the Intel iGPU) and sadly DGDecNV (32bit) still isn't working. :(
The most confusing thing for me is that the 64bit version works (with Virtual Dub 64bit and Avisynth+ 64bit).

Cu Selur

Ps.: DGDecNV (32bit) did work end of last year when we fixed the issue I had then (viewtopic.php?f=8&t=530), my hardware setup didn't change since then. Only thing I know I did till then was a. install normal system and software updates b. redownload DGDecNV since I accidentally deleted the version I used before.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Please use only the nVidia sample application for testing to eliminate anything DG and to allow for reporting this to nVidia. Can you please report on that in your final scenario? Thank you.

I'll set up a test with my 950 but it may take some time.

Yes, the 32 vs 64 thing confuses me too.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

No other GPU apps running at the same time? Folding? Anything?
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

ran

Code: Select all

NvDecodeD3D9.exe -i=plush.m2v -o=plush.yuv
and

Code: Select all

NvDecodeD3D9.exe -displayvideo -i=plush.m2v -o=plush.yuv
both times I got the same output as before:

Code: Select all

Command Line Arguments:
argv[0] = NvDecodeD3D9.exe
argv[1] = -displayvideo
argv[2] = -i=plush.m2v
argv[3] = -o=plush.yuv
[NVDecodeD3D9]: output file: [plush.yuv]
[NVDecodeD3D9]: input file:  [plush.m2v]
        VideoCodec      : MPEG-2
        Frame rate      : 30000/1001fps ~ 29.97fps
        Sequence format : Progressive
        Coded frame size: [1280, 720]
        Display area    : [0, 0, 1280, 720]
        Chroma format   : 4:2:0
        Bitrate         : 14116kBit/s
        Aspect ratio    : 16:9

Frame Rate Playback Speed = 60 fps
> Device 0: <GeForce GTX 980 Ti >, Compute SM 5.2 detected
  -> GPU 0: < GeForce GTX 980 Ti > driver mode is: WDDM

> Display Device: "NVIDIA GeForce GTX 980 Ti" supports Direct3D9
> Using GPU Device 0: GeForce GTX 980 Ti has SM 5.2 compute capability
  Total amount of global memory:     4096.0000 MB
checkCudaErrors() Driver API error = 0999 "CUDA_ERROR_UNKNOWN" from file <NvDecodeD3D9.cpp>, line 417.
Wild guess: Could this be somehow DirectX related? Since DxDiag shows 'DirectX 12' may be there was a DirectX update and the current version isn't compatible with D3D9?

Since this doesn't seem to be related to my other cards I'll put my AMD card back into my PC (so I can use my two monitors) and reenable the Intel GPU (so that I got sound). (same system setup worked end of last year)
Won't install the Radeon software though to make sure there isn't something related to the Radeon Software that is interfering.
Or do you think it would make sense to further wait till you could do your tests?

Cu Selur
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

No other GPU apps running at the same time? Folding? Anything?
Nope nothing, made sure to even close firefox and thunderbird (so their hardware acceleration couldn't interfere) when running NvDecodeD3D9 and DGIndexNV.

Cu Selur
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Longshot: can you install CUDA Toolkit 8.0? Some DLL missing? If you can, use depends to see if all the DLLs needed by the sample app exist.

I doubt DX is involved. DGIndexNV uses no interoperability with Use_D3D=0.

Yes, go ahead and restore the adapters. Please keep NV primary for now. Thanks for taking the time to test it.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

Will download and install the CUDA Toolkit 8.0 once I got the adapters running again.
Will keep NV as primary (which it was anyways to no big change there).
Will report back once I got my system fully running again, installed the Toolkit and ran NvDecodeD3D9 again.
Thanks for taking the time to test it.
No need to thank me. I'm happy to get another person thinking about a possible solution. :)

Cu Selur
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Also, run GPU-Z and see if CUDA is checked at the bottom.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Also, GPU Caps Viewer CUDA tab.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

Okay, so much for not installing the AMD Software, Windows itself installed the Radaon Software through Windows update.

Ran GPU-Z and output looks fine to me:
Image
attached the report of 'GPU Caps Viewer CUDA tab'

downloading ' CUDA Toolkit 8.0.44' now

Cu Selur
Attachments
gpu_caps_viewer_report.zip
GPU Caps Viewer report
(10.47 KiB) Downloaded 399 times
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Hmm, can you run CUDA-Z Performance tab? It actually runs a small CUDA app.

Also, why no PhysX? I think we should install that during the nVidia driver install.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

No clue why PhysX isn't there. (didn't dis- or enable anything during the installation aside from that a clean install should be used)
The normal NDVIDA settings app shows that the card is used for PhysX.
Hmm, can you run CPU-Z Performance tab? It actually runs a small CUDA app.
GPU-Z doesn't have a performance tab here (see screenshot from previous post)

Installed CUDA Toolkit 8.0.44 and ran

Code: Select all

vDecodeD3D9.exe -i=plush.m2v -o=plush.yuv
this time it did run and show a new window :D

Code: Select all

NvDecodeD3D9.exe -i=plush.m2v -o=plush.yuv
Command Line Arguments:
argv[0] = NvDecodeD3D9.exe
argv[1] = -i=plush.m2v
argv[2] = -o=plush.yuv
[NVDecodeD3D9]: output file: [plush.yuv]
[NVDecodeD3D9]: input file:  [plush.m2v]
        VideoCodec      : MPEG-2
        Frame rate      : 30000/1001fps ~ 29.97fps
        Sequence format : Progressive
        Coded frame size: [1280, 720]
        Display area    : [0, 0, 1280, 720]
        Chroma format   : 4:2:0
        Bitrate         : 14116kBit/s
        Aspect ratio    : 16:9

Frame Rate Playback Speed = 60 fps
> Device 0: <GeForce GTX 980 Ti >, Compute SM 5.2 detected
  -> GPU 0: < GeForce GTX 980 Ti > driver mode is: WDDM

> Display Device: "NVIDIA GeForce GTX 980 Ti" supports Direct3D9
> Using GPU Device 0: GeForce GTX 980 Ti has SM 5.2 compute capability
  Total amount of global memory:     4096.0000 MB
>> modInitCTX<NV12ToARGB_drvapi_Win32.ptx > initialized OK
>> modGetCudaFunction< CUDA file:          NV12ToARGB_drvapi_Win32.ptx >
   CUDA Kernel Function (0x0b22c540) = <   NV12ToARGB_drvapi >
>> modGetCudaFunction< CUDA file:          NV12ToARGB_drvapi_Win32.ptx >
   CUDA Kernel Function (0x0b22ff60) = <     Passthru_drvapi >
> VideoDecoder::cudaVideoCreateFlags = <0>Default (VP)

cuvidCreateDecoder returned 0
> initCudaVideo()
  CUDA Streams (Enabled) <g_ReadbackSID = 0B35E1C8>
  CUDA Streams (Enabled) <g_KernelSID   = 0B35E218>
ImageDX::CUcontext = 07c27970
ImageDX::CUdevice  = 00000000
++++++++++++++++[NVDecodeD3D9] - [Frame: 0016, 00.0 fps, time: 160739.34 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0032, 783.3 fps, time: 1.28 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0048, 823.6 fps, time: 1.21 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0064, 856.7 fps, time: 1.17 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0080, 802.3 fps, time: 1.25 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0096, 344.5 fps, time: 2.90 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0112, 813.3 fps, time: 1.23 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0128, 840.1 fps, time: 1.19 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0144, 859.1 fps, time: 1.16 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0160, 858.6 fps, time: 1.16 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0176, 867.8 fps, time: 1.15 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0192, 237.6 fps, time: 4.21 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0208, 842.2 fps, time: 1.19 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0224, 825.9 fps, time: 1.21 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0240, 845.4 fps, time: 1.18 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0256, 895.4 fps, time: 1.12 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0272, 862.6 fps, time: 1.16 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0288, 870.5 fps, time: 1.15 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0304, 373.5 fps, time: 2.68 (ms) ]
++++++++++++++++[NVDecodeD3D9] - [Frame: 0320, 890.6 fps, time: 1.12 (ms) ]
+++++++
[NVDecodeD3D9] statistics
         Video Length (hh:mm:ss.msec)   = 00:00:00.492
         Frames Presented (inc repeats) = 326
         Average Present Rate     (fps) = 662.45
         Frames Decoded   (hardware)    = 327
         Average Rate of Decoding (fps) = 664.48
and DGIndexNV (32bit) also works!! :D

So question is what did the toolkit installed that wasn't present before?

Cu Selur
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

Okay, since GeForce Experience just popped up I know at least the drivers changed.
The toolkit installed the 369.30 drivers and GeForce Experience now offers to upgrade to 378.49 again.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

I meant CUDA-Z performance tab. Edited above. :-)

I can only theorize that some needed DLL got clobbered during any of your recent system manipulations. It's going to be hard to see which now; that's why I hoped for the depends analysis.

Let it update the driver. If things stop working that tells us something and you can always downgrade. It may not be a clobbered DLL but simply a screwed-up driver version. This will show us which.

I don't like or trust GFE. I do not install it.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

Gimme a second, before you set it to resolved.
Will try to see what happens if I now upgrade to the latest drivers (clean install).
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Sure, no problem. As I said in my edit :) that will be valuable information.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

Okay, did the clean install of the latest drivers and a reboot after.
DGIndexNV and the other programs show the same error again. :(
-> so the solution again seems to be downgrading the drivers. (will test the drivers down to 369.30 to see which is the last working version)

btw: Thanks a lot for the support. :D

Cu Selur

Ps.: will report the last version that works here so that other users that might run into the problem don't have to do the testing again.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Cool, that will be useful information, although it may not be the full answer because the latest driver works fine for me with my GT620. I prefer not to have to install the 950 because my Win10 system is physically a little fragile and I don't like to make changes unless absolutely necessary. Anyway, I don't have the right PSU cables on hand for that system.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

Okay, that was fast.
Just switching to the previous version 376.33 solved the problem. :)

Issue is solved then. :)

Cu Selur
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Sweet, thanks Selur. They probably just accidentally omitted a DLL or something, although a more serious screw-up cannot be ruled out, e.g., changes to WDDM 2.0 support for later cards.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

You could try this hotfix driver, too.

http://nvidia.custhelp.com/app/answers/detail/a_id/4378

According to this, it reverts behavior to the level of the previous 376.33 version, so it may fix your issue (or not).

https://forums.geforce.com/default/topi ... er-378-57/

It's obvious that driver version 378.49 had a lot of issues. The PhysX issue is mentioned too.
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

tried the hotfix drivers, issue is still present.
So I'll stick to 376.33 and test the next version.

Cu Selur
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by admin »

Sounds good, Selur. Thanks for your testing and I'm happy you are back in business.

BTW, you can tell Windows update not to include 3rd-party drivers. I do that and don't automatically upgrade. I upgrade only when I have to: to support a user or to get a feature I can't live without. Ann Landers definitely got it right: "If it ain't broke, don't fix it."
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: [RESOLVED] "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by Selur »

I normally try to keep my drivers up-to-date since in example NVCEncC often only works properly with the latest drivers installed.
Hopefully NVIDIA will fix the issue with their drivers in one of their next updates. :)

Cu Selur
DAE avatar
idbirch
Posts: 4
Joined: Tue Feb 14, 2017 2:54 pm

Re: [RESOLVED] "ERROR: Failed to create CUDA contex" - DGDecNV 32bit

Post by idbirch »

I'm getting exactly the same behaviour as Selur, his first post describes exactly the same steps I took trying to get around this including the 64-bit exe working but when combined with the 32-bit DLL, the "CUDA error!" green screen. I'm hitting all the same error messages in all the same scenarios.

My system is a little simpler in that no other GPUs are invovled, my specs:

GTX 980Ti (driver 378.66 released Feb 14th)
Win 10 Pro x64
i7 5820k (so no iGPU)
DGIndexNV 2052
Post Reply