nvidia-vaapi-driver icon indicating copy to clipboard operation
nvidia-vaapi-driver copied to clipboard

Chrome Support

Open luigifcruz opened this issue 3 years ago • 225 comments

Does this library support Chrome? If not, what would take to add support?

Awesome library. Looking forward to testing it. I'm happy to contribute!

luigifcruz avatar Jan 04 '22 16:01 luigifcruz

I haven't tried it with Chrome yet, I wasn't aware that VA-API support had been added, or is it a patched version?

It shouldn't be too hard to add support, it's unlikely to do anything drastically different from Firefox.

elFarto avatar Jan 04 '22 16:01 elFarto

Running with --enable-features=UseVaapiDecoder prints the following errors:

[419021:419021:0104/124417.354326:ERROR:vaapi_wrapper.cc(1070)] : FillProfileInfo_Locked failed for va_profile VAProfileH264Main and entrypoint VAEntrypointVLD
[419021:419021:0104/124417.356714:ERROR:vaapi_wrapper.cc(1070)] : FillProfileInfo_Locked failed for va_profile VAProfileH264High and entrypoint VAEntrypointVLD
[419021:419021:0104/124417.358761:ERROR:vaapi_wrapper.cc(1070)] : FillProfileInfo_Locked failed for va_profile VAProfileH264ConstrainedBaseline and entrypoint VAEntrypointVLD
[419021:419021:0104/124417.360671:ERROR:vaapi_wrapper.cc(1070)] : FillProfileInfo_Locked failed for va_profile VAProfileVP8Version0_3 and entrypoint VAEntrypointVLD
[419021:419021:0104/124417.362997:ERROR:vaapi_wrapper.cc(1070)] : FillProfileInfo_Locked failed for va_profile VAProfileVP9Profile0 and entrypoint VAEntrypointVLD

hf29h8sh321 avatar Jan 04 '22 17:01 hf29h8sh321

@elFarto I think it's a flag that needs to be enabled on compile time. But I think most distributions have it enabled. Not sure how well it works with the new Ozone layer.

luigifcruz avatar Jan 04 '22 18:01 luigifcruz

Getting the same errors as @hf29h8sh321 in Brave, which has VA-API enabled by default in their Linux builds.

Would love Chromium-based browser support here as well. Thanks!

urbenlegend avatar Jan 04 '22 19:01 urbenlegend

Anyone have any idea where a change would have to be made for this to work? Looks like the error is logged from chromium itself, but I suspect the issue lies within some part of vaapi not bring implemented in this lib. I will do some digging on this when I get some time and would appreciate any pointers anyone may have.

robsterooni avatar Jan 04 '22 20:01 robsterooni

I'm focusing more on getting the library working well under Firefox, so this isn't a high priority at the moment.

The first thing to look at is where the FillProfileInfo_Locked message is logged, and see what it's looking for from the VA-API implementation. Once you can see why it's failing (likely a missing attribute, or function not implemented) we can look about fixing that.

elFarto avatar Jan 04 '22 21:01 elFarto

Cool, thanks, I will start there once I have repro-d the errors logged in this issue. TBH i am hoping its just incorrect chromium flags as they are a mess and constantly changing. Congrats on the first release of this btw - its a potential game changer until Vulkan saves us all.

robsterooni avatar Jan 04 '22 21:01 robsterooni

The first thing to look at is where the FillProfileInfo_Locked message is logged, and see what it's looking for from the VA-API implementation. Once you can see why it's failing (likely a missing attribute, or function not implemented) we can look about fixing that.

Looks like the problem is with https://github.com/elFarto/nvidia-vaapi-driver/blob/5ddf7cadad170813ad6a4b17457020b4a3173d3a/src/vabackend.c#L452 chromium looks for VAConfigAttribRTFormat attribute here and right now it doesn't return such attributes

you can bypass this by hard coding values (very hacky)

attrib_list->type == VAConfigAttribRTFormat;
attrib_list->value = VA_RT_FORMAT_YUV420;
*num_attribs = 1;

moreover vaCreateContext will fail because chrome doesn't pass VASurfaceIDs to vaCreateContext. Also chromium uses vaPutSurface which is not implemented.

helloer avatar Jan 04 '22 22:01 helloer

If chromium (Note that Google never build Chrome with vaapi support) is still using vaPutSurface in their X11 backend, then that makes everything slow anyway. It's probably not hard to implement, but it's also not zero-copy. The wayland backend must be using dma-buf passing if it's not going a CPU copy.

philipl avatar Jan 04 '22 22:01 philipl

chrome support would be cool for playing stadia in 4k

puyoxyz avatar Jan 05 '22 05:01 puyoxyz

Ok, the missing attribute is simple to fix, the surface IDs not being passed in is a bit more problematic, and the use of vaPutSurface is just weird.

I think we can work around the surface IDs not being passed in, as we don't really need them, they're just assigned a picture number to be used later. This could be move to a dynamic allocation. We would then just need to come up with some reasonable defaults for the missing ulNumDecodeSurfaces and ulNumOutputSurfaces fields, which shouldn't be too hard (I already had a note to look at that anyway).

vaPutSurface is going to be hard to get working if they're using it. vaPutImage is also difficult to work around. As noted above we don't really have any surfaces, they're all managed for us, so to 'put' something into a surface is not an action we can do. We could try stubbing those methods to return successful but not actually do anything and see what that breaks.

I noticed that their DMA-BUF export code seems to throw away the DRM modifiers, and that's a blocker. The NVIDIA driver requires they be passed into the import method (it's the same thing I've fixed in Firefox and MPV).

I also noticed some protected playback stuff, that's almost certainly never going to work, hopefully it doesn't use that by default.

elFarto avatar Jan 05 '22 08:01 elFarto

Looks like vaPutSurface will not be used when you start chromium with --use-gl=egl but there is another problem - chromium uses VAProfileNone with VAEntrypointVideoProc as entrypoint which is currently not supported by the driver.

helloer avatar Jan 05 '22 11:01 helloer

I've made a couple of changes to the library to try and support Chrome better, but I'm not having much luck testing it. Chrome gives me a weird EGL error when I try and start it. You'll likely need to use NVD_LOG=filename as it stdout doesn't get displayed.

elFarto avatar Jan 24 '22 20:01 elFarto

[36080-36080] ../src/export-buf.c: 141          findCudaDisplay Found 3 EGL devices
[36080-36080] ../src/export-buf.c: 145          findCudaDisplay Got EGL_CUDA_DEVICE_NV value '0' from device 0
[36080-36080] ../src/export-buf.c: 157          findCudaDisplay Checking device file: /dev/dri/renderD128
[36080-36080] ../src/export-buf.c: 164          findCudaDisplay Got DRM_IOCTL_GET_CAP ioctl response: 0 1
[36080-36080] ../src/export-buf.c: 204             initExporter Got EGLDisplay from CUDA device
[36080-36080] ../src/export-buf.c: 102                reconnect Reconnecting to stream
[36080-36080] ../src/vabackend.c: 446           nvCreateConfig got profile: 7 with 1 attributes
[36080-36080] ../src/vabackend.c: 465           nvCreateConfig got config attrib: 0 0 1
[36080:36232:0125/114726.887900:VERBOSE2:vaapi_video_decode_accelerator.cc(483)] DecodeTask(): Decoder requesting a new set of surfaces
[36080:36080:0125/114726.888755:VERBOSE2:vaapi_video_decode_accelerator.cc(578)] InitiateSurfaceSetChange():  |requested_num_pics_| = 6; |requested_num_reference_frames_| = 6
[36080:36080:0125/114726.888900:VERBOSE2:vaapi_video_decode_accelerator.cc(644)] TryFinishSurfaceSetChange(): Requesting 6 pictures of size: 1920x1088 and visible rectangle = 0,0 1920x1080
[36080:36080:0125/114726.890074:ERROR:vaapi_video_decode_accelerator.cc(724)] Failed to initialize VppVaapiWrapper
[36080:36080:0125/114726.890213:VERBOSE1:vaapi_video_decode_accelerator.cc(144)] NotifyError(): Notifying of error 4
[36080:36080:0125/114726.891818:VERBOSE2:vaapi_video_decode_accelerator.cc(1041)] Cleanup(): Destroying VAVDA
[36080-36080] ../src/vabackend.c:1621              nvTerminate In nvTerminate
[36080-36080] ../src/export-buf.c:  54          releaseExporter Releasing exporter, 0 outstanding frames
[36080-36080] ../src/export-buf.c:  71          releaseExporter Done releasing frames
[36080-36080] ../src/export-buf.c:  81          releaseExporter Done releasing EGLImages

LIBVA_DRIVER_NAME=nvidia NVD_LOG=1 chromium --enable-features=VaapiVideoDecoder --enable-logging=stderr --loglevel=0 --vmodule=vaapi_wrapper=4,vaapi_video_decode_accelerator=4 --use-gl=egl

Testing on 441c03d, I think it still fails because of missing VAProfileNone https://github.com/elFarto/nvidia-vaapi-driver/issues/5#issuecomment-1005603180

helloer avatar Jan 25 '22 10:01 helloer

Google Chrome Beta crashes a few times with --use-gl=egl and otherwise the above command makes no difference from before.

Tatsh avatar Jan 25 '22 15:01 Tatsh

Chrome Beta actually disables GPU entirely when this is loaded. Definitely something wrong.

Tatsh avatar Jan 27 '22 17:01 Tatsh

@helloer A couple of questions. Which chromium build are you running? and are you running this under Wayland?

I'm getting these errors at the moment, attempting to run it under X11:

[21490:21490:0128/205707.729988:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is egl, ANGLE is 
[21490:21490:0128/205707.748983:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[21490-21490] ../src/export-buf.c:  52                    debug [EGL] eglCreateWindowSurface: EGL_BAD_MATCH error: In eglCreateWindowSurface: Native and EGL formats are incompatible
[21490:21490:0128/205707.777189:ERROR:gl_surface_egl.cc(1510)] eglCreateWindowSurface failed with error EGL_BAD_MATCH

elFarto avatar Jan 28 '22 21:01 elFarto

Which chromium build are you running? and are you running this under Wayland?

Chromium 97.0.4692.99 Arch Linux under X11. Maybe it's due to https://github.com/archlinux/svntogit-packages/blob/packages/chromium/trunk/unexpire-accelerated-video-decode-flag.patch?

helloer avatar Jan 28 '22 21:01 helloer

I've spent a few hours working on this today and managed to get...not far. I've discovered that XFCE's display composition is what was causing the the EGL_BAD_MATCH errors (I think). Disabling that got me to helloer's error. I hacked in some code to pretend we support VAProfileVideoProc, then got to this line.

I've checked the code in on the chrome_support branch.

elFarto avatar Jan 29 '22 17:01 elFarto

EGL_BAD_MATCH

I get the same thing on Gnome 42 on X11 with a GTX 1080 on 510.60.02 with GChrome 100

Not sure if I need --use-gl=egl, if I drop it the error goes too

If I open chrome://gpu, I get this:

[100114-100114] ../src/vabackend.c:1642       __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver: 0x1bb4012f3800 10
[100114-100114] ../src/vabackend.c:1645       __vaDriverInit_1_0 Non-DRM display type detected, defaulting to GPU ID 0. Use NVD_GPU to pick a specific GPU.
[100114-100114] ../src/export-buf.c: 164       findGPUIndexFromFd Looking for GPU index: 0
[100114-100114] ../src/export-buf.c: 175       findGPUIndexFromFd Found 4 EGL devices
[100114-100114] ../src/export-buf.c: 184       findGPUIndexFromFd Got EGL_CUDA_DEVICE_NV value '0' for EGLDevice 0
[100114-100114] ../src/export-buf.c: 136 checkModesetParameterFromFd Unable to check nvidia_drm modeset setting
[100114-100114] ../src/export-buf.c: 208       findGPUIndexFromFd Selecting EGLDevice 0
[100114-100114] ../src/export-buf.c: 270             initExporter Driver doesn't support 16-bit surfaces
[100114-100114] ../src/export-buf.c: 103                reconnect Reconnecting to stream
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 6 with 1 attributes
[100114-100114] ../src/vabackend.c: 477           nvCreateConfig got config attrib: 0 0 1
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 4 (nil) -1431655766
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 4 0x1bb401640180 5
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 6 with 0 attributes
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 7 with 1 attributes
[100114-100114] ../src/vabackend.c: 477           nvCreateConfig got config attrib: 0 0 1
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 4 (nil) -1431655766
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 4 0x1bb401640180 5
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 7 with 0 attributes
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 13 with 1 attributes
[100114-100114] ../src/vabackend.c: 477           nvCreateConfig got config attrib: 0 0 1
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 4 (nil) -1431655766
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 4 0x1bb401640180 5
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 13 with 0 attributes
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 14 with 1 attributes
[100114-100114] ../src/vabackend.c: 477           nvCreateConfig got config attrib: 0 0 1
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 9 (nil) -1431655766
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 9 0x1bb401640180 5
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 14 with 0 attributes
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 19 with 1 attributes
[100114-100114] ../src/vabackend.c: 477           nvCreateConfig got config attrib: 0 0 1
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 10 (nil) -1431655766
[100114-100114] ../src/vabackend.c:1345 nvQuerySurfaceAttributes with 10 0x1bb401640180 5
[100114-100114] ../src/vabackend.c: 456           nvCreateConfig got profile: 19 with 0 attributes
[100114-100114] ../src/vabackend.c:1626              nvTerminate Terminating 0x1bb4012f3800
[100114-100114] ../src/export-buf.c:  65          releaseExporter Releasing exporter, 0 outstanding frames
[100114-100114] ../src/export-buf.c:  82          releaseExporter Done releasing frames

if it means anything

timocapa avatar Apr 03 '22 00:04 timocapa

Hoping this could work on chrome some day. There's already vdpau backend implementation of va-api working perfectly on chromium. It currently supports all h264 profiles & vp9-profile0 & uses VDAVideoDecoder. But as we know NVDEC is more efficient & closer to nvidia's proprietary implementation as VDPAU is dead outdated.

ghost avatar Jul 01 '22 03:07 ghost

I've reworked some stuff and got Chromium on X11 (with desktop GL) support sort of working, but it's quite a hack and very inefficient, and the resulting image isn't quite the correct colour due to the library having to do the YUV -> RGB conversion. I would not recommend it for daily use. Chromium on X11 with EGL won't work until NVIDIA support the DRI3 open method in their X11 driver, there's nothing I can do to work around that.

However, I'm having a problem getting Chromium on Wayland (with EGL) to even initialise VA-API. I'm using this command on Fedora 36/GNOME 42:

 NVD_LOG=1 chromium-freeworld --enable-features=VaapiVideoDecoder --password-store=basic --use-gl=egl --enable-logging=stderr --vmodule=gpu_video_decode_accelerator_factory=4,vaapi_wrapper=4,vaapi_video_decode_accelerator=4 --disable-gpu-sandbox --disable-features=UseChromeOSDirectVideoDecoder

But I see an output early on about DRM Prime not being supported. This seems to be the result of the wl_drm protocol on the display server returning the capabilities of 0. I can't find what's setting that value.

Can some of you try launching chromium with VA-API and NVD_LOG=1 and see if it initialises the library on startup? Also, could you note which wayland compositor you're using. You don't specifically need this branch to test it, chromium will at least initialise the regular version.

elFarto avatar Jul 24 '22 08:07 elFarto

@elFarto Did you test your patches on xwayland with ozone enabled? I don't think egl will help with this because it has lot of other issues such as reduced gpu performance. Even if you make it work, no one gonna have chromium on egl backend.

ghost avatar Jul 24 '22 13:07 ghost

--ozone-platform=wayland is automatically passed with chromium-freeworld. Just tried regular chromium too, slightly different error:

[57047:57047:0724/154417.696624:WARNING:wayland_drm.cc(96)] Failed to get drm magic

rather than:

[55021:55021:0724/154043.238392:WARNING:wayland_drm.cc(96)] Drm prime capability is not supported

elFarto avatar Jul 24 '22 14:07 elFarto

timo@mauve ~> NVD_LOG=1 google-chrome-stable --enable-features=VaapiVideoDecoder --password-store=basic --use-gl=egl --enable-logging=stderr --vmodule=gpu_video_decode_accelerator_factory=4,vaapi_wrapper=4,vaapi_video_decode_accelerator=4 --disable-gpu-sandbox --disable-features=UseChromeOSDirectVideoDecoder --ozone-platform=wayland
[32525:32525:0724/164745.040269:WARNING:wayland_object.cc(95)] Binding to gtk_shell1 version 4 but version 5 is available.
[32525:32525:0724/164745.040300:WARNING:wayland_object.cc(95)] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available.
[32525:32525:0724/164745.040310:WARNING:wayland_object.cc(95)] Binding to zwp_linux_dmabuf_v1 version 3 but version 4 is available.
[32525:32525:0724/164745.040446:WARNING:wayland_drm.cc(96)] Drm prime capability is not supported

same thing on gchrome

timocapa avatar Jul 24 '22 14:07 timocapa

@elFarto I meant xwayland btw. Let ozone choose X11 as ozone backend & see if it really works. env GDK_BACKEND=x11 NVD_LOG=1 chromium --ozone-platform=x11 Chromium with Wayland still hasn't ported drm support I guess.

ghost avatar Jul 24 '22 15:07 ghost

[filip@PC-ARCH ~]$ NVD_LOG=1 chromium
     12752.030663233 [19273-19273] ../src/vabackend.c:2083       __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver: 10
     12752.030673783 [19273-19273] ../src/vabackend.c:2092       __vaDriverInit_1_0 Now have 0 (0 max) instances
     12752.030677513 [19273-19273] ../src/vabackend.c:2118       __vaDriverInit_1_0 Selecting Direct backend
     12752.036261359 [19273-19273] ../src/direct/direct-export-buf.c:  90      direct_initExporter Found NVIDIA GPU 0 at /dev/dri/renderD128
     12752.036268689 [19273-19273] ../src/direct/nv-driver.c: 190            init_nvdriver Initing nvdriver...
     12752.036271839 [19273-19273] ../src/direct/nv-driver.c: 195            init_nvdriver Got dev info: a00 1 2 6
     12752.036337147 [19273-19273] ../src/direct/nv-driver.c: 256            init_nvdriver NVIDIA kernel driver version: 525.60.11
     12752.158712890 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 6 with 1 attributes
     12752.158720960 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.158723480 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 4 (8) (nil) -1431655766
     12752.158726170 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 4 (8) 0xd9800da6040 7
     12752.159820070 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 48 - 4096, height: 16 - 4096
     12752.159825800 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 6 with 0 attributes
     12752.159833889 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 7 with 1 attributes
     12752.159835809 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.159837439 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 4 (8) (nil) -1431655766
     12752.159839319 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 4 (8) 0xd9800da6040 7
     12752.160945249 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 48 - 4096, height: 16 - 4096
     12752.160950289 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 7 with 0 attributes
     12752.160954439 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 13 with 1 attributes
     12752.160956119 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.160957599 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 4 (8) (nil) -1431655766
     12752.160959269 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 4 (8) 0xd9800da6040 7
     12752.161912982 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 48 - 4096, height: 16 - 4096
     12752.161917682 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 13 with 0 attributes
     12752.161921252 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 17 with 1 attributes
     12752.161922922 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.161924412 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 8 (8) (nil) -1431655766
     12752.161926312 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 8 (8) 0xd9800da6040 7
     12752.162876905 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 144 - 8192, height: 144 - 8192
     12752.162881585 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 17 with 0 attributes
     12752.162885285 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 14 with 1 attributes
     12752.162887065 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.162888565 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 9 (8) (nil) -1431655766
     12752.162890125 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 9 (8) 0xd9800da6040 7
     12752.163841158 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 48 - 4096, height: 16 - 4096
     12752.163845938 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 14 with 0 attributes
     12752.163850088 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 19 with 1 attributes
     12752.163851918 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.163853398 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 10 (8) (nil) -1431655766
     12752.163855148 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 10 (8) 0xd9800da6040 7
     12752.164923828 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 128 - 8192, height: 128 - 8192
     12752.164929398 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 19 with 0 attributes
     12752.164933578 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 32 with 1 attributes
     12752.164935298 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.164936868 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 11 (8) (nil) -1431655766
     12752.164938698 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 11 (8) 0xd9800da6040 7
     12752.165939750 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 128 - 8192, height: 128 - 8192
     12752.165944280 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 32 with 0 attributes
     12752.165946400 [19273-19273] ../src/vabackend.c: 700           nvCreateConfig Unable to determine surface type for VP9/AV1 codec due to no RTFormat specified.
     12752.165950170 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 18 with 1 attributes
     12752.165952010 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 1
     12752.165953630 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 8 (10) (nil) -1431655766
     12752.165955340 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 8 (10) 0xd9800da6040 7
     12752.167111237 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 144 - 8192, height: 144 - 8192
     12752.167115967 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 18 with 0 attributes
     12752.167119947 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 21 with 1 attributes
     12752.167121727 [19273-19273] ../src/vabackend.c: 658           nvCreateConfig got config attrib: 0 0 256
     12752.167123257 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 10 (10) (nil) -1431655766
     12752.167124967 [19273-19273] ../src/vabackend.c:1749 nvQuerySurfaceAttributes with 10 (10) 0xd9800da6040 7
     12752.168232016 [19273-19273] ../src/vabackend.c:1807 nvQuerySurfaceAttributes Returning constraints: width: 128 - 8192, height: 128 - 8192
     12752.168236626 [19273-19273] ../src/vabackend.c: 637           nvCreateConfig got profile: 21 with 0 attributes
     12752.168248046 [19273-19273] ../src/vabackend.c:2055              nvTerminate Terminating 0xd980159dc00
     12752.168290975 [19273-19273] ../src/vabackend.c:2069              nvTerminate Now have 0 (0 max) instances
src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 538982482

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 943215175

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094158

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094169

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 538982482

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 943215175

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094158

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094169

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 538982482

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 943215175

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094158

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094169

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 538982482

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 943215175

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094158

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094169

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 538982482

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 943215175

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094158

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094169

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000

Korothi avatar Dec 28 '22 12:12 Korothi

above was wayland. this is x11:

[filip@PC-ARCH ~]$ chromium
[4150:4323:1228/133407.891383:ERROR:vaapi_wrapper.cc(2291)] vaCreateContext failed, VA error: resource allocation failed
[4150:4323:1228/133407.891454:ERROR:vaapi_video_decoder.cc(1206)] failed creating VAContext
[4150:4150:1228/133407.913800:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.913890:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.931197:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.931300:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.937296:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.937393:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.943439:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.943607:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.950084:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.955803:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.956207:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133407.956268:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133408.058509:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133408.058591:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133408.211753:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory
[4150:4150:1228/133408.211824:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory

Korothi avatar Dec 28 '22 12:12 Korothi

It does look like there have been some changes to Chromium recently. The X11 backend is now trying to use DMA-BUFs which is good. However, there's another limitation, it requires a single fd be exported for both planes, which we can't currently do (I might be able to make the direct backend do it, but it runs into issues with smaller videos due to different modifiers). I did try some experiments with it, but didn't get too far.

The Chromium issue is here, however it's been open a while now, so I don't know if it'll get fixed.

elFarto avatar Dec 28 '22 13:12 elFarto

Sorry, but just asking: is the Chromium issue still blocking further work on Chromium support?

xuanruiqi avatar Feb 15 '23 17:02 xuanruiqi