-
Notifications
You must be signed in to change notification settings - Fork 870
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
VA-API does not work in Ubuntu 24.04 #11838
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
Diagnostic information
|
@sikhness latest WSL releases support kernel modules, however
Host info:
|
Hi @elsaco, thanks for your comment! I think you meant to reply with your comment in my other issue however, which is specific around the VGEM module. My point there was just that VGEM might want to be turned on automatically for WSL2 without having to manually load it everytime for VA-API use cases. For this issue however, I'm referring to the fact that in Ubuntu 24.04 with VGEM already loaded, the default mesa drivers (24.0.9), don't seem to work with WSL2 and D3D12 and throw those weird errors as mentioned in the ticket above. If I manually downgrade the mesa drivers to 23.2.1 (the default one from Ubuntu 22.04), it all starts working again. So there seems to be a bug either in the mesa drivers or something within WSL2 that needs to be fixed for the latest drivers to work. Basically Ubuntu 24.04 will not work with WSL2 VA-API by default otherwise it seems. |
Hi @sikhness, I was able to repro this issue on the latest mesa/main source, the problem is that This mesa pull request fixes that and now the gstreamer command line works again. Please let me know if you still see the issue after applying the patch. |
…ELINE as not supported" This reverts commit d6bb4dd. Fixes: d6bb4dd ("d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported") PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE is necessary for some scenarios like the example below described in microsoft/WSL#11838 gst-launch-1.0 -v videotestsrc num-buffers=250 ! video/x-raw,width=1920,height=1200 ! vaapipostproc ! vaapih264enc ! filesink location=~/wsl_test.h264 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30548>
…ELINE as not supported" This reverts commit d6bb4dd. Fixes: d6bb4dd ("d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported") PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE is necessary for some scenarios like the example below described in microsoft/WSL#11838 gst-launch-1.0 -v videotestsrc num-buffers=250 ! video/x-raw,width=1920,height=1200 ! vaapipostproc ! vaapih264enc ! filesink location=~/wsl_test.h264 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30548> (cherry picked from commit a0f1a70)
…ELINE as not supported" This reverts commit d6bb4dd. Fixes: d6bb4dd ("d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported") PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE is necessary for some scenarios like the example below described in microsoft/WSL#11838 gst-launch-1.0 -v videotestsrc num-buffers=250 ! video/x-raw,width=1920,height=1200 ! vaapipostproc ! vaapih264enc ! filesink location=~/wsl_test.h264 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30548> (cherry picked from commit a0f1a70)
Use mesa 24.2 update on 2024 08 14I have try the new version mesa24.2 in ubuntu22.04; But Notice : use the ppa below
some people use oibaf ppa to use the newest version of mesa , but actualy newest version is mesa24.3 , this version don't accept the fixed patch ; And kisak-mesa support mesa24.2 , update on 2024 08 14 , it accept the patch ;
I try the new version becaues some application need opengl4.3 4.4 4.5 . But ubuntu22.04 's initial mesa version support opengl4.3 ... |
Actually, even if mesa dozen drivers work,
|
how did you get VA-API version 1.20.0 ?
|
Windows Version
Microsoft Windows [Version 10.0.20348.2582] (Windows Server 2022)
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
6.6.36.3-microsoft-standard-WSL2
Distro Version
Ubuntu 24.04
Other Software
No response
Repro Steps
/dev/dri
to show up in Ubuntu 24.04 (when using the new 6.6 Kernel)sudo apt install vainfo mesa-va-drivers ffmpeg gstreamer1.0-plugins-bad gstreamer1.0-tools gstreamer1.0-vaapi
export LIBVA_DRIVER_NAME=d3d12
gst-launch-1.0 -v videotestsrc num-buffers=250 ! video/x-raw,width=1920,height=1200 ! vaapipostproc ! vaapih264enc ! filesink location=~/wsl_test.h264
Expected Behavior
You should see an increasing progress indicator at the bottom of a sample video file being generated using the GPU through VA-API.
Actual Behavior
What actually happens is the EXACT same issue as what is reported here.
Workaround
In order for me to workaround this issue, I took inspiration from the other issue that posted the same error.
I realized that Ubuntu 24.04 by default has Mesa at
24.0.9
as shown by the output ofvainfo --display drm
:I then proceeded to add all of Ubuntu Jammy (22.04) older repositories into my Ubuntu 24.04:
Then I downgraded
mesa-va-driver
to version23.2.1
which is the default one available for Ubuntu 22.04 usingsudo apt install mesa-va-drivers=23.2.1-1ubuntu3.1~22.04.2
, as shown in the new output ofvainfo --display drm
:After this change, the same example I initially ran started to work again! It seems like there is a problem with the way WSL2 interacts with the new Mesa version that is default in Ubuntu 24.04.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: