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

Support forum for DGDecNV
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
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 »

-> downgrade your drivers (last working were 376.33 )
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 »

Hi Selur, yes I saw that workaround but my PC is mainly for gaming so I'm not going to be languishing on old drivers for very long. What are the downsides of avisynth 64-bit? I just want to run some encodes in Hybrid ;) without having to stick to outdated GPU drivers.
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 »

a. You can't use Avisynth 64bit in Hybrid
b. Avisynth 64bit is even more unstable than Avisynth MT (which is one of the reason for a.)
c. lots of filters are not available for Avisynth 64bit (which is one of the reason for a.)
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 »

Oh dear :( I guess I'm at the mercy of Nvidia then :cry:
DAE avatar
Aleron Ives
Posts: 126
Joined: Fri May 31, 2013 8:36 pm

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

Post by Aleron Ives »

As are we all. I'm still languishing on 326.80, since they refuse to fix bugs for old cards.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

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

Post by admin »

Yes, and OpenCL support is deficient for older cards too. Who can blame them, though, it's a CUDA versus OpenCL battle. Meanwhile, Vulkan rises to the fore. Everybody is going to concentrate on the cutting edge.

I just make a stable system that meets my CUDA/CUVID needs and then leave it alone. If you are a gamer that needs latest drivers, etc., well, maybe you can afford two systems. If not, play stupid games, win stupid prizes. ;)

It's not unknown for things to get fixed, so keep the faith. Until then, you can only use drivers that work.

BTW, Avisynth+ 64 works fine for me.
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 »

Small follow-up: today I was prompted by GeForce Experience that a 'GeForce Game Ready Driver' was available (version 378.66; release date 2017/02/14) and since I'm always a bit curious I installed it and like I suspected DGDecNV doesn't work with it so back to 376.33, till the next driver release.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

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

Post by admin »

Thanks, I was just about to try that version.

Just a note for those that haven't read the whole thread: It's not just DGDecNV that fails in this use case with these new drivers; the nVidia sample applications also fail.

I think people should try to upgrade to Pascal GPUs where possible, and leave the past behind. Yes, Maxwell is not that old, but it is what it is.
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 »

NVCEnC also fails with that the 378.66 driver version,... (upgrading to Pascal isn't planned here for a while,.. not prepared to shell out the money needed for a GeForce 1080 to replace my 980Ti; especially since my whole system is watercooled which adds another 100+ bucks for the cooler,..)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

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

Post by admin »

$$$ be damned. Ride the bleeding edge.
Post Reply