I upgraded my notebook to Centos 8, because I thought I can eanble hardware accelerated video decoding on the Nvidia card for watching e.g. Eurosport. I want to use the Nouveau driver. Bevore doing so, I tried it "quickly" on Kubuntu, where I succeeded, so principially it seems to be possible. I'm very proud how far I came, but at the end there is a part of the puzzle still missing...
After the fresh setup I did the following steps:
Code: Select all
[gerhard@mandarin ~]$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GT218M [NVS 3100M] (rev a2)
[gerhard@mandarin ~]$ inxi -G
Graphics: Device-1: NVIDIA GT218M [NVS 3100M] driver: nouveau v: kernel
Device-2: Chicony type: USB driver: uvcvideo
Display: x11 server: X.Org 1.20.10 driver: loaded: nouveau resolution: 1600x900~60Hz
OpenGL: renderer: NVA8 v: 3.3 Mesa 20.3.3
[gerhard@mandarin ~]$ lsmod | grep nouveau
nouveau 2256896 13
mxm_wmi 16384 1 nouveau
i2c_algo_bit 16384 1 nouveau
drm_kms_helper 233472 1 nouveau
ttm 114688 1 nouveau
drm 569344 16 drm_kms_helper,ttm,nouveau
wmi 32768 4 hp_wmi,wmi_bmof,mxm_wmi,nouveau
video 49152 1 nouveau
[root@mandarin ~]$ dnf install libva-utils
[root@mandarin ~]$ dnf install libva-vdpau-driver
[root@mandarin ~]$ dnf install mesa-vdpau-drivers
[gerhard@mandarin ~]$ vainfo
libva info: VA-API version 1.5.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nouveau_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
[gerhard@mandarin ~]$ ls -n /usr/lib64/dri/
[...]
lrwxrwxrwx. 1 0 0 18 28. Jul 13:15 nvidia_drv_video.so -> vdpau_drv_video.so
-rwxr-xr-x. 8 0 0 22190464 27. Mär 06:11 r600_dri.so
-rwxr-xr-x. 8 0 0 22190464 27. Mär 06:11 radeonsi_dri.so
lrwxrwxrwx. 1 0 0 18 28. Jul 13:15 s3g_drv_video.so -> vdpau_drv_video.so
-rwxr-xr-x. 1 0 0 660136 28. Jul 13:15 vdpau_drv_video.so
[...]
Code: Select all
[root@mandarin ~]$ ln -s /usr/lib64/dri/vdpau_drv_video.so /usr/lib64/dri/nouveau_drv_video.so
[gerhard@mandarin ~]$ ls -n /usr/lib64/dri/
[...]
-rwxr-xr-x. 8 0 0 22190464 27. Mär 06:11 nouveau_dri.so
lrwxrwxrwx. 1 0 0 18 26. Jul 01:01 nouveau_drv_video.so -> vdpau_drv_video.so
lrwxrwxrwx. 1 0 0 18 28. Jul 13:15 nvidia_drv_video.so -> vdpau_drv_video.so
-rwxr-xr-x. 1 0 0 660136 28. Jul 13:15 vdpau_drv_video.so
[...]
[gerhard@mandarin ~]$ vainfo
libva info: VA-API version 1.5.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_1_5
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.5 (libva 2.5.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API (arekinath) - 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
[gerhard@mandarin ~]$ vdpauinfo
display: :0 screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0
Video surface:
name width height types
-------------------------------------------
420 8192 8192 NV12 YV12
422 8192 8192 UYVY YUYV
444 8192 8192 Y8U8V8A8 V8U8Y8A8
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 --- not supported ---
MPEG2_SIMPLE --- not supported ---
MPEG2_MAIN --- not supported ---
H264_BASELINE --- not supported ---
H264_MAIN --- not supported ---
H264_HIGH --- not supported ---
VC1_SIMPLE --- not supported ---
VC1_MAIN --- not supported ---
VC1_ADVANCED --- not supported ---
MPEG4_PART2_SP --- not supported ---
MPEG4_PART2_ASP --- not supported ---
DIVX4_QMOBILE --- not supported ---
DIVX4_MOBILE --- not supported ---
DIVX4_HOME_THEATER --- not supported ---
DIVX4_HD_1080P --- not supported ---
DIVX5_QMOBILE --- not supported ---
DIVX5_MOBILE --- not supported ---
DIVX5_HOME_THEATER --- not supported ---
DIVX5_HD_1080P --- not supported ---
H264_CONSTRAINED_BASELINE --- not supported ---
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
HEVC_MAIN --- not supported ---
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 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
R8G8B8A8 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
R10G10B10A2 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
B10G10R10A2 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
Bitmap surface:
name width height
------------------------------
B8G8R8A8 8192 8192
R8G8B8A8 8192 8192
R10G10B10A2 8192 8192
B10G10R10A2 8192 8192
A8 8192 8192
Video mixer:
feature name sup
------------------------------------
DEINTERLACE_TEMPORAL y
DEINTERLACE_TEMPORAL_SPATIAL -
INVERSE_TELECINE -
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 48 2048
VIDEO_SURFACE_HEIGHT y 48 2048
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
Code: Select all
cd /tmp
mkdir nouveau
cd nouveau
wget https://raw.github.com/envytools/firmware/master/extract_firmware.py
wget http://us.download.nvidia.com/XFree86/Linux-x86/340.108/NVIDIA-Linux-x86-340.108.run
sh NVIDIA-Linux-x86-340.108.run --extract-only
python2 extract_firmware.py
mkdir /lib/firmware/nouveau
cp -d nv* vuc-* /lib/firmware/nouveau/
[gerhard@mandarin ~]$ vdpauinfo
display: :0 screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0
Video surface:
name width height types
-------------------------------------------
420 8192 8192 NV12 YV12
422 8192 8192 UYVY YUYV
444 8192 8192 Y8U8V8A8 V8U8Y8A8
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 0 16384 2048 2048
MPEG2_SIMPLE 3 16384 2048 2048
MPEG2_MAIN 3 16384 2048 2048
H264_BASELINE 41 16384 2048 2048
H264_MAIN 41 16384 2048 2048
H264_HIGH 41 16384 2048 2048
VC1_SIMPLE 1 16384 2048 2048
VC1_MAIN 2 16384 2048 2048
VC1_ADVANCED 4 16384 2048 2048
MPEG4_PART2_SP 3 16384 2048 2048
MPEG4_PART2_ASP 5 16384 2048 2048
DIVX4_QMOBILE --- not supported ---
DIVX4_MOBILE --- not supported ---
DIVX4_HOME_THEATER --- not supported ---
DIVX4_HD_1080P --- not supported ---
DIVX5_QMOBILE --- not supported ---
DIVX5_MOBILE --- not supported ---
DIVX5_HOME_THEATER --- not supported ---
DIVX5_HD_1080P --- not supported ---
H264_CONSTRAINED_BASELINE 0 16384 2048 2048
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---
Then I installed and configured chromium beta, as I learned here (https://www.linuxuprising.com/2018/08/h ... rated.html)
Code: Select all
[root@mandarin ~]$ dnf install snapd
[root@mandarin ~]$ systemctl enable snapd --now
[root@mandarin ~]$ snap install chromium --beta
chrome://flags enable "Override software rendering list"
and I start chromium using
[gerhard@mandarin ~]$ chromium --use-gl=desktop --enable-features=VaapiVideoDecoder --enable-gpu-rasterization --ignore-gpu-blocklist
When I check chrom://gpu I see exactly how it should look like, all green, except Vulkan.
Very happy about that I tried to watch a video on Eurosport-Player. But the CPU load is still high, about 50%-70% on all 4 cores, the fan runs loud, it gets hot. When analyzing the media with Ctrl + Shift + i, more tools -> media I see , the VA hardware acceleration seems not to be used, it uses the FFmpeg software decoder instead.
The codec seems to be a h.264_high, , so what might be wrong?
I found somewhere that I can increase the Libva debug output,
Code: Select all
[gerhard@mandarin XFits]$ LIBVA_MESSAGING_LEVEL=2 chromium --use-gl=desktop --enable-features=VaapiVideoDecoder --ignore-gpu-blocklist --enable-accelerated-video-decode --enable-gpu-rasterization
/home/gerhard/Bilder was removed, reassigning PICTURES to homedir
libva info: VA-API version 1.9.0
libva info: Trying to open /snap/chromium/1685/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nouveau_drv_video.so
libva info: va_openDriver() returns -1
[36749:36749:0728/141641.534528:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is desktop
[36749:36749:0728/141641.595865:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
Code: Select all
[root@mandarin tmp]# ln -s /usr/lib64/dri/nvidia_drv_video.so /snap/chromium/1685/gnome-platform/usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
I also tried google-chrome, google-chrome-beta and -unstable, always the same, I even tried to force the libva driver path,
Code: Select all
[gerhard@mandarin XFits]$ LIBVA_DRIVERS_PATH=/usr/lib64/dri/ LIBVA_MESSAGING_LEVEL=2 chromium[...]
Does anybody know which part or the puzzle I'm still missing? Do I need at some part another version? Can I get somehow more debug-info? Am I too naive just creating these symlinks to make it working?