NV_ENC_ERR_INVALID_DEVICE: How to fix?

LuminaStation

New Member
Hello all! Having a hard time nailing down a fix for this particular error code. I've attached an error log with my most recent case, but this code seems to be happening any time I switch and start playing one of my games on stream; the games this code affects aren't consistent either. I've had this happen with Osu, Rabbit and Steel, Honkai Star Rail, and a couple others. I'm kind of at my wit's end; any advice is appreciated! I'll list some attempted fixes below.

So my first thought is obviously outdated drivers. I do update them regularly but it's always a good thing to check. For this case, in case of corruption I actually did a completely fresh install of the most recent, recommended installation via Nvidia's site. I'm running an RTX 3060, so they recommended version 555.99. Unfortunately this method gave no results; still getting the same error code.

I also noted that HAGS could be causing problems, so I disabled that! Still no luck.

Does anybody have any idea how to start fixing this? Or at least what the cause could be? Any ideas at all are much appreciated, and I'm more than happy to answer questions! In case you're curious, the error code is found at 18:48:48.952 in the log.
 

Attachments

  • 2024-06-20_18-35-28.txt
    58.7 KB · Views: 122

koala

Active Member
From your log:
Code:
18:48:48.952: [obs-nvenc] get_encoded_packet: nv.nvEncLockBitstream(s, &lock) failed: 4 (NV_ENC_ERR_INVALID_DEVICE): Device passed to the API is invalid.
18:48:48.952: Error encoding with encoder 'simple_video_stream'
18:48:48.953: Device Remove/Reset!  Rebuilding all assets...
18:48:48.965: [rtmp stream: 'simple_stream'] Encoder error, disconnecting
This "Device Remove/Reset!)" is a notice your graphics driver crashed and was reset. Afterwards, all kind of graphics operations are invalid and usually apps using GPU resources have to be restarted or the PC needs a reboot.

It's either a GPU driver or GPU hardware issue. If you reinstalled the most current driver and the issue persists, it's most certainly a hardware error. Revert overclocking, check overheating, check cabling and power supply. If it really persists, your GPU hardware or motherboard may be defective.
 

LuminaStation

New Member
I was afraid of something like that! I’m gonna try to replicate it in the next day or two and check for overheating like you said as a Hail Mary.

If it does end up being the GPU hardware, I’m not really in a place right now where I can replace it. If I swap to software encoding (x264), do you think that could serve as a fix until I can get a new card running?
 

pendetines

New Member
Hello, how did you solve it? I'm having that problem right now and I don't know what to do.
I was afraid of something like that! I’m gonna try to replicate it in the next day or two and check for overheating like you said as a Hail Mary.

If it does end up being the GPU hardware, I’m not really in a place right now where I can replace it. If I swap to software encoding (x264), do you think that could serve as a fix until I can get a new card running?
 
Top