#Brave on Arch uses Software AV1 encoding, tanking performance. How can I switch to H264?

38 messages · Page 1 of 1 (latest)

left orbit
#

Grabbed an old laptop with an i5-4200M. I confirmed that I have H264 hardware decoding after I followed the wiki and checked with vainfo.

I installed Brave from aur (brave-bin) and performance tanks when playing a YouTube video. I checked it and is using a software AV1 encoder.

Is there a way to disable that? I checked brave://flags and disabled the only AV1 option, but it did nothing.

dull geyser
#

you can install the extension enhanced-h264ify

left orbit
#

installed the extension, still no hardware encoding
weird

#

Brave on Arch uses Software AV1 encoding, tanking performance. How can I switch to H264?

dull geyser
#

Oh, yeah you have to click on ehnahced-h264ify and disable av1

#

Also hardware encoding/decoding does not work on chromium, it's always a hit or miss

left orbit
#

tried both brave and chromium, got this set of errors

[42759:42759:0526/044513.035602:ERROR:vaapi_wrapper.cc(2827)] vaPutSurface failed, VA error: unknown libva error
[42759:42759:0526/044513.037200:ERROR:vaapi_video_decode_accelerator.cc(287)] Failed putting surface into pixmap
[42759:42759:0526/044519.582573:ERROR:vaapi_wrapper.cc(2827)] vaPutSurface failed, VA error: unknown libva error
[42759:42759:0526/044519.584477:ERROR:vaapi_video_decode_accelerator.cc(287)] Failed putting surface into pixmap
[42759:42759:0526/044525.865519:ERROR:vaapi_wrapper.cc(2827)] vaPutSurface failed, VA error: unknown libva error
[42759:42759:0526/044525.865932:ERROR:vaapi_video_decode_accelerator.cc(287)] Failed putting surface into pixmap
#

any idea of how can i try and diagnose those?

dull geyser
#

not sure really

#

I haven;t seen these ones

vocal fulcrum
#

@left orbit did you installed the HW acceleration packages right?

#

.aw hardware acceleration

compact dirgeBOT
vocal fulcrum
#

Obviously you will not have AV1 decoding so just disable that

left orbit
#

i did, to be more precise, i installed all of the following just in case:

libva-intel-driver libva-utils mesa lib32-mesa xf86-video-intel vulkan-intel

vocal fulcrum
#

And what is the output of vainfo?

left orbit
#
vainfo: VA-API version: 1.18 (libva 2.18.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
vocal fulcrum
#

Ok so you only have H264 decoding, in h264ify disable everything excluding H264

left orbit
#

i did that

#

checked usage with btop and cpu ramped up from 4 to 40% during video playback

vocal fulcrum
#

What about the command intel_gpu_top? It reports the Video usage

left orbit
dull geyser
#

Chromium breaks vaapi every once in a while

vocal fulcrum
#

With sudo of course

dull geyser
#

I don't think you will have much luck with brave

#

I have tried to get vaapi on brave and it never worked

left orbit
#

i also tried chromium, also didn't worked and got the same errors

vocal fulcrum
#

Yes same here, I use Firefox instead

left orbit
#

i also tried firefox, checked if it was using hadrware decoding but it was set to software

vocal fulcrum
#

Well, then probably you fucked something I guess. I could not be sure

#

You can go to chrome://gpu to see if video decoding is enabled there

left orbit
#

it indeed is, which is the weirdest part

vocal fulcrum
#

What about this webpage?

left orbit
#

for h264 baseline yes

#

but it just results on this

vocal fulcrum
#

Well thenk idk, it works on my CPU :(

left orbit
#

tried a couple of more fixes from the arch wiki, chromium issue tracker and brave forums but couldn't get it to work
anyways, thanks @vocal fulcrum @dull geyser