saiarcot895 / chromium-ubuntu-build

Packaging files for building Chromium on Ubuntu
138 stars 32 forks source link

GetConfigAttributes fails in 75.0.3759.4-0ubuntu1~ppa1~18.10.1 for some VAAPI profiles (probably desired behavior) #46

Open omen23 opened 5 years ago

omen23 commented 5 years ago

GPU acceleration is not broken but about:gpu logs:

Log Messages
[2460:2460:0411/142032.658475:ERROR:vaapi_wrapper.cc(453)] : GetConfigAttributes failed for va_profile 5
[2460:2460:0411/142032.658535:ERROR:vaapi_wrapper.cc(453)] : GetConfigAttributes failed for va_profile 6
[2460:2460:0411/142032.658546:ERROR:vaapi_wrapper.cc(453)] : GetConfigAttributes failed for va_profile 7
[2460:2460:0411/142034.030824:WARNING:gpu_video_decode_accelerator_factory.cc(246)] : Initializing VAAPI VDA.

Still the browser uses MojoVideoDecoderfor all H.264 content and also in nvidia-settings or nvidia-smi it is visible that the Video Engine gets utilized by the browser's GPU process.

saiarcot895 commented 5 years ago

I haven't really looked into the details for this issue, but my guess is that Chromium is trying to get HW decoding properties for profiles that the GPU doesn't support.

JurgenWolf commented 5 years ago

I have the same errors in all recent versions of Chromium and lags at 1080p on my GeForce GT 610 (proprietary driver 390.116)

&

--disable-features=MojoVideoDecoder doesn't work anymore. So nowadays it is impossible to use legacy GPU videodecoder, right?

p.s. OLD Chromium builds worked fine.

JurgenWolf commented 5 years ago
Log Messages
[832:832:0725/215724.007183:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264Baseline
[832:832:0725/215724.007301:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264Main
[832:832:0725/215724.007312:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264High
JurgenWolf commented 5 years ago

my guess is that Chromium is trying to get HW decoding properties for profiles that the GPU doesn't support.

It fails for H264 profiles (it is clearly shown in my log).

saiarcot895 commented 5 years ago

Yes, it looks like MojoVideoDecoder can no longer be disabled at runtime.

I take it this is on Nvidia?

JurgenWolf commented 5 years ago

Thanks for the confirmation.

Yes, I use Nvidia 390.116 I hadn't seen such lags at 1080p youtube prior those errors for H264 profiles and when legacy GPU videodecoder was utilized.

JurgenWolf commented 5 years ago

H264ify extension is enabled as always.

My current VAAPI version:

vainfo: VA-API version: 1.5 (libva 2.5.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
JurgenWolf commented 5 years ago

I just downgraded libva to 2.4.0 - but this didn't help. So looks that it is related to Chromium only.

JurgenWolf commented 5 years ago

I have installed the old custom 74 build from this post: https://github.com/saiarcot895/chromium-ubuntu-build/issues/42#issuecomment-469730935 And now 1080p youtube works as expected using legacy GPU videodecoder... and no those annoying errors for profiles.

saiarcot895 commented 5 years ago

This error message is printed only when the browser is trying to encode using VAAPI. This shouldn't affect video decoding. @omen23 has confirmed that (at least as of 75) the GPU is still being used for video decoding. @JurgenWolf please verify that the GPU is being used for video decoding.

Additionally, instead of going all the way back to the legacy GPU video decoder, please test with 75 and 76, to see the state of video decoding there. It'll be far easier to fix something if the last known working build is more recent.

saiarcot895 commented 5 years ago

I have some versions of Chromium 75 and 76 (taken from the beta channel) here.

JurgenWolf commented 5 years ago

I just tested 75.0.3770.18-0ubuntu1~ppa2~18.10.1 Errors for profiles in log but playback is fine using legacy GPU videodecoder.

So 99.99% that lagging is related to MojoVideoDecoder in Chromium 76/77 - where it is impossible to disable it via --disable-features=MojoVideoDecoder

JurgenWolf commented 5 years ago

In other words, legacy GPU videodecoder must be kept for compatibility... At least for old Nvidia GPUs like GT 610 (Fermi architecture). But Chromium developers dropped this fallback... for unknown reason.

omen23 commented 5 years ago

Hey,

I wonder why I don't have these problems on my GTX 1070. Even GetConfigAttributes fails for the h264 profiles, the Video Engine gets used and even 1080p60 puts the card to performance level 2 or 3 but the GPU/VE usage is 10%. Kind regards

Am Fr., 2. Aug. 2019 um 18:55 Uhr schrieb JurgenWolf < notifications@github.com>:

I just tested 75.0.3770.18-0ubuntu1~ppa2~18.10.1 Errors for profiles in log but playback is fine using legacy GPU video decoder.

So 99.99% that lagging is related to MojoVideoDecoder in Chromium 77 (where it is impossible to disable it via --disable-features=MojoVideoDecoder). And, probably, in 76 it can't be disabled as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saiarcot895/chromium-ubuntu-build/issues/46?email_source=notifications&email_token=AANZ2JTI7GICBY74SMKZ5KTQCRRHBA5CNFSM4HFF6ZL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3OJMCQ#issuecomment-517772810, or mute the thread https://github.com/notifications/unsubscribe-auth/AANZ2JRAWI3VJGHGBAA37TDQCRRHBANCNFSM4HFF6ZLQ .

JurgenWolf commented 5 years ago

I have upgraded to 76.0.3809.62-0ubuntu1~ppa1~18.10.1 And I can confirm - awful playback for me starts exactly since 76...

p.s. Chromium devs also dropped --disable-infobars flag.

omen23 commented 5 years ago

it is displayed like this since I use the VAAPI patched chromium version...

Am Fr., 2. Aug. 2019 um 21:30 Uhr schrieb JurgenWolf < notifications@github.com>:

chrome://gpu

One more question... Since 75 - Direct rendering version value has changed on my machine to: direct but version unknown Any details, explanation regarding this matter?

Thanks in advance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saiarcot895/chromium-ubuntu-build/issues/46?email_source=notifications&email_token=AANZ2JSZBGTPBNHBB46BGLTQCSDN5A5CNFSM4HFF6ZL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3OUS5Y#issuecomment-517818743, or mute the thread https://github.com/notifications/unsubscribe-auth/AANZ2JSADLCI5ER7BNACIFLQCSDN5ANCNFSM4HFF6ZLQ .

JurgenWolf commented 5 years ago

For me Direct rendering was always displayed as Yes on chrome://gpu Since 75 its value has changed to: direct but version unknown

omen23 commented 5 years ago

wm_info

$ vainfo 
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_2
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

vainfo output on Kubuntu disco with nvidia-driver-430 which is 430.40-0ubuntu0~gpu19.04.2 atm (got updated yesterday from 430.40-0ubuntu0~gpu19.04.1)

Yes like I said check the VDPAU feature matrix and my explanation for people that want to use nvenc_h264 and nvdec/h264_cuvid – here is the "new" rebranded feature matrix (you have to expand it, CUVID got rebranded to NVDEC/NVENC). Also in my guide are the right SDK headers to pull from git – so you know which Nvidia's Video Codec SDK you need for your card and with which drivers those are compatible (if at all). Just read my guide if you're interested in Nvidia's support for VDPAU (deprecated/development status unknown)/Nvidias' Video Codec SDK.

regards

JurgenWolf commented 5 years ago

I have switched to 74 - it is displayed as Yes, and the same was in all previous versions. OK, thanks for your screenshot.

Overall, with my GT 610 I have noticed other visual bugs in 75, not just errors for profiles. So one more reason for me to use 74...

JurgenWolf commented 5 years ago

Regarding libva... As I already posted above, its version doesn't matter here... I checked both 2.5.0 and 2.4.0 - no any difference, all those bugs are in Chromium only.

p.s. I'm on Debian testing.

JurgenWolf commented 5 years ago

Regarding NVDEC... It is for modern Nvidia GPUs only, previous generations like Fermi are not supported.

JurgenWolf commented 5 years ago

For Fermi architecture - traditional VDPAU decoding... And it worked very well prior 76 (where legacy GPU videodecoder was dropped, only Mojo).

omen23 commented 5 years ago

"HW accelerated encode and decode are supported on NVIDIA GeForce, Quadro, Tesla, and GRID products with Fermi, Kepler, Maxwell and Pascal generation GPUs." – Fermi is supported just not the GT 610 ...

JurgenWolf commented 5 years ago

https://developer.nvidia.com/video-encode-decode-gpu-support-matrix I completely rechecked those tables including GeForce/TITAN buttons... no any Fermi GPUs there, ALL are absent.

Nvidia just not updated this page properly (regarding new NVDEC)... that's why Fermi word still remains at the top of page by their mistake.

JurgenWolf commented 5 years ago

In 2019 they also dropped the Driver support for Fermi, 390 series is the last suitable.

JurgenWolf commented 5 years ago

In any way, NVDEC has no any relations to Chromium. Chromium doesn't support even legacy VDPAU, it works via VAAPI...

JurgenWolf commented 5 years ago

For Fermi architecture - traditional VDPAU decoding... And it worked very well prior 76 (where legacy GPU videodecoder was dropped, only Mojo).

Including 60 FPS at 1080p.

omen23 commented 5 years ago

Some people still use VDPAU even their card is Video Codec SDK compatible (CUVID/NVENC/NDEC) because they say programs like mplayer can use ffh264vdpau etc and the image quality is better and there is more fine grained control over picture settings. I, myself, use mpv with the built in nvdec decoder of my card.

Am Sa., 3. Aug. 2019 um 10:00 Uhr schrieb JurgenWolf < notifications@github.com>:

For Fermi architecture - traditional VDPAU decoding... And it worked very well prior 76 (where legacy GPU videodecoder was dropped, only Mojo).

Including 60 FPS at 1080p.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saiarcot895/chromium-ubuntu-build/issues/46?email_source=notifications&email_token=AANZ2JVO6M4T2B2JGC2SYITQCU3JZA5CNFSM4HFF6ZL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PJQSY#issuecomment-517904459, or mute the thread https://github.com/notifications/unsubscribe-auth/AANZ2JQP7AYJR2JO5BI2FOLQCU3JZANCNFSM4HFF6ZLQ .

JurgenWolf commented 5 years ago

mpv works for me as well in VDPAU mode.

omen23 commented 5 years ago
[cplayer]  (+) Video --vid=1 (*) (h264 1280x720 29.970fps)
[cplayer]  (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
[display-tags] File tags:
[display-tags]  Title: The Yearly Harvest - RadioResearch @ THC
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/opengl] Initializing GPU context 'x11probe'
[vo/gpu/x11] X11 opening display: :0
[vo/gpu/x11] X11 running at 1920x1080 (":0" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Detected wm supports STAYS_ON_TOP state.
[vo/gpu/x11] Display 0 (DVI-D-0): [0, 0, 1920, 1080] @ 60.000000 FPS
[vo/gpu/x11] Current display FPS: 60.000000
[vo/gpu/opengl] GLX chose FB config with ID 0xad
[vo/gpu/opengl] GLX chose visual with ID 0x27
[vo/gpu/opengl] Creating OpenGL 4.4 context...
[vo/gpu] GL_VERSION='4.4.0 NVIDIA 430.40'
[vo/gpu] Detected desktop OpenGL 4.4.
[vo/gpu] GL_VENDOR='NVIDIA Corporation'
[vo/gpu] GL_RENDERER='GeForce GTX 1070/PCIe/SSE2'
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='4.40 NVIDIA via Cg compiler'
[vo/gpu] Loaded extension GLX_SGI_swap_control.
[vo/gpu] Loaded extension GLX_SGI_video_sync.
[vo/gpu] Loaded extension GL_NV_vdpau_interop.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Assuming 60.000000 FPS for display sync.
[vd] Container reported FPS: 29.970030
[vd] Codec list:
[vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd]     h264_crystalhd (h264) - CrystalHD H264 decoder
[vd]     h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper
[vd]     h264_cuvid (h264) - Nvidia CUVID H264 decoder
[vd] Opening decoder h264
[vd] Looking at hwdec h264-nvdec...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu] Loading hwdec driver 'vdpau-glx'
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via h264-nvdec.
[vd] Selected codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     aac - AAC (Advanced Audio Coding)
[ad]     aac_fixed (aac) - AAC (Advanced Audio Coding)
[ad]     libfdk_aac (aac) - Fraunhofer FDK AAC
[ad] Opening decoder aac
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: aac (AAC (Advanced Audio Coding))
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[af] [in] 48000Hz stereo 2ch floatp
[af] [userspeed] 48000Hz stereo 2ch floatp
[af] [userspeed] (disabled)
[af] [convert] 48000Hz stereo 2ch floatp
[vd] Pixel formats supported by decoder: vdpau cuda vaapi_vld yuv420p
[vd] Codec profile: Constrained Baseline (0x242)
[vd] Requesting pixfmt 'cuda' from decoder.
[vd] Using hardware decoding (nvdec).
[vd] Decoder format: 1280x720 cuda[nv12] bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264 (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1280x720 cuda[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1280x720 cuda[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1280x720 cuda[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1280x720 cuda[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1280x720 cuda[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264

btw I dont use libfdk_aac by choice:

omen23 commented 5 years ago

I never said something different

Am So., 4. Aug. 2019 um 17:52 Uhr schrieb JurgenWolf < notifications@github.com>:

mpv works for me as well in VDPAU mode.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saiarcot895/chromium-ubuntu-build/issues/46?email_source=notifications&email_token=AANZ2JTESO46W5WZ5JTUHGTQC33M3A5CNFSM4HFF6ZL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3QENLY#issuecomment-518014639, or mute the thread https://github.com/notifications/unsubscribe-auth/AANZ2JR7Y67FCNBG5AHCZ33QC33M3ANCNFSM4HFF6ZLQ .

JurgenWolf commented 5 years ago

This deprecated NVCUVID decoding (predecessor of NVDEC) is supported by my GT 610, even libnvidia-legacy-390xx-nvcuvid1 package is installed. But it doesn't matter for Chromium (VAAPI only), unfortunately...

lilianmoraru commented 5 years ago

I am getting similar errors and the decoding does not work(GTX 1050 Ti with proprietary driver):

[14770:14770:0908/170340.907094:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264Baseline
[14770:14770:0908/170340.907178:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264Main
[14770:14770:0908/170340.907187:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264High

Chromium version: Chromium 77.0.3860.5 Ubuntu 19.04 uname -r: 5.3.0-rc7 sudo nvidia-smi dmon -s u - confirms that decoding is always at "0%". vainfo:

libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_2
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

vdpauinfo:

display: :1   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  435.21  Sun Aug 25 08:06:02 CDT 2019

Video surface:

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

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 ---

echo $LIBVA_DRIVER_NAME: vdpau echo $VDPAU_DRIVER: nvidia

chrome://gpu in my case also says Direct rendering version: direct but version unknown.

omen23 commented 5 years ago

watching a youtube Video (1080p60) with h.264ify while running nvidia-smi dmon -s u. Output depends on performance level of the GPU P0 – P8

# gpu    sm   mem   enc   dec
# Idx     %     %     %     %
    0    16    11     0     0
    0    13     9     0     0
    0     8     7     0     0
    0     2     4     0     0
    0    10     8     0     0
    0    39    26     0     0
    0    35    24     0     0
    0    26    17     0    98
    0     8     4     0     9
    0     8     4     0     8
    0     8     4     0     8
    0     8     4     0     8
    0     9     4     0     9
    0     8     4     0     8
    0     8     4     0     8
    0     8     4     0     8
    0     8     4     0     9
    0     8     4     0     8
    0     8     4     0     8
    0     8     4     0     8
    0     8     4     0     8
    0     8     4     0     8
    0     7     3     0     5
    0     8     4     0     9
    0     8     4     0     8
    0     9     4     0     8
    0    10     4     0    15
    0    10     4     0    15
    0    11     4     0    14
    0    29    19     0    17
    0    29    19     0    17
    0    29    20     0    17
    0    30    20     0    22
    0    30    20     0    21
    0    31    20     0    21
    0    30    20     0    23
    0    31    22     0    27
    0    31    20     0    21
    0    43    32     0    34
    0    29    21     0    22
    0    30    21     0    23
    0    30    21     0    21
    0    30    21     0    22
    0    30    21     0    21

Still this is shown in the logs but does NOT affect hardware acceleration performance.

Log Messages
[4988:4988:0910/225502.227738:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264Baseline
[4988:4988:0910/225502.248654:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264Main
[4988:4988:0910/225502.248718:ERROR:vaapi_wrapper.cc(512)] : GetConfigAttributes failed for va_profile VAProfileH264High

Regards

PS:

$ uname
5.0.0-27-generic #28-Ubuntu SMP Tue Aug 20 19:53:07 UTC 2019 x86_64

$ glxinfo
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8192 MB
    Total available memory: 8192 MB
    Currently available dedicated video memory: 7526 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1070/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 430.40
OpenGL core profile shading language version string: 4.60 NVIDIA

$ vainfo
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_2
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

$ vdpauinfo
display: :0   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  430.40  Sun Jul 21 04:55:58 CDT 2019

Video surface:

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

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  

$ chromium-browser --version
Chromium 78.0.3902.4 Ubuntu 19.04

'about:gpu' has always displayed "Direct rendering version: direct but version unknown" on this system

$ neofetch
        #####           OS: Kubuntu 19.04 (disco) 
       #######          Kernel: 5.0.0-27-generic 
       ##O#O##          Uptime: 15 hours, 59 mins 
       #######          Packages: 4085 (dpkg), 3 (snap) 
     ###########        Shell: bash 5.0.3 
    #############       Resolution: 1920x1080 
   ###############      DE: KDE 
   ################     WM: KWin 
  #################     Theme: Breeze [KDE], Default [GTK3] 
#####################   Icons: oxygen [KDE], oxygen [GTK3] 
#####################   Terminal: konsole 
  #################     CPU: AMD Ryzen 7 1700X (16) @ 3.400GHz 
                        GPU: NVIDIA GeForce GTX 1070 
                        Memory: 5326MiB / 32156MiB 
                        GPU Driver: NVIDIA 430.40 
                        Disk (/dev/sdb1): 22G / 92G (25%) 
                        Disk (/dev/sdb5): 40G / 337G (13%) 
                        Disk (/dev/sda1): 334G / 1,7T (21%) 
                        Local IP: 192.168.1.2 
JurgenWolf commented 5 years ago

I just tested 75.0.3770.18-0ubuntu1~ppa2~18.10.1 Errors for profiles in log but playback is fine using legacy GPU videodecoder.

So 99.99% that lagging is related to MojoVideoDecoder in Chromium 76/77 - where it is impossible to disable it via --disable-features=MojoVideoDecoder

I just installed 78.0.3904.34-0ubuntu1~ppa1~19.04.1 amd64 - and MojoVideoDecoder in this build works for me as expected, playback is smooth.

saiarcot895 commented 4 years ago

Is this issue still occurring?

ivucica commented 4 years ago

I think it still occurs, yes:

[144189:144189:0531/215923.372525:ERROR:vaapi_wrapper.cc(583)] GetConfigAttributes failed for va_profile VAProfileH264Baseline
[144189:144189:0531/215923.372621:ERROR:vaapi_wrapper.cc(583)] GetConfigAttributes failed for va_profile VAProfileH264Main
[144189:144189:0531/215923.372630:ERROR:vaapi_wrapper.cc(583)] GetConfigAttributes failed for va_profile VAProfileH264High

Using:

$ vainfo
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_2
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.4.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

I cannot toggle Hardware-accelerated video decode in flags either. In media-internals, kVideoDecoderName is FFmpegVideoDecoder when playing a YouTube video with h264 on.

info says:

"Selected FFmpegVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"

saiarcot895 commented 4 years ago

@ivucica The three error messages are expected on NVidia platforms and will not cause any decoding errors. As for FFmpegVideoDeocder, this is odd; recent versions of Chromium are using MojoVideoDecoder for both GPU and non-GPU video decoding, so you should not ever see FFmpegVideoDecoder.

What do you mean by not being able to toggle the Hardware-accelerated video decode option? Can you go to chrome://version and verify that you are running a recent version of Chromium and that that version comes from my PPA?

hsantos92 commented 4 years ago

@ivucica The three error messages are expected on NVidia platforms and will not cause any decoding errors. As for FFmpegVideoDeocder, this is odd; recent versions of Chromium are using MojoVideoDecoder for both GPU and non-GPU video decoding, so you should not ever see FFmpegVideoDecoder.

What do you mean by not being able to toggle the Hardware-accelerated video decode option? Can you go to chrome://version and verify that you are running a recent version of Chromium and that that version comes from my PPA?

Mojo always fails for me and goes to FFmpeg - "VDA Error 4"

00:00:01.130 kVideoDecoderName "MojoVideoDecoder"
00:00:01.130 kIsPlatformVideoDecoder true
00:00:01.130 info "Selected MojoVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1920,1080], visible rect: [0,0,1920,1080], natural size: [1920,1080], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
00:00:01.130 pipeline_state "kPlaying"
00:00:01.131 error "VDA Error 4"
00:00:01.131 warning "video decoder fallback after initial decode error."
00:00:01.131 info "Failed to initialize VpxVideoDecoder"
00:00:01.131 info "Failed to initialize Dav1dVideoDecoder"
00:00:01.132 kIsVideoDecryptingDemuxerStream false
00:00:01.132 kVideoDecoderName "FFmpegVideoDecoder"