You are not logged in.

#1 2021-02-10 11:39:54

k0ss4
Member
Registered: 2021-02-05
Posts: 17

VP9 not hardware accelerated

Hello,
I discoverd that playing a video on youtube or playing some game in web browser(shake&fidget for example) uses the cpu so much(4k video around 25% and the game around 50%). I searched arch wiki and installed libva, libva-vdpau-driver-chromium(aur) and libvdpau-va-gl.
vainfo output:

vainfo: VA-API version: 1.10 (libva 2.10.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
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD

vdpauinfo output:

display: :0.0   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  460.39  Thu Jan 21 21:46:12 UTC 2021

Video surface:

name   width height types
-------------------------------------------
420     8192  8192  NV12 YV12 
422     8192  8192  UYVY YUYV 
444     8192  8192  NV24 YV24 
420_16  8192  8192  P010 P016 
422_16  8192  8192  UYVY YUYV 
444_16  8192  8192  Y_U_V_444_16 

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
VP9_PROFILE_0                   1 262144  8192  8192
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                   1 262144  8192  8192
VP9_PROFILE_3                  --- not supported ---
HEVC_MAIN                      153 262144  8192  8192
HEVC_MAIN_10                   153 262144  8192  8192
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   153 262144  8192  8192
HEVC_MAIN_444                  153 262144  8192  8192
HEVC_MAIN_444_10               153 262144  8192  8192
HEVC_MAIN_444_12               153 262144  8192  8192

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  

/etc/environment :

LIBVA_DRIVER_NAME=vdpau
VDPAU_DRIVER=nvidia

grep -iE 'vdpau | dri driver' /var/log/Xorg.0.log

[     6.264] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia

Chrome dev tools(media tab) on a youtube video shows:

Video Decoder
Decoder name: VpxVideoDriver
Hardware decoder: false
Decrypting demuxer: false

Aduio decoder
Decoder name: FFmpegAudioDecoder
Hardware decoder: false
Decrypting demuxer: false

I have these flags enabled in brave:
#ignore-gpu-blocklist
#enable-gpu-rasterization
#enable-zero-copy
#enable-accelerated-video-decode

My spec:
CPU: Ryzen 7 2700X
GPU: RTX 2070 SUPER
Web Browser: Brave(brave-bin)
I have both nvidia and nvidia-utils installed.

Help please :)

Last edited by k0ss4 (2021-02-10 11:45:55)

Offline

#2 2021-02-10 11:51:41

progandy
Member
Registered: 2012-05-17
Posts: 5,304

Re: VP9 not hardware accelerated

your vaapi implementation can only decode mpeg2, mpeg4, h264 and vc1 (WMV9).

You could try https://aur.archlinux.org/packages/libv … r-vp9-git/ (maybe this would have to be merged with some patches from the vdpau package you use)

Otherwise force your browser to use h264, but then you can't have 4K.

Last edited by progandy (2021-02-10 11:59:05)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#3 2021-02-10 11:58:40

k0ss4
Member
Registered: 2021-02-05
Posts: 17

Re: VP9 not hardware accelerated

Thanks for the reply. I installed it and removed the previous one and now youtube throws an error saying

An error occurred. Pleasy try again later. (Playback ID: jpJpmexQzGq8qXp)

progandy wrote:

(maybe this would have to be merged with the patches from the vdpau package you use)

How should i do that?

Offline

#4 2021-02-10 12:01:35

progandy
Member
Registered: 2012-05-17
Posts: 5,304

Re: VP9 not hardware accelerated

No idea, I do not use any Chromium-based browsers.  Read the first comment for the package.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2021-02-10 12:03:16

k0ss4
Member
Registered: 2021-02-05
Posts: 17

Re: VP9 not hardware accelerated

So Im forced to use h264ify extension. Thanks anyway

Offline

#6 2021-02-10 12:13:23

k0ss4
Member
Registered: 2021-02-05
Posts: 17

Re: VP9 not hardware accelerated

Even with h264ify or the anchanced version youtube videos don't work. The audio plays normally but video is just grey/black

Offline

#7 2021-02-10 12:31:02

progandy
Member
Registered: 2012-05-17
Posts: 5,304

Re: VP9 not hardware accelerated

Set up mpv for hardware decoding and use https://chrome.google.com/webstore/deta … bfbiigleji


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#8 2021-02-10 18:13:32

k0ss4
Member
Registered: 2021-02-05
Posts: 17

Re: VP9 not hardware accelerated

progandy wrote:

Set up mpv for hardware decoding and use https://chrome.google.com/webstore/deta … bfbiigleji

Thanks but i think I'm just gonna distro hop to other linux systems and see if the problem remains(Manjaro and Fedora didn't have such problem)

Offline

#9 2021-02-13 21:38:34

k0ss4
Member
Registered: 2021-02-05
Posts: 17

Re: VP9 not hardware accelerated

Huh interesting. I've noticed that the problem occurs when i set anything in xorg.conf(by nvidia-settings) and reboot. Before that everything is fine. Furthermore that happens only on xfce and only on arch and some arch-derivatives(endeavouros and arco). I've just installed endeavour with kde on my second drive and everything works fine(still no vp9 but cpu usage in brave is not higher than 10%) even if i set something to xorg.conf

Offline

#10 2021-02-13 22:23:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,062

Re: VP9 not hardware accelerated

This just sounds like you break your general GL by generating incomplete configurations. What are you setting in your xorg.conf that needs to be generated and isn't already handled by the default config? You'll need to add

Section "Files"    
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

to a file generated by nvidia-xconfig to fix the GLX lookup paths.

Offline

#11 2021-02-13 22:49:01

k0ss4
Member
Registered: 2021-02-05
Posts: 17

Re: VP9 not hardware accelerated

I didn't mess with xorg.conf directly. I set up displays positions and a primary display in nvidia-settings(with sudo) and then save the configuration to the "default " location which is /etc/X11/xorg.conf. I remember that when saving there was an option with checkbox "Merge with current configuration"(?). It's weird because it didn't break anything on manjaro or even fedora(with xfce). I'm running arch KDE now anyway

Offline

Board footer

Powered by FluxBB