-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable vaapi support #4039
Enable vaapi support #4039
Conversation
Partially fixes #1024 By default browser will blacklist all drivers on linux for vaapi decoding. To enable it , need to pass `--ignore-gpu-blacklist` in order to get it working since libva has problems atm with intel GPUs. I am hoping that it will be fixed in the future versions. There are a lot of activities in upstream in this. Only adding this support on 64 bit build at the moment. Test case: Run brave with ignore-gpu-blacklist flag and see if the video is playing or not Based on this upstream [commit](chromium/chromium@31225b9) Need to add libva 2.4 as a build and runtime dependency.
Hey, I'm maintainer of UPDATE: I think I understand it now, instead of having to patch sources all that needs to be done is to pass |
@maximbaz Hello! This is my patch from Fedora but no because few intel devices are having problem with vaapi. I opened this PR but not getting enough time to work on it. Also there is #305. It would be helpful if you try it for me. (maybe opening a github repo that I can see and contribute?) :) An arch linux PKGBUILD will be enough. |
I have eventually managed to compile Brave binary from your PR in a very weird way, but I can confirm that Brave that is based on Chromium 74 + your patch + Chromium 75 has introduced a regression that broke VA-API for both VP9 and H264 on my Intel machine. I would really really love to see this PR merged and #305 fixed, so I can add Brave to the official repositories of Arch Linux. Hopefully Chromium/Intel fixes their regression as well. |
@maximbaz Thank you so much for testing!!!! |
@akarshanbiswas so the patch you shared on Arch forums helped fixing VA-API on Nvidia and Intel in the latest Chromium (once again thanks for that!), how do we go and include that patch in Brave, do you know? I'm not very familiar with the codebase yet, but it seems we would need to patch |
@maximbaz I will try to contact upstream instead. Meanwhile we should move this conversation on the intel vaapi driver issue that you've mentioned to let other know of this. |
While contacting upstream is definitely a correct course of action, as a packager I'm considering what it would take to maintain Brave with VA-API support, comparing to Chromium with VA-API. Suppose #305 is fixed, my build steps are just the 3 commands below, and I have a chromium patch to apply - how difficult would that be to do, do you know?
|
@maximbaz Please create a repo and add me as a maintainer. Let me see what I can do. For now please keep this thread clean. Brave uses npm as a build system. I'm not very good at it. The patch which I shared need to be added to brave core if I am not wrong. I need to study it first. |
@akarshanbiswas @maximbaz Will this PR work without the chromium vaapi patch at https://aur.archlinux.org/cgit/aur.git/tree/chromium-vaapi-fix.patch?h=brave? |
With this PR the browser will compile successfully, and if started with there is a benefit of merging this PR even without that chromium patch, if that's what you are asking 😉 remember that if users don't provide |
@cg505 Yes. The normal behavior will be the same as the current release build of brave. Nvidia GPUs doesn't support VPP, and some Intel drivers has issues with specially few skylake and others. This is the same reason I am not enabling(removing the blacklist) it by default. The upstream is pretty active in fixing build errors with vaapi on Linux. |
Awesome, I was able to verify that this works for me. |
@akarshanbiswas can you give this PR a rebase? This should kick off our continuous integration for Linux, which compiles + runs tests |
@bsclifton Sure 👍 |
@bsclifton Rebased to latest changes from master branch. It needs to get reviewed. |
ugh forgot CI doesn't run on forks 😓 Going to approve because @cg505 did test this out and it worked for him |
Partially fixes #1024
By default browser will blacklist all drivers on linux for vaapi decoding.
To enable it , need to pass
--ignore-gpu-blacklist
in order to get it working since libva has problems atm with intel GPUs. I am hoping that it will be fixed in the future versions. There are a lot of activities in upstream in this.Only adding this support on 64 bit build at the moment.
Based on this upstream commit: chromium/chromium@31225b9
Need to add libva 2.4 as a build and runtime dependency.
Test Plan:
--ignore-gpu-blacklist
flag and see if the video is playing with hardware decoders or not. ( video needs to be supported by hardware)Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests && npm run test-security
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Reviewer Checklist: