You are not logged in.
Hi, I have an Intel i7-6700HQ CPU with HD Graphics 530. I'm using the "intel-media-driver" package. For some reason when I run the command "vainfo" I get the error "vaInitialize failed with error code -1 (unknown libva error),exit". How do I fix this? I'm trying to get hardware video acceleration in Chromium using the "chromium-vaapi" package. What am I doing wrong? The Hardware Video Acceleration wiki doesn't say how to fix this.
Offline
Hi, I have an Intel i7-6700HQ CPU with HD Graphics 530. I'm using the "intel-media-driver" package. For some reason when I run the command "vainfo" I get the error "vaInitialize failed with error code -1 (unknown libva error),exit". How do I fix this? I'm trying to get hardware video acceleration in Chromium using the "chromium-vaapi" package. What am I doing wrong? The Hardware Video Acceleration wiki doesn't say how to fix this.
The wiki says exactly what to do... Look at how to set the environment variable to the correct libva implementation.
Offline
I have my environment variables set as shown below however I'm still getting the "vaInitialize failed with error code -1 (unknown libva error),exit" error message. I'm using Gnome and I've tried both Gnome on Wayland and Gnome on Xorg but the error message still persists.
LIBVA_DRIVER_NAME=iHD
LIBVA_DRIVERS_PATH=/usr/lib/dri/iHD_drv_video.so
Offline
What's the output of
strace vainfo(post in [ code ] [ /code ] tags without spaces)
Offline
Actually, looks like the wiki was wrong. The LIBVA_DRIVERS_PATH=/usr/lib/dri/iHD_drv_video.so environment variable should not be in /etc/environment. When I removed it and left only the LIBVA_DRIVER_NAME=iHD environment variable by itself the error went away. Unfortunately hardware video acceleration is still not working in Chromium-vaapi. The Chromium log says "GpuProcessHost: The GPU process crashed!". When I play a Youtube video my CPU usage is steady at around 99% according to top. What else could be preventing Chromium hardware video acceleration from working?
I've attached the output from vainfo:
vainfo: VA-API version: 1.7 (libva 2.7.1)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
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
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
Last edited by techguy378 (2020-04-20 07:16:08)
Offline
What's changed here and what I have occasionally heard is that there might be some incompatibility issues with the new mesa iris driver that's used by modern intels. https://wiki.archlinux.org/index.php/In … ver_(i965)
FWIW chromium-vaapi in general is a hack and often breaks/unbreaks depending on changes, so you should check general HW decoding ability in standalone players.
Offline
I have an update. I installed the H264ify extension in Chromium. Now when I run Chromium-vaapi in Gnome-Wayland the H264ify extension is active but it doesn't seem to work. Youtube always plays the VP9 version of videos and my CPU usage is steady around 150% in top.
If I switch to Gnome-Xorg hardware acceleration seems to work as long as I'm using the H264ify extension in Chromium. The video codec on Youtube videos correctly shows as AVC1 and my CPU usage is around 30% in top.
Offline
I have an update. I installed the H264ify extension in Chromium. Now when I run Chromium-vaapi in Gnome-Wayland the H264ify extension is active but it doesn't seem to work. Youtube always plays the VP9 version of videos and my CPU usage is steady around 150% in top.
If I switch to Gnome-Xorg hardware acceleration seems to work as long as I'm using the H264ify extension in Chromium. The video codec on Youtube videos correctly shows as AVC1 and my CPU usage is around 30% in top.
There is a thread on this forum saying that currently on wayland chromium-vaapi is broken due to being launch with --use-gl=egl to enable HW acceleration.
IIRC AVC1 uses software to decode (DAV1D decoder), you need to see MojoVideoDecoder as indicative of HW Acceleration being used.
Offline
I'm curious then as to why my CPU usage drops drastically with AVC1 compared to how high it is with VP9 when playing the same YouTube video. If AVC1 is software decoded then shouldn't my CPU usage be as high as it is with VP9?
Last edited by techguy378 (2020-04-20 23:20:55)
Offline
The Chromium log says "GpuProcessHost: The GPU process crashed!"
You should not be launching Chromium-vaapi with "--use-gl=egl" if you are not using GNOME/Wayland. There are lots of outdated info/wiki that suggesting "--use-gl=egl" for Intel GPU to get acceleration without any clue that it is only required if one is using Wayland session. Xorg session does not need it and Intel VA-API performs better in Xorg session. With the latest Chromium with or without VA-API, if you use "--use-gl=egl", then you lost all the hardware acceleration.
Intel Skylake does not support VP9 decoding with the iHD driver. You can get partial acceleration for VP9 with hybrid codec along with the i965 VA driver and uses roughy 1/3 of the CPU for 1280x720@30fps or 1/2 of the CPU for 1280x720@60fps compared to Chromium internal VpxVideoDecoder.
why my CPU usage drops drastically with AVC1 compared to how high it is with VP9 when playing the same YouTube video. If AVC1 is software decoded then shouldn't my CPU usage be as high as it is with VP9?
This is not the metric to tell if you have hardware acceleration.
AVC1 is a modern 2019 codec and it may be optimized with advanced SIMD media instructions. Since there is no known support of hardware acceleration for AVC1 today, the video may be encoded with CPU playback in mind.
Last edited by liewkj (2020-04-21 02:21:42)
Offline
I didn't specify the "--use-gl=egl" flag when running Chromium but Chromium still says "GpuProcessHost: The GPU process crashed!". Aside from switching to the i965 VA driver Is there a flag I need to use to disable this so I get hardware acceleration?
Offline
I didn't specify the "--use-gl=egl" flag when running Chromium but Chromium still says "GpuProcessHost: The GPU process crashed!".
Can you goto "chrome://gpu" and check the "Command Line" row? Perhaps you have the flag saved somewhere and the likely culprit is chromium-flags.conf in $HOME/.config. Otherwise, you shouldn't be getting the GPU process crashed message. I also have a Skylake GT2 laptop and I have both H.264 and VP9 (partial) acceleration from i965 VA driver working for Chromium-vaapi with GNOME/Xorg.
Offline
The chromium-flags.conf file in my home folder is the only place I've specified any flags and the flag you mentioned isn't one of them. I don't run Chromium from the terminal, I only run it from the Gnome launcher which means it only uses the flags in the chromium-flags.conf file. I didn't even know about the flag you mentioned until I read your post.
Offline
So I switched from the iHD video acceleration driver to the i965 driver. When watching VP9 Youtube videos with the iHD driver my CPU usage was at 99%. Upon switching to the i965 driver my CPU usage when watching the same VP9 video dropped to 30%. The chrome://flags page still says the Hardware Acceleration setting is unavailable for my platform though but I must be getting hardware acceleration. Other than the Libva driver, I haven't changed anything since my last post.
My Chromium command line is:
/usr/lib/chromium/chromium --ignore-gpu-blacklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-zero-copy --disable-gpu-driver-bug-workarounds --enable-accelerated-video --enable-accelerated-mjpeg-decode --flag-switches-begin --force-gpu-rasterization --enable-oop-rasterization --enable-zero-copy --ignore-gpu-blacklist --enable-smooth-scrolling
Offline
Hardware acceleration isn't officially available on Linux, that's why you see that message...
Go to chrome://media-internals and see if MojoVideoDecoder is being used, as I said previously that's how you know if you're using HW Acceleration.
Offline
My Chromium command line is:
/usr/lib/chromium/chromium --ignore-gpu-blacklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-zero-copy --disable-gpu-driver-bug-workarounds --enable-accelerated-video --enable-accelerated-mjpeg-decode --flag-switches-begin --force-gpu-rasterization --enable-oop-rasterization --enable-zero-copy --ignore-gpu-blacklist --enable-smooth-scrolling
--enable-native-gpu-memory-buffersThis is your problem, remove it, it is not supported in Linux. Though it didn't crash previously, it did nothing for Linux build.
--enable-accelerated-video
--enable-accelerated-mjpeg-decodeThose are obsoleted. They do nothing for recent Chromium. I would suggest removing them. I would also suggest that you completely remove chromium-flags.conf from $HOME/.config, goto chrome://flags and only enable "Override software rendering list" to begin with. This is equivalent to "--ignore-gpu-blacklist" but it got saved without using chromium-flags.conf.
Offline
Without the following three options in my "chromium-flags.conf" file I get software rasterization only on the chrome://gpu page regardless of which flags I enable on the chrome://flags page. For some reason enabling the "override software rendering list" and "enable GPU rasterization" options in the chrome://flags page has no effect. In any case I'm still not getting mojodecoder for Youtube videos.
--disable-gpu-driver-bug-workarounds
--ignore-gpu-blacklist
--enable-gpu-rasterization
Not sure if it makes a difference, but the compile flags I used when compiling Chromium-Vaapi from AUR were "-march=native -O2 -pipe" instead of the default "-march=x86_64 -mtune=generic" options.
Last edited by techguy378 (2020-04-24 06:38:26)
Offline
Not sure if it makes a difference, but the compile flags I used when compiling Chromium-Vaapi from AUR were "-march=native -O2 -pipe" instead of the default "-march=x86_64 -mtune=generic" options.
I do not have any insight on messing with the build flags. You should just download the prebuilt binary from the repo to check it out yourself. You don't really need to mess with the build flags to further optimized specifically for your machine. If you decided on that path, then you'd better know how to deal with the issues arise from it. Seeking community help on your highly customized system is a moot point. No one can foresee what you have done when you had chosen to be different.
I can only tell you that if you stick to Xorg and do not venture into Wayland, then hardware video acceleration works for any Intel GPU since the Sandybridge generation for chromium-vaapi. I had tried them, use them everyday and I spoke out from facts, especially for Haswell and Skylake generation.
Offline