Open ms178 opened 6 months ago
I think we need to carefully evaluate whether the relevant patch will break other parts. I will carefully review the chromium issue report you mentioned above later and may make some edits.
There is even an AUR package that carries it forword if you want to test it: https://aur.archlinux.org/packages/google-chrome-wayland-vulkan
Robrich also tested it: https://github.com/RobRich999/Chromium_Clang/issues/26#issuecomment-2132485205
Once patched VA-API should be working under Xwayland, too.
https://github.com/RobRich999/Chromium_Clang/issues/26#issuecomment-2134077918
Perhaps X11 as well, though someone else will have to verify it.
For the record, X11 was already working fine with VAAPI before, but native Wayland didn't work at all, even hardware acceleration is completely broken there. Xwayland also works fine for me, but it has some limitations (only software GPU memory buffers) and some users reported problems with that option. There is more discussion in the upstream bug report which I've linked in the top post.
I have not been keeping much track of hardware decoding as I gave up long ago on conjuring the latest CLI incantations to obtain functional VA-API support. ;)
I have submitted a CL to Google, but I don’t know if it will be approved. Google will be more cautious than us about patches that fix hardware acceleration problems on Linux.
https://chromium-review.googlesource.com/c/chromium/src/+/5568860
I've got the patch to land upstream
CL caused Lacros FYI's test suite to fail and has been reverted. I am trying to discuss a solution with the engineers.
CL caused Lacros FYI's test suite to fail and has been reverted. I am trying to discuss a solution with the engineers.
As the upstream discussion stalled, is there a chance for a quick fix? If not, carrying this patch downstream might be an option as the seen issue seems to be a non-issue for people that need to set this variable manually. At least it would provide some value for all Linux/Wayland users right away.
The upstream issue probably won't be fixed quickly enough and looks like some deeper issue. Also, since this patch affects ChromiumOS, I don't know if it will be merged in Thorium.
@Alex313031
it's not a deeper issue at all - Google has been researching a project of turning ChromeOS into a weird zombie mix of real "Linux" DRM/KMS/Wayland and "Android" graphic system components under "Lacros" project. The new Vulkan path had no chance of running with the "Android" graphic system, yet it was still "Linux". There really is nothing more to it, than properly IFDEFing this code path to avoid "Lacros" target so it only targets real "Linux".
I would really appreciate the patch being merged; at the moment there is no working VA-API build anywhere in the internet, except for AUR, which isn't very useful outside Arch.
At present, the upstream blockers seem to have been deleted. I have re-landed the patch into the Chromium code base earlier, hoping that it will not cause other problems. If it causes other problems, I support reverting the patch again.
Chromium 129 re-added the reverted patch, and using the CachyOS v3 hardware video decode works with --use-angle=vulkan.
feature request
Quoting the original description by Niccolò Belli:
"vaapi on amd cards requires --use-angle=vulkan: https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration Since the gl=egl-angle,angle=vulkan GL implementation is not found in allowed implementations you cannot use it on ozone wayland. The necessary support in ozone and ANGLE are present and can be enabled with a one line patch. The angle=vulkan rendering is better on ozone wayland than it is on x11: on xwayland I have major rendering issues in websites like figma which are completely fine on ozone wayland. I can also confirm that vaapi works flawlessly on wayland. The patch is harmless because unless you tune your flags to use --use-angle=vulkan it is disabled by default anyway on both x11 and wayland. Since mesa 24.1 has just been released and it finally enables vaapi video decoding on amd cards this is a good time to merge this. Upstream issue: https://issues.chromium.org/issues/334275637"
Describe the solution you'd like, including relevant patches or source Please incorporate this one line patch: https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/merge_requests/6
Additional Notes Description and patch taken from: https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/merge_requests/6