n6005/n5105在debian11实现jellyfin硬解
inter集成显卡debian11默认不支持硬解,可按以下方式正确开启。
1、环境
软件 delbian11
硬件 n6005
docker环境
安装jellyfin
docker run
-it
-e PUID=1000
-e PGID=1000
-e TZ=Asia/Shanghai
-p 8096:8096
–restart always
–name=“jellyfin”
–device /dev/dri:/dev/dri
-v /usr/share/jellyfin-docker:/config
-v /srv/movie/:/media
nyanmisaka/jellyfin:latest
2、使用non-free源安装驱动
wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | apt-key add -nano /etc/apt/source.listdeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-freedeb [arch=amd64] https://repositories.intel.com/graphics/ubuntu bionic main 存盘退出apt-get update
安装驱动及工具
apt-get install intel-media-va-driver-non-free
apt-get install intel-gpu-tools
apt-get install vainfo
运行 lspci 观察硬件信息
00:00.0 Host bridge: Intel Corporation Device 4e24
00:02.0 VGA compatible controller: Intel Corporation Device 4e71 (rev 01) 这一行 记录下 4e71 录入到下面文件中 (n5105这个地方值不一样)
nano /etc/default/grub
GRUB_CMDLINE_LINUX="... quiet i915.force_probe=4e71"
存盘退出update-grubnano /etc/modprobe.d/i915.conf输入options i915 force_probe=1 enable_guc=2存盘退出reboot
3、升级驱动
安装编译工具
sudo apt-get install -y git make cmake g++ dh-autoreconf pkg-config libncurses5-dev libpthread-stubs0-dev libpciaccess-dev libxvmc-dev xutils-dev libsdl2-dev libxcb-shm0-dev libdrm-dev
下载原文件
链接:https://pan.baidu.com/s/1ntlcWv9gy7WKUir_J4_Muw?pwd=lv16
提取码:lv16
手工将3个压缩包复制到/root目录(步骤略)
安装解压工具
apt-get install unzip
安装libva
cd /root
unzip libva-2.16.0.zip
cd libva-2.16.0
./autogen.sh
make -j12
sudo make installsudo nano ~/.bashrcexport PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH存盘退出source ~/.bashrc
sudo ldconfig
安装gmmlib-intel-gmmlib-22.2.0
cd /root
unzip gmmlib-intel-gmmlib-22.2.0
cd gmmlib-intel-gmmlib-22.2.0/
mkdir build
cd build/
cmake ..
make -j12
sudo make install
sudo ldconfig
安装media-driver-intel-media
cd /root
unzip media-driver-intel-media-22.5.4.zip
cd media-driver-intel-media-22.5.4
mkdir build
cd build/
cmake ..
make -j12
sudo make installsudo nano ~/.bashrc
export LIBVA_DRIVER_NAME=iHD
export LIBVA_DRIVERS_PATH=/usr/local/lib/dri
存盘退出source ~/.bashrc
sudo ldconfig
查看驱动情况是否有错误
vainfo
4、升级guc/huc固件
查看i915内核是否可以使用GUC n6005是可以的,本步可略
sudo modinfo i915 | egrep -i “guc|huc|dmc”
安装固件
sudo apt install firmware-misc-nonfree
查看是否已安装固件文件是否存在
ls -1 /lib/firmware/i915/
重点,手工安装或升级固件
验证i915 模块内核是否正确加载了固件:
journalctl -b -o short-monotonic -k | egrep -i "i915|dmr|dmc|guc|huc"根据提示重新下载所需要的固件
cd /lib/firmware/i915
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/ehl_guc_70.1.1.bin启用gucnano /etc/modprobe.d/i915.conf
options i915 enable_guc_loading=1 enable_guc_submission=1reboot
重启后再次检查固件正确即可
journalctl -b -o short-monotonic -k | egrep -i "i915|dmr|dmc|guc|huc"
登录jellyfin
控制台-播放-硬件加速
选择Intel QuickSync(QSV)
启用所有硬件解码
重点:
启用低电压模式的 Intel H.264 硬件编码器
启用低电压模式的 Intel HEVC 硬件编码器
允许以 HEVC 格式编码
启用色调映射
保存
找部影片播放
shell下验证cpu占用和gpu占用
大概30~40%左右
intel_gpu_top
htop