You are not logged in.

#851 2023-08-31 21:44:50

raisedintheusa
Member
Registered: 2022-02-18
Posts: 10

Re: chromium: hardware video acceleration with VA-API

I noticed a similar memory leak issue as well as high cpu usage with the Xorg process when the flag is enabled.

Offline

#852 2023-09-01 05:27:31

246tnt
Member
Registered: 2023-07-26
Posts: 9

Re: chromium: hardware video acceleration with VA-API

You can go star https://bugs.chromium.org/p/chromium/is … id=1467689 to hopefully raise its priority.

Offline

#853 2023-09-10 12:36:40

Reuter
Member
Registered: 2023-05-12
Posts: 9

Re: chromium: hardware video acceleration with VA-API

And it's broken again.

YGmLmNU.png
X11, AMD

I'm so incredibly tired of trying to fix this issue every month or so. I'm almost anxious to run system updates cause breaking HW accelerated decoding appears to be very common.

Last edited by Reuter (2023-09-10 12:39:25)

Offline

#854 2023-09-10 13:54:08

MK73DS
Member
Registered: 2023-05-06
Posts: 8

Re: chromium: hardware video acceleration with VA-API

Reuter wrote:

And it's broken again.

https://i.imgur.com/YGmLmNU.png
X11, AMD

I'm so incredibly tired of trying to fix this issue every month or so. I'm almost anxious to run system updates cause breaking HW accelerated decoding appears to be very common.

Starting from version 116, hardware acceleration doesn't work with AMD gpus. Use version 115 from now on. The tldr is that they removed the legacy vaapi (2) that used to partially work on AMD gpus (1). The new vaapi decoder just doesn't work with AMD gpus, it fails with an error (1). There's an open issue that doesn't get any attention from devs (3).

(1) https://bbs.archlinux.org/viewtopic.php … 1#p2098201
(2) https://bbs.archlinux.org/viewtopic.php … 3#p2115713
(3) https://bugs.chromium.org/p/chromium/is … =-modified

Offline

#855 2023-09-10 16:45:41

Reuter
Member
Registered: 2023-05-12
Posts: 9

Re: chromium: hardware video acceleration with VA-API

MK73DS wrote:

Starting from version 116, hardware acceleration doesn't work with AMD gpus. Use version 115 from now on.

Thank you so much. I will roll back to said version and hope it'll eventually get fixed.

Offline

#856 2023-09-11 00:21:29

cbr1_
Member
Registered: 2019-02-09
Posts: 9

Re: chromium: hardware video acceleration with VA-API

MK73DS wrote:
Reuter wrote:

And it's broken again.

https://i.imgur.com/YGmLmNU.png
X11, AMD

I'm so incredibly tired of trying to fix this issue every month or so. I'm almost anxious to run system updates cause breaking HW accelerated decoding appears to be very common.

Starting from version 116, hardware acceleration doesn't work with AMD gpus. Use version 115 from now on. The tldr is that they removed the legacy vaapi (2) that used to partially work on AMD gpus (1). The new vaapi decoder just doesn't work with AMD gpus, it fails with an error (1). There's an open issue that doesn't get any attention from devs (3).

(1) https://bbs.archlinux.org/viewtopic.php … 1#p2098201
(2) https://bbs.archlinux.org/viewtopic.php … 3#p2115713
(3) https://bugs.chromium.org/p/chromium/is … =-modified

Actually they also removed it for older Intel GPUs as well. (ivybridge for example). It's not looking good I'm afraid lol. At least there's still Firefox (for now.)

Offline

#857 2023-09-16 09:41:06

bsdice
Member
Registered: 2016-08-06
Posts: 14

Re: chromium: hardware video acceleration with VA-API

In case it helps someone: Not AMD but Intel Kaby Lake iGPU, X11, package ungoogled-chromium 117.0.5938.62, kernel 6.1.52, intel-media-driver 23.3.1-1, patched libva 2.20.0-1 (sed -i "s/va_DRI3_Get/va_DRI2_Get/g" ./libva/va/x11/va_x11.c) with --enable-features=VaapiVideoDecodeLinuxGL in chromium-flags.conf, intel_gpu_top still shows VAAPI hardware decoder is active.

Chromium proper has a nasty zero-click zero-day exploit basically every week now. Running an old 115 is hazardous.

Offline

#858 2023-09-18 08:25:22

246tnt
Member
Registered: 2023-07-26
Posts: 9

Re: chromium: hardware video acceleration with VA-API

Well it reports VAAPI works, but is the memory leak fixed ? Because in 116/117, my issue isn't getting VAAPI working, it's that it leaks memory ...

Offline

#859 2023-09-18 08:55:03

MK73DS
Member
Registered: 2023-05-06
Posts: 8

Re: chromium: hardware video acceleration with VA-API

So basically, VAAPI doesn't work at all on AMD and Nvidia, and VAAPI works on Intel but causes huge memory leaks. I'm now confident that no one in the Chromium team actually uses their browser because this bugs shouldn't exist.
This comment from the removal of the old (working!) VAAPI commit is just insulting

Now that we have completed the migration to the new VaapiVideoDecoder, the legacy VaapiVideoDecodeAccelerator class and related code can be removed.

Yeah, good migration, bravo the testing team if there's any...

I have to stay on 115 despite being dangerous because of the lack of security updates...

Offline

#860 2023-09-20 10:33:08

adi222
Member
Registered: 2023-01-03
Posts: 11

Re: chromium: hardware video acceleration with VA-API

bsdice wrote:

In case it helps someone: Not AMD but Intel Kaby Lake iGPU, X11, package ungoogled-chromium 117.0.5938.62, kernel 6.1.52, intel-media-driver 23.3.1-1, patched libva 2.20.0-1 (sed -i "s/va_DRI3_Get/va_DRI2_Get/g" ./libva/va/x11/va_x11.c) with --enable-features=VaapiVideoDecodeLinuxGL in chromium-flags.conf, intel_gpu_top still shows VAAPI hardware decoder is active.

Chromium proper has a nasty zero-click zero-day exploit basically every week now. Running an old 115 is hazardous.

i checked in normal chrome and didnt work in 117, i dont think does it matter about i am using LIBVA_DRI3_DISABLE=1 instead because you are also disabling dri3 with modifing libva, maybe kernel does difference because i am on regular 6.5.3 kernel instead 6.1 lts but i don't think so
i have uhd620 in 8350u laptop, in old chrome 115 it works well but i am looking to switch to new anyways and keep using firefox for yt or something instead because chrome without hardware acceleration on videos is no-go for me because cpu will be hogged up and temps + battery usage will raise by a lot

Last edited by adi222 (2023-09-20 10:34:53)

Offline

#861 2023-09-20 11:04:31

seth
Member
Registered: 2012-09-03
Posts: 59,808

Re: chromium: hardware video acceleration with VA-API

Friendly reminder that there're dedicated youtube clients shameless plug but of course also https://aur.archlinux.org/packages?O=0&K=youtube-viewer and that mpv plays youtube (and a bunch of other services) fine if you've yt-dlp installed.

Offline

#862 2023-09-21 01:34:56

thubble
Member
Registered: 2023-01-21
Posts: 4

Re: chromium: hardware video acceleration with VA-API

thubble wrote:

I rebased my (rather hacky) patch to get VaapiVideoDecoder to work on AMD - it now applies to Chromium 116: https://gist.github.com/thubble/235806c … 9173d24d9f

It works on my RX 6800, verified using chrome://media-internals/ - VaapiVideoDecoder is being used.

I'm running on (X)Wayland with KDE Plasma 5.27, with the following Chromium flags (forcing XWayland - native Wayland will not work with VAAPI as far as I know). I know some of these are unnecessary or redundant/duplicate, but I can't be bothered testing to see which are actually required:

--ozone-platform=x11 --enable-features=CanvasOopRasterization,VaapiVideoDecoder,UseChromeOSDirectVideoDecoder,VaapiIgnoreDriverChecks,PlatformHEVCDecoderSupport,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE --use-cmd-decoder=passthrough --use-gl=angle --use-angle=vulkan --use-vulkan=native --ignore-gpu-blocklist --enable-zero-copy --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-gpu-memory-buffer-video-frames

Now updated for Chromium 117: https://gist.github.com/thubble/235806c … 9173d24d9f

It looks like there's some very recent changes for VAAPI multiplanar format support, so maybe official AMD VAAPI support is coming? https://bugs.chromium.org/p/chromium/is … id=1471111

Offline

#863 2023-09-23 01:03:33

p_noumenon
Member
Registered: 2021-10-22
Posts: 25

Re: chromium: hardware video acceleration with VA-API

I'm having issues with hardware acceleration. I set it up once a few years ago and got it to work when playing YouTube videos in Chromium, but now it doesn't anymore. I've gone through the wiki and followed most of the instructions, as well as gone through some guides, but still nothing. I've tried using enhanced-h264ify to block AV1 and set most of the flags mentioned in the wiki and elsewhere that should be appropriate for my system. I'm sure I'm doing something wrong, but don't know what.

This is my current `~/chromium-flags.conf`:

--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy
--disable-gpu-driver-bug-workarounds
--enable-features=VaapiVideoDecoder
--enable-features=VaapiIgnoreDriverChecks
--disable-features=UseChromeOSDirectVideoDecoder
--use-gl=egl

And the output of `vainfo`:

Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.20 (libva 2.19.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.3.3 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointFEI
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointFEI
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointFEI
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD

Offline

#864 2023-09-23 13:27:40

Firgal
Member
Registered: 2023-09-23
Posts: 13

Re: chromium: hardware video acceleration with VA-API

@p_noumenon

from about 115 not need this flags, only

--enable-features=VaapiVideoDecodeLinuxGL

@everybody

Seems start to fix this bug!!

https://bugs.chromium.org/p/chromium/is … id=1467689

Says that bug is gone, but problem with x264 decode...

Offline

#865 2023-09-23 15:36:56

bwidlar
Member
Registered: 2018-02-06
Posts: 29

Re: chromium: hardware video acceleration with VA-API

Firgal wrote:

@p_noumenon

from about 115 not need this flags, only

--enable-features=VaapiVideoDecodeLinuxGL

@everybody

Seems start to fix this bug!!

https://bugs.chromium.org/p/chromium/is … id=1467689

Says that bug is gone, but problem with x264 decode...

Just tested with xrestop, the leak is fixed and hardware acceleration works.
Chromium version 117.0.5938.92 (Official Build) Arch Linux (64-bit)

Offline

#866 2023-09-23 15:52:46

Firgal
Member
Registered: 2023-09-23
Posts: 13

Re: chromium: hardware video acceleration with VA-API

@bwidlar

x264 also? (i can not test it because i not near linux machine)

It is true? it seems 117.0.5938.92 not contain this fix...

Last edited by Firgal (2023-09-23 15:59:50)

Offline

#867 2023-09-23 16:02:55

p_noumenon
Member
Registered: 2021-10-22
Posts: 25

Re: chromium: hardware video acceleration with VA-API

Firgal wrote:

@p_noumenon

from about 115 not need this flags, only

--enable-features=VaapiVideoDecodeLinuxGL

@everybody

Seems start to fix this bug!!

https://bugs.chromium.org/p/chromium/is … id=1467689

Says that bug is gone, but problem with x264 decode...

Well slap me thrice and hand me to me mama; that fixed it. Thanks!

Offline

#868 2023-09-23 16:36:49

bwidlar
Member
Registered: 2018-02-06
Posts: 29

Re: chromium: hardware video acceleration with VA-API

Firgal wrote:

@bwidlar

x264 also? (i can not test it because i not near linux machine)

It is true? it seems 117.0.5938.92 not contain this fix...

Any youtube video to test it ?

Offline

#869 2023-09-23 17:08:57

Firgal
Member
Registered: 2023-09-23
Posts: 13

Re: chromium: hardware video acceleration with VA-API

bwidlar wrote:
Firgal wrote:

@bwidlar

x264 also? (i can not test it because i not near linux machine)

It is true? it seems 117.0.5938.92 not contain this fix...

Any youtube video to test it ?

try this:

https://test-videos.co.uk/bigbuckbunny/mp4-h264

Offline

#870 2023-09-23 17:13:37

bwidlar
Member
Registered: 2018-02-06
Posts: 29

Re: chromium: hardware video acceleration with VA-API

Firgal wrote:
bwidlar wrote:
Firgal wrote:

@bwidlar

x264 also? (i can not test it because i not near linux machine)

It is true? it seems 117.0.5938.92 not contain this fix...

Any youtube video to test it ?

try this:

https://test-videos.co.uk/bigbuckbunny/mp4-h264


It works, and its accelerated, tested with intel_gpu_top.

(12th Gen Intel(R) Core(TM) i5-12600 iGPU)

Last edited by bwidlar (2023-09-23 17:15:14)

Offline

#871 2023-09-23 17:21:36

Firgal
Member
Registered: 2023-09-23
Posts: 13

Re: chromium: hardware video acceleration with VA-API

Offline

#872 2023-09-23 17:37:13

bwidlar
Member
Registered: 2018-02-06
Posts: 29

Re: chromium: hardware video acceleration with VA-API


info using chrome://media-internals

render_id: 262
player_id: 0
created: 2023-09-23 17:34:26.836 UTC
origin_url: https://test-videos.co.uk/
kFrameUrl: https://test-videos.co.uk/vids/bigbuckb … 0s_1MB.mp4
kFrameTitle:
url: https://test-videos.co.uk/vids/bigbuckb … 0s_1MB.mp4
kTextTracks:
kTotalBytes: 0xff9cb
kIsStreaming: false
kIsSingleOrigin: true
kIsRangeHeaderSupported: true
kRendererName: RendererImpl
pipeline_state: kPlaying
info: Selected VaapiVideoDecoder 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}
kAudioTracks:
kVideoTracks: [object Object]
kMaxDuration: 10
kStartTime: 0
kBitrate: 837589
kIsVideoDecryptingDemuxerStream: false
kVideoDecoderName: VaapiVideoDecoder
kIsPlatformVideoDecoder: true
dimensions: 1920x1080
kResolution: 1920x1080
event: kPlay
duration: 10
pipeline_buffering_state: [object Object]
debug: FFmpegDemuxer: av_read_frame(): End of file
seek_target: 0

Offline

#873 2023-09-23 18:15:58

Firgal
Member
Registered: 2023-09-23
Posts: 13

Re: chromium: hardware video acceleration with VA-API

@bwidlar

this fix resolve memory leak, not vaapi itself. it working, before do this fix, but bugged.

Offline

#874 2023-09-24 08:08:50

stasyaner
Member
Registered: 2021-11-13
Posts: 1

Re: chromium: hardware video acceleration with VA-API

It works for me. With --enable-features=VaapiVideoDecodeLinuxGL in Brave with Chromium 117.0.5938.88 and in Chrome 117.0.5938.92.

Offline

#875 2023-09-24 08:58:34

246tnt
Member
Registered: 2023-07-26
Posts: 9

Re: chromium: hardware video acceleration with VA-API

So did anyone check if  117.0.5938.92 actually fixes the leak ? Because unless I'm reading the commit log above incorrectly the fix isn't included ...

Offline

Board footer

Powered by FluxBB