[vlc-devel] Using VLC 4.0.0 on WSL2 Ubuntu 25.04 with wayland
Jean-Yves Baudy
jy.baudy at gmail.com
Wed Jun 25 23:31:05 UTC 2025
So question to VLC dev team. Why not allow a system with no
EGL_KHR_display_reference support like this dirty patch?
With this I can use EGL
-
+ EGLAttrib display_attribs[3] = {0};
+ size_t display_attribs_len = 0;
+
if (surface->type != VLC_WINDOW_TYPE_WAYLAND)
return EGL_NO_DISPLAY;
if (!CheckClientExt("EGL_KHR_display_reference")) {
msg_Warn(gl, "EGL display reference counting not supported");
- return EGL_NO_DISPLAY;
+ //return EGL_NO_DISPLAY;
+ } else {
+ display_attribs[display_attribs_len++] =
EGL_TRACK_REFERENCES_KHR;
+ display_attribs[display_attribs_len++] = EGL_TRUE;
+
}
+ display_attribs[display_attribs_len++] = EGL_NONE;
+
# ifdef EGL_KHR_display_reference
static const EGLAttrib attrs[] = {
EGL_TRACK_REFERENCES_KHR, EGL_TRUE,
@@ -183,9 +191,11 @@ static EGLDisplay OpenDisplay(vlc_gl_t *gl)
# if defined(EGL_VERSION_1_5)
# ifdef EGL_KHR_platform_wayland
- if (CheckClientExt("EGL_KHR_platform_wayland"))
+ if (CheckClientExt("EGL_KHR_platform_wayland")) {
return eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_KHR,
- surface->display.wl, attrs);
+ surface->display.wl, display_attribs
);
+ //surface->display.wl, attrs);
+ }
# endif
Le jeu. 26 juin 2025 à 00:51, Jean-Yves Baudy <jy.baudy at gmail.com> a écrit :
> Thanks for the tips. I have updated mesa to the same version mentioned in
> your mail.
>
> - https://launchpad.net/ubuntu/+source/mesa
>
> weston-simple-egl works fine. So EGL is usable. But vlc still failed to
> use EGL. I see this log:
>
> [00007ae40404cc40] xcb_egl gl debug: EGL client extensions:
> EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query
> EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
> EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device
> EGL_EXT_explicit_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland
> EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb
> EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
> [00007ae40404cc40] egl_wl gl debug: EGL client extensions:
> EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query
> EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
> EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device
> EGL_EXT_explicit_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland
> EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb
> EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
> *[00007ae40404cc40] egl_wl gl warning: EGL display reference counting not
> supported*
> [00007ae40404cc40] egl_x11 gl debug: EGL client extensions:
> EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query
> EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
> EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device
> EGL_EXT_explicit_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland
> EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb
> EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
> [00007ae40404cc40] egl_gbm_wl gl debug: EGL client extensions:
> EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query
> EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
> EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device
> EGL_EXT_explicit_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland
> EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb
> EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
> [00007ae40404cc40] egl_gbm_wl gl: can't find gbm device
> [00007ae468ff5888] main generic debug: no opengl modules matched with name
> any
> [00007ae40404c8f0] main vout display debug: no vout display modules
> matched with name gl
> [00007ae43c0458a0] main video output error: video output display creation
> failed
>
>
> This line [00007ae40404cc40] egl_wl gl warning: EGL display reference
> counting not supported may explain why. Code is
> in ./modules/video_output/opengl/egl.c
>
> if (!CheckClientExt("EGL_KHR_display_reference")) {
> msg_Warn(gl, "EGL display reference counting not supported");
> return EGL_NO_DISPLAY;
> }
>
> Maybe due to my hardware....
>
>
>
>
> Le mer. 25 juin 2025 à 21:35, Fatih Uzunoğlu <fuzun54 at outlook.com> a
> écrit :
>
>> The problem is within VLC, mainly two components are using something that
>> seemingly can only be used by one. This is only the case with fractional
>> scale, because Wayland does not support fractional scale by default and
>> fractional scale requires adjusting viewport...
>>
>> In your case, as I said, if you are looking for a workaround, OpenGL
>> should be functional in WSL and you may want to try again after making sure
>> it is working so that SHM module, which is lower priority, is not used:
>>
>> > If you are using Ubuntu, Debian tends to dissect monorepos for
>> > packaging. Maybe you can try again to not rely on SHM after installing
>> > these packages listed here: https://packages.debian.org/source/sid/mesa
>> .
>> > Depending on the modules, it may also require re-configuration.
>>
>> If you have Weston, you can check running `weston-simple-egl` to see if
>> EGL is usable.
>>
>> That being said, it is still not clear to me how this is going to be
>> fixed. Reporting size as `size * scale` is neither conventional (in Wayland
>> conventions at least, not VLC conventions) nor would work as intended.
>> Wayland applications use `wl_surface_set_buffer_scale()` for integer scale,
>> and viewporter for fractional scale. This is what we are doing in the
>> interface window provider.
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20250626/dd492f26/attachment.htm>
More information about the vlc-devel
mailing list