[Share Experiences] Add Intel Hybrid Driver to Deepin (Haswell and Skylake architecture)
Tofloor
poster avatar
Vamp
deepin
2023-01-13 01:41
Author

Hello there,

Lot of people use older Notebooks with Skylake architecture. This architecture GPU is not suppport modern codecs default (for example VP9 that use Youtube) but able to decode it a special driver named Intel Hybrid Driver. It not a standalone package, it need to install beside the normal driver.

On Debian (and Deepin) i not found this package, so now need to compile it from source. I would like to add some progress how to do it your own.

Update 1 - 2023.01.13

  • Change libva to 2.17 dev
  • Change libva-utils to 2.17 dev
  • change intel-vaapi-driver to master branch (it 2 year newer)
  • change intel-hybrid-driver to my repo. It contain all fix that pull after the intel repo is archived.

  1. Update your system to latesest version (V20.8 now)

  2. Install dependencies

    sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools
    
  3. Compile this modules

    libva

    git clone --branch v2.17-branch https://github.com/intel/libva
    cd libva
    ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
    time make -j$(nproc) VERBOSE=1
    sudo make -j$(nproc) install
    

    cmrt

    git clone https://github.com/intel/cmrt
    cd cmrt
    ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
    time make -j$(nproc) VERBOSE=1
    sudo make -j$(nproc) install
    

    intel-hybrid-driver (i use a fork, not the Intel repo, because it contain a fix that need, that you use libva 2.0+)

    git clone https://github.com/vampywiz17/intel-hybrid-driver
    cd intel-hybrid-driver
    ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
    time make -j$(nproc) VERBOSE=1
    sudo make -j$(nproc) install
    

    intel-vaapi-driver

    git clone https://github.com/intel/intel-vaapi-driver
    cd intel-vaapi-driver
    ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-hybrid-codec
    time make -j$(nproc) VERBOSE=1
    sudo make -j$(nproc) install
    

    libva-utils

    git clone --branch v2.17-branch https://github.com/intel/libva-utils
    cd libva-utils
    ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
    time make -j$(nproc) VERBOSE=1
    sudo make -j$(nproc) install
    
  4. Add environment variables this file: /etc/environment

    LIBVA_DRIVER_NAME=i965
    LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri
    

Reboot the system and test it!

vainfo (my Notebook is Haswell):

Trying display: wayland
Trying display: x11
libva info: VA-API version 1.16.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_16
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.16 (libva 2.16.0)
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
      VAProfileVP9Profile0            : VAEntrypointVLD

And check a youtube video with 1440p resolution, VP9 codec! Not bad a 10 years old architekture :)

Képernyőkép_Terület kiválasztása_20230112103838.png

Test:

Test machine - Intel Haswell CPU (i5-4300U) with Intel HD Graphics 4400

Youtube VP9 1080p - no frame drop
Youtube VP9 1440p - no frame drop
Youtube VP9 2160p - medium frame drop
Youtube VP9 1080p60 - low-medium frame drop
Youtube VP9 1440p60 - high frame drop
Youtube VP9 2160p60 - very high frame drop

Reply Favorite View the author
All Replies
le******[email protected]
deepin
2023-01-17 00:00
#1
It has been deleted!
ud******[email protected]
deepin
2023-02-21 09:45
#2
It has been deleted!
fengshuo
Deepin Wiki Editor
2023-03-25 02:00
#3

Wow, VP9 decoding on a 4th gen core i5 iGPU and no stuttering at 1080p is seriously impressive! Makes me wonder why this isn't the default driver...

Any chance of getting this as a pre-compiled package to ship with Deepin?

Reply View the author