-
Notifications
You must be signed in to change notification settings - Fork 347
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
[Bug]: Firefox/Netflix/Fedora 37 doesn't use video acceleration #1574
Comments
On which HW this is on? |
Lenovo P51 with Optimus. The Intel part is
|
Optimus part sounds suspicious. Maybe those applications are just using the wrong video driver, or maybe Fusion package is disabling support for whatever codec Netflix tries to use in browser? I think you should file this bug against Fedora, and its Firefox (or Fusion driver) package. |
Looking at the logs they are both using vp9 and both going through the same vaapi interface, which is why I raised it here. Is there a way to trace what input the media-driver is getting? To raise the bug elsewhere I'd need some sort of evidence to show that media-driver is being driven differently (ie incorrectly) in one case or the other. |
I'm not involved with media-driver development, but maybe @dvrogozh could help? |
LIBVA_TRACE could help to dump the input of media_driver. you could use this env variable. |
I think that's what I used above, but I can see its not clear. When I get a chance I'll go again with a trace from youtube and a trace from netflix. |
Trace output appears the same when I try netflix or youtube - does the example in the description look like the full trace data to you or am I missing some output somewhere? |
if you want more logs in media driver and from the log you attached: it just create one H264 decode config, nothing valuable. it is why I want full LIBVA log. because there are some negotiation process, and also real context creation. |
In general "application A does not use video acceleration for codec X in distro Y", should be filed against corresponding distro and app, and it can depend on what config options you have enabled in the app. Can you link those tickets? PS. As to video acceleration itself and how it shows in |
@eero-t this take is completely wrong, please let the following be a lesson. Distros are relatively minor configurations to the underlying foundation of what is often the Linux kernel + systemd, the applications running on top aside from versions are the same across distributions. There are of course several exceptions/gotchas in this simplified view; moreover, those don't matter when it comes to the browser applications. In this case Librewolf and chromium will not use the Intel GPU decoder on several occasions even with the right drivers installed! One of these occasions hit me, and I managed to solve it (sorry for not updating earlier). If you are on Intel Arc, check this out for firefox -> librewolf. To say that I should refer to my distribution forum assumes that those that created the distro didn't install the necessary drivers, and it is, in my eyes, a very lazy comment. This is an Intel issue. |
There can be many reasons why app is not actually using the HW driver. Browsers are known to (occasionally) toggle support for different HW drivers from version to version [1], distros are known to (rarely) disable codecs in the driver, users can (sometimes) have stale configs that disable HW support [1], browsers can be sandboxed so that video device usage is prohibited (#1376 (comment)), env vars specifying the correct driver might not get through to these sandboxes etc. Do you have some evidence that the application is trying to use Intel media driver, i.e. that your issue is related to this project? (As your comment did not have that info, and did not list versions for of any of the related components, I was hoping that you could provide a link to something providing those.) Then, more importantly, you would need to provide information on what exactly that application is requesting from the media driver, in that specific use-case. So that driver developers (i.e. not me) can actually look into it, try reproduce the issue etc. A minimal test-case may also be needed, if issue cannot be replicated with an actual media CLI tool like FFmpeg. Not just to debug the issue, but to validate the fix before adding it to driver. That can be quite a bit of work, so most users are "too lazy" to provide all these required details of what actually is failing. That's why it can often be better for users to file bugs / comment on application/distro bug trackers, so that their developers who actually know the required details, can file the driver bugs, and link them back to app bug(s). EDIT: added minor clarifications + fine-tuned the text for readability. [1] Brave seems to be Chromium based: https://en.wikipedia.org/wiki/Brave_(web_browser) On quick look, Chromium has several flags affecting HW decoding support:
And more flags affecting video encoding support. See: chrome://flags/ |
While it's nice for media-driver Wiki to document how to enforce applications to use HW acceleration, I don't think that's the place where most users would search for it. IMHO application options should be primarily documented in application's own documentation and / or distros offering them. As you mentioned using Arch Linux, I checked its docs on browsers: https://wiki.archlinux.org/title/Category:Web_browser It does not list Brave, but as Brave is Chromium based, I guess this can be used: https://wiki.archlinux.org/title/Chromium Which states that "By default Chromium on Linux does not use any GPU acceleration". |
╰─λ brave --disable-gpu-driver-bug-workarounds --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder
[745146:745146:0703/211052.442748:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
[745185:745185:0703/211057.868511:ERROR:vaapi_wrapper.cc(2827)] vaPutSurface failed, VA error: invalid parameter
[745185:745185:0703/211057.868687:ERROR:vaapi_video_decode_accelerator.cc(287)] Failed putting surface into pixmap
When I run videos on VLC and ffmpeg, it uses the video decoder ASIC. I am not going to prove that here, it should be a given when I post my issue. And I should be ridiculed if someone asks me, and I check and see it not working. To @eero-t:
This has nothing to do with the problem.
These flags don't work on Intel Arc, at least on my A770 16 Gb, and a bunch of other people in the community (reproduced three times so far). This is a bug on the Intel Arc side because the driver throws errors, or you could put the blame on chromium s the driver does say
I don't need to do anything especially not what you think I should be doing.
That is your self-righteous opinion, and while some do share it, I don't. I must point out the fact that you are not only defending your initial post by building on previous arguments, but rather choosing to pivot to newer arguments, I have stooped to your level of auto-ego-boosting by replying to each question. For me it stops here, good luck. UwU. UwU. |
That is from Chromium: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/media/gpu/vaapi/ Intel media driver does not have files named as such. I.e. above tells just that Chromium failed to use VA-API. Even if the error came up from Intel media driver, it just tells that Chromium used it wrong, which seems more like Browser than driver issue.
I had assumed you had working drivers below Chromium, but it's good to get confirmation.
I do not know why you thought so. I just stated that you did not provide enough information. (I tend to be to quite verbose / detailed, but that happens with everybody. My manager complains about it.)
It would be nice if you could file bug(s) about that to Chromium project (and add links here).
Media driver / HW supports only specific codecs, formats etc: https://github.com/intel/media-driver/blob/master/docs/media_features.md I would assume VA-API to have query functions for what is supported. I.e. Chromium should either use the supported formats (preferred), convert the formats itself, or use SW fallbacks. While media driver may be able to support additional image formats with (compute) shaders, the format specifics need to be identified first, and Browser needs to first verify that such usage is not a bug on their side. (Just one Browser variant using some specific format just raises question why other Browser variants work fine without it.) If you'd rather like to debug and provide those details yourself, instead of filing bug against Chromium, comment above has info on how to trace what apps request from the media driver. PS. This bug was (originally) about Firefox on Fedora (which disables some things in drivers). Your issue is about Chromium/Arch issues. Separate bug report would have been better. :-/ |
(fedora/rpmfusion libva/media-driver maintainer speaking) For firefox, there is a dedicated page and some options might be needed (disabling sandboxing was needed some time ago) Of course, testing that "mpv -hwdec" works is a preliminary step before looking at the browser support. Also there might be case were the backend are not properly discovered (DRI3 with Xwayland on browsers) ? |
Which component impacted?
Decode
Is it regression? Good in old configuration?
This is a new configuration so I couldn't say
What happened?
intel_gpu_top
and see video acceleration in useintel_gpu_top
and see no video acceleration in useRaising here because it looks right in the firefox logs - both sites seem to successfully initialise the va-api decoder.
youtube:
netflix:
What's the usage scenario when you are seeing the problem?
Playback, Web browser
What impacted?
Video acceleration
Debug Information
With trace - output for trying youtube or netflix is exactly the same:
Do you want to contribute a patch to fix the issue?
If I knew what I was doing I'd be happy to but I expect its beyond my knowledge :)
The text was updated successfully, but these errors were encountered: