Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardware rendering doesn't always initialize #278

Open
raphaelventura opened this issue Feb 21, 2024 · 9 comments
Open

Hardware rendering doesn't always initialize #278

raphaelventura opened this issue Feb 21, 2024 · 9 comments

Comments

@raphaelventura
Copy link

raphaelventura commented Feb 21, 2024

Hi,

It happens quite often that my firefox is unable to initialize hw video acceleration properly.

Here are two sequences of error messages I get inside the about:config tab.

(#0) Error	Failed to create EGLSurface!: 0x3003
(#1) Error	Failed to create EGLSurface. 4 renderers, 3 active.
(#2) Error	Handling webrender error 3
(#3) Error	GFX: RenderThread detected a device reset in PostUpdate
(#4) Error	Failed to make render context current during destroying.
(#5) Error	Failed to make render context current during destroying.
(#6) Error	GFX: RenderThread detected a device reset in PostUpdate
(#7) Error	Failed to make render context current during destroying.
(#8) Error	Failed to make render context current during destroying.
(#0) Error	Failed to create EGLSurface!: 0x3003
(#1) Error	Failed to create EGLSurface. 4 renderers, 1 active.
(#2) Error	Handling webrender error 3
(#3) Error	Fallback WR to SW-WR

My HW config:

  • CPU: quad core Intel Core i5-4570
  • Kernel: 6.1.71-1-MANJARO x86_64
  • GPU: NVIDIA GM107GL [Quadro K620]
  • GPU driver: nvidia v: 545.29.06

Environment variables:

VDPAU_DRIVER=nvidia
LIBVA_DRIVER_NAME=nvidia
NVD_BACKEND=direct
MOZ_DISABLE_RDD_SANDBOX=1

vainfo output:

Trying display: wayland
Trying display: x11
libva error: vaGetDriverNames() failed with unknown libva error
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD

The following variables are set as stated in the README

  • media.ffmpeg.vaapi.enabled=true
  • media.rdd-ffmpeg.enabled=true
  • media.av1.enabled=false
  • gfx.x11-egl.force-enabled=true

Any clues on what may go wrong ? Thanks

@sakithb
Copy link

sakithb commented Feb 29, 2024

Exact same issue here

GPU: Nvidia GTX 1060
Driver: 550
Kernel: 6.7.6

@nathansmeal
Copy link

It looks like you are still using the EGL backend. Maybe the environment variable for the backend isn't working?

What is the output of env NVD_BACKEND=direct vainfo

@peperunas
Copy link

Hello, I think I'm on the same boat.

This is the output of VDPAU_DRIVER=nvidia LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=direct DISPLAY=:0 vainfo --display drm --device /dev/dri/renderD128:

libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'nvidia'
libva info: Trying to open /run/opengl-driver/lib/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileAV1Profile0            :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain12             :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointVLD
      VAProfileHEVCMain444_10         :	VAEntrypointVLD
      VAProfileHEVCMain444_12         :	VAEntrypointVLD

NVIDIA driver: 545.29.02

I guess we are missing VAEntrypointEncSlice and VAEntrypointEncSliceLP?

@raphaelventura
Copy link
Author

The environment variable for the backend seems to be working properly

~$ env NVD_BACKEND=direct vainfo
Trying display: wayland
Trying display: x11
libva error: vaGetDriverNames() failed with unknown libva error
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD

@nathansmeal
Copy link

Hello, I think I'm on the same boat.

This is the output of VDPAU_DRIVER=nvidia LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=direct DISPLAY=:0 vainfo --display drm --device /dev/dri/renderD128:

libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'nvidia'
libva info: Trying to open /run/opengl-driver/lib/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileAV1Profile0            :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain12             :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointVLD
      VAProfileHEVCMain444_10         :	VAEntrypointVLD
      VAProfileHEVCMain444_12         :	VAEntrypointVLD

NVIDIA driver: 545.29.02

I guess we are missing VAEntrypointEncSlice and VAEntrypointEncSliceLP?

VAEntrypointEnc is for NVENC to encode video, this driver does not support NVENC yet.

See #116

@nathansmeal
Copy link

nathansmeal commented Mar 15, 2024

The environment variable for the backend seems to be working properly

~$ env NVD_BACKEND=direct vainfo
Trying display: wayland
Trying display: x11
libva error: vaGetDriverNames() failed with unknown libva error
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD

Please set NVD_BACKEND=direct in your etc/environment file and reboot, as the egl backend does not work on your driver version.

Also please set gfx.x11-egl.force-enabled=false in your Firefox settings

@raphaelventura
Copy link
Author

raphaelventura commented Mar 16, 2024

The environment variable for the backend seems to be working properly

~$ env NVD_BACKEND=direct vainfo
Trying display: wayland
Trying display: x11
libva error: vaGetDriverNames() failed with unknown libva error
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD

Please set NVD_BACKEND=direct in your etc/environment file and reboot, as the egl backend does not work on your driver version.

Also please set gfx.x11-egl.force-enabled=false in your Firefox settings

Oh now I see that in my first message, vainfo showed the egl backend was active, which is weird since the env variable was already set in my /etc/environment. Maybe I'd unset it by mistake after boot and before printing the output. I've edited this first message.

As for the gfx.x11-egl.force-enabled=false, I'd understood from this reply that I should set it to true anyway.

@nathansmeal
Copy link

Yeah my bad on the Firefox, keep that set to true.

Do you still have issues even with the direct backend?

@raphaelventura
Copy link
Author

Yes, still the same error messages in the about:support tab:

  • Failed to create EGLSurface!: 0x3003
  • Fallback WR to SW-WR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants