Visiting certain web pages breaks the Nvidia Hardware Encoder on Linux.

Nvidia hardware encoder errors cannot lock bitstream error 8 = NV_ENC_ERR_INVALID_PARAM

I’ve been having intermittent problems with the Nvidia encoder - it is reporting errors from my own code and I have also tested other code too, specifically https://github.com/NVIDIA/NvPipe also has the exact same problem.

I have tracked the problem down - the Nvidia hardware video encoder breaks when Google Chrome goes to certain web pages.

The error reported is cannot lock bitstream error 8 = NV_ENC_ERR_INVALID_PARAM

I am using Linux Ubuntu 18.04 with an Nvidia Tesla M60 on an EC2 G3 instance.

I am using the latest cuda drivers cuda_10.1.243_418.87.00_linux.run

I am using the latest Nvidia grid drivers NVIDIA-Linux-x86_64-430.30-grid.run

The error is caused by certain pages being loaded into Google Chrome. It is clear that the error occurs when Chrome is running the page, and does not occur when Chrome is stopped. This video demonstrates the errors occurring and also shows the errors not occurring: https://youtu.be/potpodPjiFI here is the web page that causes the problem to occur (typed from the command line):
DISPLAY=:0 google-chrome --no-first-run “https://www.shadertoy.com/embed/wljSz1?gui=false&t=10&paused=false

Effectively the Nvidia Video Encoder Hardware Acceleration is broken because there’s no way to predict when it will stop working if someone visits a given web page. I believe there might be any number of other web pages that could also cause the Nvidia Encoder to stop working but there’s no way to work out which ones are a problem.

I believe the problem is caused by the Nvidia grid drivers NVIDIA-Linux-x86_64-430.30-grid.run because the problem does not occur when using non-grid ordinary Nvidia drivers.

Any help appreciated.

Hi,
We are able to reproduce this issue and will investigate the same. For future reference, this issue is tracked as 200552546.

Thanks.

Excellent news!

Hopefully it can be fixed.

Hello how is it going? Any update on this?

thanks!

I am getting the same error with NvPipe. It occurs sporadically and unpredictably as far as I can tell. But for me it has nothing to do with Google Chrome.

The first encode call after creating the encoder freezes, gives the error eventually but completely freezes my application and entire desktop UI for a few seconds. I am also using Ubuntu 18.04 with 430.14 drivers and cuda 10.1. Hardware is GeForce GTX 1050 Ti, but the problem also occurs on another desktop machine with RTX 2080, although less frequently.