init_cuda_ctx....... invalid device ordinal

Calamon

New Member
To be honest I may have broke something for changed a setting unintentionally yesterday. Trying to improve a games performance. This morning while trying to stream live I got this error. I have been streaming fine for 2 months and this error seems familiar or one close to it but I can recall how to fix it.

init_cuda_ctx: CUDA call "cu->cuDeviceGet(&device, gpu)" failed with CUDA_ERROR_INVALID_DEVICE (101): invalid device ordinal

Now trying to find a fix I did see it was asked for a log report so I will attach it here. Can anyone see what I missed? I even updated my Navidia drivers again.
 

Attachments

  • 2025-01-10 12-50-12.txt
    10.3 KB · Views: 50

rockbottom

Active Member
The logs ends & the encode settings are missing but the wrong GPU is selected. It appears you are using the Advanced Mode, look at your encoder settings & make sure GPU is set to 0 & not 1 or something else.

12:50:21.293: Starting stream due to hotkey
12:50:21.294: [obs-nvenc] different GPU selected by user, falling back to non-texture encoder
12:50:21.315: [obs-nvenc: 'advanced_video_stream'] init_cuda_ctx: CUDA call "cu->cuDeviceGet(&device, gpu)" failed with CUDA_ERROR_INVALID_DEVICE (101): invalid device ordinal
12:50:21.315: Already in fallback encoder, can't fall back further!
12:50:21.315: Stream output type 'rtmp_output' failed to start! Last Error: init_cuda_ctx: CUDA call "cu->cuDeviceGet(&device, gpu)" failed with CUDA_ERROR_INVALID_DEVICE (101): invalid device ordinal

1736547484847.png
 

Krahazik

New Member
I just started getting this same error. It doesn't matter if my device is set to 0 or 1. I have two graphics cards, and for the past 2 weeks, it has been working just fine with the 2nd graphics card. Now I can't go live at all.
 
Top