首先电脑配置

CPU: Intel i5-9300H (8) @ 4.100GHz

GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q

系统:

内核版本:5.16.0-arch1-1(64位)

图形平台:X11

KDE Plasma版本:5.23.5

软件:

显卡驱动为nvidia私有驱动,版本为495.46

chrome版本:97.0.4692

1、安装 libva-vdpau-driver-vp9-git

yay -S libva-vdpau-driver-vp9-git

2、在chrome地址栏中输入chrome://flags/ 找到ignore-gpu-blocklistHardware decode acceleration for k-SVC VP9,均设置为Enabled

android gradle开硬件加速 chrome gpu硬件加速_ide

android gradle开硬件加速 chrome gpu硬件加速_ide_02

chrome设置里找到高级->系统->使用硬件加速,将选项打开

3、终端中输入google-chrome-stable --use-gl=desktop --enable-features=VaapiVideoDecoder启动chrome,在地址栏中输入chrome://gpu

android gradle开硬件加速 chrome gpu硬件加速_chrome_03

可以看到视频解码已经在使用硬件加速

打开油管看一下

android gradle开硬件加速 chrome gpu硬件加速_chrome_04

播放4k视频时硬件加速已经启用

每次打开浏览器使用终端比较麻烦,使用kde的可以将desktop文件从/usr/share/applications 复制到~/.local/share/applications,并将启动命令修改为Exec=/usr/bin/google-chrome-stable -use-gl=desktop --enable-features=VaapiVideoDecoder %U这样更新后就不会被覆盖

chrome98之后还需在启动时添加--disable-features=UseChromeOSDirectVideoDecoder