惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
Recent Commits to openclaw:main
Recent Commits to openclaw:main
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
罗磊的独立博客
V
Visual Studio Blog
爱范儿
爱范儿
H
Help Net Security
J
Java Code Geeks
I
InfoQ
Recent Announcements
Recent Announcements
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Recorded Future
Recorded Future
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
GbyAI
GbyAI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
Scott Helme
Scott Helme
S
SegmentFault 最新的问题
S
Securelist
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
C
Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
博客园_首页
B
Blog
F
Fortinet All Blogs
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
S
Secure Thoughts
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
Schneier on Security
Project Zero
Project Zero
Martin Fowler
Martin Fowler
C
Cybersecurity and Infrastructure Security Agency CISA
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic

Dejavu's Blog

甲骨文 ARM 实例部署 Gemma 4 模型 Headscale + Tailscale 组建虚拟专用网 在 Linux 上使用 Yubikey OpenPGP 应用 BuyVM VPS 块存储挂载教程 Alpine Linux 服务器配置指南 Alpine Linux 安装 Cloudflared Docker 多容器共享中心数据库 安装 Komari 服务器监控工具 Scaleway VPS 安装 Debian Linux Debian 13 下部署 AsmBB 论坛 使用 Kopia 自动化备份服务器数据 给 Docker 启用 IPv6 支持 Netcup 服务器安装自定义 ISO 镜像 烽火 HG5582A 光猫开启桥接模式 Docker 自托管 Shlink 短链服务 部署 Obsidian LiveSync 实时同步服务指南 我的 2025 年不完全回顾 Fedora Linux 安装配置记录 2025 年优雅地自托管 RSS 服务 Woodpecker CI 和 Gitea 实现 Hugo 自动部署 Gitea/Forgejo 集成 Woodpecker CI/CD 在 Blinko 中使用 Ollama 作为 AI 供应商 Docker 部署 Gitea/Forgejo Plausible CE 启用城市级地理位置识别 Blinko 开源 AI 知识库 Docker 部署指南 Netcup 免税账号注册及购买服务器全记录 Docker 自托管 Cloudreve Pro 私有网盘服务 GiffGaff SIM 卡使用体验和注意事项 简体中文互联网在变得糟糕吗? 如何低成本申请 S/MIME 证书用于个人邮件服务 迁移到 NameCrane Mail 域名邮箱套件服务 香烟与咖啡 在 Windows 中使用 Yubikey 的 OpenPGP 应用 Windows 11 IoT LTSC 养老指南 巧用浏览器生成 HAR 文件批量下载所需网页资源 聊聊静态网站的评论系统 在 Hugo 站点中优雅地展示实况照片 使用 snac 部署一个简洁优雅的 ActivityPub 实例 当 25 岁来临的时候 断网的这两年 从 Bitwarden/Vaultwarden 到 KeePassXC 也许是 Android 上最好的本地播放器 - 椒盐音乐 2023 半年小结 写一个好玩的 Hugo 货币汇率转换短代码 写一个 Hugo 短代码将不同类别的总字数统计转换为书名显示 海信 Touch Lite 墨水屏音乐阅读器的简单体验 从 Debian 11(bullseye) 无感升级到 Debian 12(bookworm) 使用 GitHub Actions 自动提交 URL 到 IndexNow 批量重写 Git 历史提交记录 使用 cgit 托管小小的也很可爱的 Git 服务器 在 Debian 上使用 stagit 和 Nginx 的简单 Git 服务器 托管简单 Git 服务器的一些尝试 使用 stagit 自托管纯静态 Git 存储库 使用 Docker 快速部署单人 Fediverse 实例 我是如何建立自己的个人博客的? 简单、隐私友好的谷歌分析替代品,Plausible 自托管部署指南 服务器使用 Cloudflare CDN 的最佳实践 甲骨文服务器分配并启用 IPv6 地址 Git 版本控制学习笔记(二) Cloudflare WAF 防护策略简易指南 Mastodon 服务器批量导入自定义表情 低成本自托管 Mastodon 实例简明指南 自托管服务指南──有了服务器可以做什么? 使用 Miniflux + RSSHub 打造个人 RSS 阅读器 构建支持多种 CPU 架构的 Docker 镜像 一个可自托管的静态短链接应用 别了,二〇二二! Duplicacy CLI 进阶使用指南 Duplicacy CLI 备份工具的基本使用 初探 Cloudflare 零信任 - 通过 Docker 部署 Bitwarden 密码管理器 Yubikey 转运日志及上手指南 初探 Cloudflare 零信任 — 通过 Cloudflare Tunnel 搭建 SSH 聊天室 初探 Cloudflare 零信任 - 通过 Cloudflare Tunnel 访问服务 某科学的 PGP 算号指南 2022 年的 MacBook Air M1 使用体验及应用推荐 使用 Vercel 和 Supabase 自托管 Cusdis 评论系统 为什么你的搜索引擎不好用? 个人在 Windows 上常用软件清单 macOS 基础开发环境设置指南 在 macOS 上使用 Canokey 的 OpenPGP 应用 提取 Windows UWP 应用商店的安装包以供离线安装 Git 版本控制学习笔记(一) 使用 Notion 管理 GitHub Star 项目 使用 Vercel 免费部署 Giscus 评论系统 将博客评论从 Utterances 无缝迁移到 Giscus Canokey 签名和认证应用指南 Canokey 的基本使用指南 Canokey Pigeon 揽件日志及简单开箱 关于 Google Play 保护机制和 DRM 安全等级的那些事 记录一次捡垃圾装机 GitHub 使用 GPG 密钥提交签名认证 使用 Scoop 管理 Windows 下的软件和开发环境 Windows Terminal+PowerShell 7 打造 Windows 下最好用的终端 一个好用的 Telegram 文件批量上传/下载工具 Clash for Windows 优雅地使用 TUN 模式接管系统流量 全平台搭建 Hexo 静态博客指南 尝试将 Manjaro 作为主力操作系统使用 Hexo 进行 SEO 优化的基本指南 使用本地代理给 Git 和 NPM 加速 使用 flowerss 部署 Telegram RSS 订阅机器人
Linux 下 Intel 核显驱动配置与硬件加速
Dejavu Moe · 2025-12-15 · via Dejavu's Blog

免责声明

本文记录本人在 Fedora Workstation 43 上折腾 Intel Arc 130T/140T 系列核显,所有步骤在我本机上测试有效(目前还没炸机),不对准确性和可靠性做保证。

万一出现电脑花屏、驱动罢工、浏览器崩溃,或者(更坏的情况)电脑冒烟、风扇起飞、显卡瘫痪、地球爆炸——那可真对不住了,本人概不负责硬件维修费、精神损失费。

配置有风险,折腾需谨慎。备份好系统、准备好 LiveCD,在电脑前双手合十默念三次「玩得开心,显卡别生气」。然后,我们开始吧!

以下操作均不影响 Fedora Workstation 的 UEFI 安全启动, 这一点可以放心

先决条件

参考 Fedora 文档 ,在 Fedora 上启用 free 和 non-free 的 RPMFusion 存储库。

安装所需解码器

sudo dnf group install multimedia
sudo dnf install intel-media-driver \
                 libva libva-utils \
                 libavcodec-freeworld \
                 gstreamer1-vaapi \
                 ffmpeg \
                 igt-gpu-tools \
                 mesa-dri-drivers \
                 mesa-vulkan-drivers-freeworld \
                 linux-firmware \
                 mpv \
                 --allowerasing

编辑环境变量

# ~/.bashrc or ~/.zrhrc
# iGPU settings
export LIBVA_DRIVER_NAME=iHD
export ANV_DEBUG=video-decode,video-encode
# for Firefox
export MOZ_DISABLE_RDD_SANDBOX=1

设置 GNOME 桌面强制启用硬件加速

gsettings set org.gnome.Epiphany.web:/ hardware-acceleration-policy 'always'

OpenCL 加速

darktable 是一款强大、跨平台、支持 RAW 处理的开源图像处理工具,它能使用 OpenCL 进行加速计算。

对于 Intel ARC 系列核显或独显,使用 intel-compute-runtime 即可提供所需的加速库;而对于老款 Core 或 Xeon 系列,则使用 intel-opencl-runtime。对于其他显卡或硬件组成,Arch Wiki 里的「基于 GPU 的通用计算」部分提供了详细、准确的说明和解释。

以 ARC 140T 核显为例,安装 intel-compute-runtime 即可:

sudo dnf install intel-compute-runtime clinfo

首次启动 darktable 会自动检测并构建 OpenCL 加速库

darktable.webp

以后使用 darktable 进行 RAW 图像处理,可以获得较为显著的加速效果

opencl.webp

NPU 加速

该步骤适用于 Intel 系列带 NPU 的处理器设备,检查 NPU 设备是否正确识别

示例输出结果如下

crw-rw-rw- 1 root render 261, 0 Dec 24 18:13 /dev/accel/accel0

安装 Intel 相关加速库

sudo dnf install intel-compute-runtime \
         intel-vpl-gpu-rt \
         openvino \
         openvino-plugins

赋予当前用户可访问 NPU 设备的权限

sudo usermod -aG render $USER
sudo usermod -aG video $USER

NPU 硬件加速是实现高效 WebNN 推理的关键,但受限于 Linux 下 Chrome/Chromium 官方构建版未编译 OpenVINO 后端支持,导致该特性目前处于不可用状态。

这种局限性并不意味着相关驱动库毫无用处。它们依然是本地 LLM 环境和 Intel OpenVINO 架构的核心组件。即便当前适配的模型有限,这种底层准备也为未来浏览器实现 AI 硬件协同提供了技术可能性。

修改内核参数

查看显示设备的硬件 ID

示例输出如下,这个 7d51 是我的设备 ID

00:02.0 VGA compatible controller [0300]: Intel Corporation Arrow Lake-P [Arc Pro 130T/140T] [8086:7d51] (rev 03)

编辑 grub2 启动参数

sudo vim /etc/default/grub

强制禁用 i915 驱动并启用 Xe 显卡驱动,在 GRUB_CMDLINE_LINUX 里添加:

# 建议移除参数 rhgb 以解决当前潜在的 DRM 内存泄露问题
i915.force_probe=!7d51 xe.force_probe=7d51

启用帧缓冲压缩 (FBC)

echo "options xe enable_fbc=1" | sudo tee /etc/modprobe.d/xe.conf

更新引导

sudo dracut -f --regenerate-all
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

重启系统

检查信息

检查驱动加载

确认正在使用的为 Xe 驱动

00:02.0 VGA compatible controller: Intel Corporation Arrow Lake-P [Arc Pro 130T/140T] (rev 03)
	Subsystem: Lenovo Device 384d
	Kernel driver in use: xe
	Kernel modules: i915, xe

检查内核模块加载

查看 Intel Xe 驱动模块和 Intel Guc/Huc 固件是否正常加载

sudo dmesg | grep -i -e 'xe' -e 'guc' -e 'huc'

帧缓冲压缩 (FBC),预期输出为 1

sudo cat /sys/module/xe/parameters/enable_fbc

检查 VA-API

~ vainfo
Trying display: wayland
libva info: VA-API version 1.22.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib64/dri-nonfree/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 25.3.4 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointEncSlice
      VAProfileVP9Profile1            :	VAEntrypointVLD
      VAProfileVP9Profile1            :	VAEntrypointEncSlice
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointEncSlice
      VAProfileVP9Profile3            :	VAEntrypointVLD
      VAProfileVP9Profile3            :	VAEntrypointEncSlice
      VAProfileHEVCMain12             :	VAEntrypointVLD
      VAProfileHEVCMain422_10         :	VAEntrypointVLD
      VAProfileHEVCMain422_12         :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointEncSlice
      VAProfileHEVCMain444_10         :	VAEntrypointVLD
      VAProfileHEVCMain444_10         :	VAEntrypointEncSlice
      VAProfileHEVCMain444_12         :	VAEntrypointVLD
      VAProfileHEVCSccMain            :	VAEntrypointVLD
      VAProfileHEVCSccMain            :	VAEntrypointEncSlice
      VAProfileHEVCSccMain10          :	VAEntrypointVLD
      VAProfileHEVCSccMain10          :	VAEntrypointEncSlice
      VAProfileHEVCSccMain444         :	VAEntrypointVLD
      VAProfileHEVCSccMain444         :	VAEntrypointEncSlice
      VAProfileAV1Profile0            :	VAEntrypointVLD
      VAProfileAV1Profile0            :	VAEntrypointEncSlice
      VAProfileHEVCSccMain444_10      :	VAEntrypointVLD
      VAProfileHEVCSccMain444_10      :	VAEntrypointEncSlice

OpenGL 测试

使用 GLXGEARS 测试 2D/3D 下的 OpenGL 性能

可以看到旋转的齿轮,输出帧率应该稳定在实际屏幕刷新率附近

glxgears.webp

Vulkan 测试

使用 VKCube 测试 Vulkan,会看到一个高速旋转的立方体

vkcube.webp

查看显卡信息

nvtop 是一款支持 Intel、AMD、NVIDIA、Apple、Huawei、Qualcomm 等 GPU 硬件加速情况的监视工具。

使用 nvtop 命令查看:

nvtop.webp

安装 OBS Studio

直接从 Fedora 软件源安装 OBS Studio 及相关插件,在 高级设置 里应当可以正常启用硬件加速所用编码器。

sudo dnf install obs-studio \
   obs-studio-plugin-browser \
   obs-studio-plugin-vaapi \
   obs-studio-plugin-vkcapture \
   obs-studio-plugin-vkcapture-hook-libs \
   obs-studio-plugin-x264
# 第一次启动提示以下插件错误
# 可卸载手机虚拟摄像头插件
sudo dnf remove obs-studio-plugin-droidcam

浏览器配置

Mozilla Firefox

访问 about:config,确保:

  • gfx.webrender.all 已启用
  • media.ffmpeg.vaapi.enabled 已启用
  • layers.acceleration.force-enabled 已启用

Firefox 在 Wayland 下对 VAAPI 的支持很好,应该是开箱即用的。

Google Chrome

对于 RPM 安装的 Google Chrome,确认 GPU 渲染器 ID

ls -l /dev/dri/
total 0
drwxr-xr-x  2 root root         80 Dec 21 10:05 by-path
crw-rw----+ 1 root video  226,   1 Dec 24 13:42 card1
crw-rw-rw-  1 root render 226, 128 Dec 21 10:05 renderD128 <--this

编辑 Chrome 的启动参数

cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/
# 定义启动参数
CHROME_FLAGS="--ozone-platform=wayland --ignore-gpu-blocklist --enable-zero-copy --enable-unsafe-webgpu --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiIgnoreDriverChecks,AcceleratedVideoEncoder --disable-features=Vulkan"
# 修改
sed -i "s|^Exec=/usr/bin/google-chrome-stable|Exec=env LIBVA_DRIVER_NAME=iHD /usr/bin/google-chrome-stable $CHROME_FLAGS|g" ~/.local/share/applications/google-chrome.desktop

重启 Chrome,访问 chrome://gpu/,现在看起来大概这样:

Graphics Feature Status
=======================
*   Canvas: Hardware accelerated
*   Direct Rendering Display Compositor: Disabled
*   Compositing: Hardware accelerated
*   Multiple Raster Threads: Enabled
*   OpenGL: Enabled
*   Rasterization: Hardware accelerated
*   Raw Draw: Disabled
*   Skia Graphite: Disabled
*   TreesInViz: Disabled
*   Video Decode: Hardware accelerated
*   Video Encode: Hardware accelerated
*   Vulkan: Enabled
*   WebGL: Hardware accelerated
*   WebGPU: Hardware accelerated
*   WebGPU interop: Hardware accelerated
*   WebNN: Disabled

通过社区的一些反馈,上面的这个信息并不具有太多参考意义,在 B 站或 YouTube 随便播放一个视频,分别尝试 HEVC、AV1、H.264 等不同的播放策略。

打开开发者工具切换到 Media 选项卡(或访问 chrome://media-internals/),检查视频是否启用 VAAPI 解码器,预期效果应该像这样:

check-decode.webp

参考资料