Summary: | X not running with error "Failed to make EGL context current" | ||
---|---|---|---|
Product: | Mesa | Reporter: | Alexandr Zelinsky <mexahotabop> |
Component: | EGL | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | chadversary, drinkcat, emil.l.velikov, mexahotabop |
Version: | git | Keywords: | bisected |
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
xinit log with LIBGL_DEBUG=verbose
EGL_LOG_LEVEL=debug Add tracing to egl_dri2.c EGL_LOG_LEVEL=debug with patches More tracing in egl_dri2.c Possible fix |
Description
Alexandr Zelinsky
2016-08-05 11:24:26 UTC
Not sure what's going on, but, as a first step, can you try to apply these 2 patches? https://patchwork.freedesktop.org/patch/101934/ https://patchwork.freedesktop.org/patch/102770/ didnt help same error Ok, thanks for trying those out. Can you try again, setting LIBGL_DEBUG=verbose ? Hopefully that'll give us more logs and a better idea of what is going on... Created attachment 125637 [details]
xinit log with LIBGL_DEBUG=verbose
seems not very usefull
what your nickname on #dri-devel?
Try EGL_LOG_LEVEL=debug as well. Created attachment 125640 [details]
EGL_LOG_LEVEL=debug
Created attachment 125643 [details] [review] Add tracing to egl_dri2.c libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglMakeCurrent Is due to the new code in dri2_make_current: if (!dri2_dpy) return _eglError(EGL_NOT_INITIALIZED, "eglMakeCurrent"); I don't quite understand how dri2_dpy could end up being uninitialized, unless eglMakeCurrent is called after eglTerminate... I'd start by adding traces in dri2_initialize, dri2_terminate, dri2_make_current, which is what this patch does... Created attachment 125644 [details]
EGL_LOG_LEVEL=debug with patches
Created attachment 125647 [details] [review] More tracing in egl_dri2.c I see. When the second display is initialized, there is still an active context, it seems (dri2_display_release should not be called on the first call to dri2_make_current): libEGL debug: Native platform type: drm (autodetected) libEGL debug: dri2_initialize 0x90d7a0 0x9a2f10 (dri2_dpy=(null)) libEGL debug: the best driver is DRI2 libEGL debug: EGL user error 0x3009 (EGL_BAD_MATCH) in dri2_create_context libEGL debug: dri2_make_current 0x90d7a0 0x9a2f10 (nil) (nil) 0x99dbf0 libEGL debug: dri2_display_release 0x9a2f10 2 refcount -> 1 This causes the reference count to drop to zero later on: libEGL debug: dri2_make_current 0x90d7a0 0x9a2f10 (nil) (nil) (nil) libEGL debug: dri2_display_release 0x9a2f10 1 refcount -> 0 => display is destroyed libEGL debug: dri2_make_current 0x90d7a0 0x9a2f10 (nil) (nil) 0x99dbf0 libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglMakeCurrent One more patch to confirm this. Created attachment 125652 [details] [review] Possible fix Possible fix attached, please give it a try. Thanks! fix working if you need logs with last tracing patch https://bpaste.net/show/6b49674b4e26 Patch on list here https://patchwork.freedesktop.org/patch/104229/, thanks for testing! Module: Mesa Branch: master Commit: 78e3cea4197802253401766fc44362786898e024 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=78e3cea4197802253401766fc44362786898e024 Author: Nicolas Boichat <drinkcat@chromium.org> Date: Thu Aug 11 16:43:32 2016 +0800 egl/dri2: dri2_make_current: Release previous context's display |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.