Bug 5137

Summary: Ho HW video decoding on Nvidia GPU
Product: Fedora Reporter: Vladislav Solovei <vladsol2009>
Component: chromium-vaapiAssignee: Akarshan Biswas <akarshan.biswas>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P1    
Version: f29   
Hardware: x86_64   
OS: GNU/Linux   
namespace:
Attachments: chrome://gpu output
vdpauinfo output

Description Vladislav Solovei 2019-01-11 15:13:36 CET
Fedora 29, x86_64
CPU: Core I5-3570K
GPU: Nvidia GTX 1060 6GB
Nvidia driver: 415.25

Installed:
chromium-vaapi version: 71.0.3578.98

libva-vdpau-driver-0.7.4-22.fc29.x86_64
libvdpau-va-gl-0.4.2-10.fc29.x86_64

I launch a chromium-vaapi and get errors:

[9605:9605:0111/160529.365713:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365765:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 0 and entrypoint 1
[9605:9605:0111/160529.365773:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365778:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 1 and entrypoint 1
[9605:9605:0111/160529.365787:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365792:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 2 and entrypoint 1
[9605:9605:0111/160529.365797:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365801:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 3 and entrypoint 1
[9605:9605:0111/160529.365806:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365814:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 5 and entrypoint 1
[9605:9605:0111/160529.365819:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365824:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 6 and entrypoint 1
[9605:9605:0111/160529.365829:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365833:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 7 and entrypoint 1
[9605:9605:0111/160529.365838:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365851:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 8 and entrypoint 1
[9605:9605:0111/160529.365856:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365871:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 9 and entrypoint 1
[9605:9605:0111/160529.365878:ERROR:vaapi_wrapper.cc(645)] vaQuerySurfaceAttributes failed VA error: invalid parameter
[9605:9605:0111/160529.365883:ERROR:vaapi_wrapper.cc(545)] GetMaxResolution failed for va_profile 10 and entrypoint 1


chrome://gpu shows "Video Decode: Hardware accelerated", but, in fact, hw video decoding is not working (very high CPU load on h264 video playback)
chrome://media-internals shows "video_decoder	FFmpegVideoDecoder" - not a GPUVideoDecode

chrome://gpu output attached

vdpauinfo output:
$ vdpauinfo 
display: :0   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  415.25  Wed Dec 12 09:59:49 CST 2018

Video surface:

name   width height types
-------------------------------------------
420     8192  8192  NV12 YV12 
422     8192  8192  UYVY YUYV 

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0 65536  4096  4096
MPEG2_SIMPLE                    3 65536  4096  4096
MPEG2_MAIN                      3 65536  4096  4096
H264_BASELINE                  51 65536  4096  4096
H264_MAIN                      51 65536  4096  4096
H264_HIGH                      51 65536  4096  4096
VC1_SIMPLE                      1  8190  2048  2048
VC1_MAIN                        2  8190  2048  2048
VC1_ADVANCED                    4  8190  2048  2048
MPEG4_PART2_SP                  3  8192  2048  2048
MPEG4_PART2_ASP                 5  8192  2048  2048
DIVX4_QMOBILE                   0  8192  2048  2048
DIVX4_MOBILE                    0  8192  2048  2048
DIVX4_HOME_THEATER              0  8192  2048  2048
DIVX4_HD_1080P                  0  8192  2048  2048
DIVX5_QMOBILE                   0  8192  2048  2048
DIVX5_MOBILE                    0  8192  2048  2048
DIVX5_HOME_THEATER              0  8192  2048  2048
DIVX5_HD_1080P                  0  8192  2048  2048
H264_CONSTRAINED_BASELINE      51 65536  4096  4096
H264_EXTENDED                  51 65536  4096  4096
H264_PROGRESSIVE_HIGH          51 65536  4096  4096
H264_CONSTRAINED_HIGH          51 65536  4096  4096
H264_HIGH_444_PREDICTIVE       51 65536  4096  4096
HEVC_MAIN                      153 262144  8192  8192
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         32768 32768    y  Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8 
R10G10B10A2      32768 32768    y  Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         32768 32768
R8G8B8A8         32768 32768
R10G10B10A2      32768 32768
B10G10R10A2      32768 32768
A8               32768 32768

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     y
INVERSE_TELECINE                 y
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y         1     8192
VIDEO_SURFACE_HEIGHT             y         1     8192
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y
Comment 1 Vladislav Solovei 2019-01-11 15:14:23 CET
Created attachment 2002 [details]
chrome://gpu output
Comment 2 Vladislav Solovei 2019-01-11 15:14:38 CET
Created attachment 2003 [details]
vdpauinfo output
Comment 3 Akarshan Biswas 2019-01-11 15:38:49 CET
Hi.

Please see https://src.fedoraproject.org/rpms/libva-vdpau-driver/c/a830d5d7a5f335f89f2e634e9c70e8eb0e2a1999?branch=master


Also I'm thinking of blacklisting Nvidia GPUs from next update.

This is not a chromium-vaapi bug.
Closing.

Thanks for the report.
Comment 4 Vladislav Solovei 2019-01-11 18:25:51 CET
> Also I'm thinking of blacklisting Nvidia GPUs from next update.

That is, there will no longer be any possibility at all to use hardware acceleration of video decoding with (not so old) Nvidia GPUs?
Comment 5 Akarshan Biswas 2019-01-15 16:54:38 CET
(In reply to Vladislav Solovei from comment #4)
> > Also I'm thinking of blacklisting Nvidia GPUs from next update.
> 
> That is, there will no longer be any possibility at all to use hardware
> acceleration of video decoding with (not so old) Nvidia GPUs?

There are two ways:
1) Either you have to use the patched libva-vdpau-driver that I have shared the link in comment 3
2)Ask Nvidia to officially support VA-API


Regarding blacklisting, you can enable it by enabling Override software rendering list flag in chrome://flags but get prepared to get crashes and other odds.