Topic
[Exchange Ideas] Add Intel Hybrid Driver to Deepin (Haswell and Skylake architecture)
Tofloor
poster avatar
Vamp
Moderator
2023-01-12 09: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******00@gmail.com
deepin
2023-01-16 08:00
#1
The user is banned, and the comment is hidden.
Use Markdown Editor
Loading