-
Notifications
You must be signed in to change notification settings - Fork 304
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
2.17 brakes hardware video decoding in Chromium #677
Comments
There will be a difference in the output of vainfo in my environment. If ef1df02 is enabled, "libva error: /usr/lib/dri/iHD_drv_video.so init failed" will be displayed in the following way.
If ef1df02 is disabled, "libva error: /usr/lib/dri/iHD_drv_video.so init failed" will not be displayed in the following way.
|
Same issue on ArchLinux , tested with Chromium and Google Chrome. |
I can confirm the issue on Arch Linux with TGL Intel iGPU. Reverting the commit all works fine in Chrome/chromium (anyway vainfo has no errors with or without the commit) |
Vivaldi outputs these error messages whenever I try to play any video.
These errors don't show up if I recompile libva with changes to |
For me on Endeavour OS(based on arch anyway) same happens, building package without mentioned commit makes hw video decode working again with chromium based browsers(tested chrome) |
Same for Manjaro, tested on Google Chrome, Yandex Browser and Chromium. |
Alpine Linux v3.17.1 also has the same problem in Chromium, but not in Firefox. So the problem may not be Linux distribution specific, but web browser specific. |
Also might be related https://bugs.chromium.org/p/chromium/issues/detail?id=1399897 |
Wonder why I don't his this issue with neither Firefox nor Chromium on my Arch box. Both Does chromium work without any flags (be that command line or chromium-flags.conf)? Does disabling the sandbox help? I would be unlikely but worth a shot. |
@mtak-misc if you can do some tracing what exactly causes the iHD driver to fail, that would be greatly appreciated. You might need to either a) start a debugger or b) add some My gut feeling is that the driver isn't gracefully falling back to DRI2... Considering the iHD complexity, I'll be better if @dvrogozh @XinfengZhang or anyone in the Intel team fix that. Will also test the old i965 driver tomorrow + open a PR if needed - bear in mind that getting MRs to land in there is like pulling teeth 😅 |
Based on a quick look - this seems to be a bug in iHD, since it doesn't handle DRI3. It could be fixed by reworking the DeviceName handling although that's quite a lot of work - should have a PR by the end of the week. |
This bug doesn't affect only Chromium and iHD driver. I tested Xine player on CherryView (i965) and it also fails to decode when launched with |
@tmn505 off the top of my head - does Xine use Edit: Should have looked at the linked bug I guess - yes it does. Xine should probably migrate to using |
I think yes, since grepping the code mentions it:
I would need to try xine verbose logging to be sure (don't know if that'll actually say something), can't do it right now will do that tomorrow. |
vaPutSurface is used to copy surfaces to x11, there should be different implementation for DRI2 and DRI3. but obviously, media_driver now just support DRI2. |
@evelikov to follow-up on yesterdays request here's the log from xine with verbose output: Also to clear small misunderstanding, the project I linked in this issue is unrelated to Xine in any way. First I spotted the issue with lack of video output in ua0lnj/vdr-plugin-softhddevice (it uses ffmpeg), the to test out if it occurs elsewhere, I took Xine player (for simplicity of test case). |
@XinfengZhang looks like a driver specific hack, but doable - will open a PR tomorrow. The more important question is how long will it take to release fixed iHD and i965 drivers which honours that logic. The issues and PR section of latter look like a graveyard 😢 |
@evelikov , thanks , actually, I dont like vaPutSurfaces, I like to retrieve surface fd by vaExportSurfaceHandle, then import to display ... |
@XinfengZhang your suggestion doesn't quite work - so I suggest merging #679 and rolling 2.17.1 ASAP. In particular: your suggestion boils down to the driver __init function error-ing out. Thus libva frontend falling back to DRI2. That is currently not possible with libva due to the way DRI2/DRI3 initialisation is handled and driver names are retrieved. When __init fails for a given driver (name), we try another one, we do not re-check for DRi2. I have a WIP to fix that, but it's a lot of code churn and not something suitable for a bugfix release. |
yeah works here, just i messed up and i set env flag in wrong file... meh |
We've done all we can on libva side. I would suggest opening a bug with the problematic driver(s) and helping the devs add DRI3 support. |
I can confirm it works with |
@evelikov , maybe, we should try DRI2 firstly, then DRI3, it will resolve such problem. |
i might be able to help if you can tell me what you want done. my setup; Graphics: VAAPI works alright in stock state in media players, but fails in chrome with errors; resumes functionality in chrome, after setting ENV LIBVA_DRI3_DISABLE=1 (since libva 2.18) |
@koshikas you want to prod the Intel developers to add DRI3 support to the driver. Which seem borderline abandoned ... even trivial fixes are waiting for months with zero feedback |
@XinfengZhang you really do not want to do that for DRI3 capable devices. |
from this perspective, trying DRI2 firstly could cover both senario. |
I'm experiencing similar problems with xine using libva2 (2.14.0-1, Ubuntu Jammy) and iHD 22.3.1 drivers. Do I understand this right:
Or would my problem persist in libva2 >= 2.18 since the iHD driver with missing vaPutSurface() support is the actual reason for the problem? |
these two is correct. also, it could be fixed by #716 , and #716 (comment) for 2.18 |
Why isn't there an analog function like dri2CreateDrawable for dri3? How can it be implemented? |
libva 2.17 breaks hw video decode with or without vulkan on Chromium
See https://bbs.archlinux.org/viewtopic.php?pid=2080054#p2080054
Accoring to author this commit broke it: ef1df02
The text was updated successfully, but these errors were encountered: