Bug 93451 - Improve gl-renderer error message when GL ES 2 is not available
Summary: Improve gl-renderer error message when GL ES 2 is not available
Status: RESOLVED MOVED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-19 21:41 UTC by fausto
Modified: 2018-06-08 23:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
result of weston --backend=drm-backend.so (1.24 KB, text/plain)
2015-12-19 21:41 UTC, fausto
Details
result of dmesg | grep drm (1.76 KB, text/plain)
2015-12-19 21:46 UTC, fausto
Details
result of dmesg | grep agp (409 bytes, text/plain)
2015-12-19 21:53 UTC, fausto
Details

Description fausto 2015-12-19 21:41:17 UTC
Created attachment 120597 [details]
result of weston --backend=drm-backend.so
Comment 1 fausto 2015-12-19 21:46:25 UTC
Created attachment 120598 [details]
result of dmesg | grep drm
Comment 2 fausto 2015-12-19 21:53:53 UTC
Created attachment 120599 [details]
result of dmesg | grep agp
Comment 3 fausto 2015-12-19 22:04:33 UTC
With fbdev-backend.so weston normally start.
Comment 4 Pekka Paalanen 2015-12-20 09:44:25 UTC
What graphics card is that, which radeon?

Could you try setting these environment variables for Weston:
export MESA_DEBUG=1
export EGL_LOG_LEVEL=debug
export LIBGL_DEBUG=verbose

That would tell us which radeon driver exactly loads. The kernel log does mention "r200", but I don't know if that can support GL ES 2.0.

But if someone can say off-hand that this card won't support GL ES 2.0, then that would be the cause. Weston does not have a renderer that would support fixed-function GL. Then we could check if there is a way to make the error message better.

I suppose 'glxinfo' output from X could give hints of the card capabilities, too.

You could try with the weston command line argument --use-pixman, which gets you DRM KMS but without OpenGL.
Comment 5 fausto 2015-12-20 12:57:19 UTC
(In reply to Pekka Paalanen from comment #4)
> What graphics card is that, which radeon?
> 
> Could you try setting these environment variables for Weston:
> export MESA_DEBUG=1
> export EGL_LOG_LEVEL=debug
> export LIBGL_DEBUG=verbose
> 
> That would tell us which radeon driver exactly loads. The kernel log does
> mention "r200", but I don't know if that can support GL ES 2.0.
> 
> But if someone can say off-hand that this card won't support GL ES 2.0, then
> that would be the cause. Weston does not have a renderer that would support
> fixed-function GL. Then we could check if there is a way to make the error
> message better.
> 
> I suppose 'glxinfo' output from X could give hints of the card capabilities,
> too.
> 
> You could try with the weston command line argument --use-pixman, which gets
> you DRM KMS but without OpenGL.

Tanks for the tips:

00:01.0 PCI bridge: Intel Corporation 82865G/PE/P AGP Bridge (rev 02)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] R200 [
Radeon 9100]

Result of debug:

libGL search for .drirc in $HOME not in /etc. I copied /etc/drirc in /root/.drirc.

libEGL debug: added egl_dri2 to module array
libEGL debug: the best driver is DRI2
libEGL debug: the value (0x9) of attribute 0x3040 di not meet the criteria (0x4)

I don't know what this means.

In /usr/lib/xorg/dri there are:
i915_dri.so        nouveau_dri.so        r300_dri.so    radeonsi_dri.so
i965_dri.so        nouveau_vieux_dri.so  r600_dri.so    swrast_dri.so
kms_swrast_dri.so  r200_dri.so           radeon_dri.so  vmwgfx_dri.so

In /usr/lib/xorg/driver there are:
ati_drv.so  radeon_drv.so

In /usr/lib/mesa there are:
libEGL.so        libGL.so        libGLESv1_CM.so        libGLESv2.so
libEGL.so.1      libGL.so.1      libGLESv1_CM.so.1      libGLESv2.so.2
libEGL.so.1.0.0  libGL.so.1.2.0  libGLESv1_CM.so.1.1.0  libGLESv2.so.2.0.0

Where I can found the module egl_dri2?

Aniway weston --backend=drm-backend.so --use-pixman work perfectly.

PS:
result of glxinfo | grep render
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 128 bits)
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil, 
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,
Comment 6 Pekka Paalanen 2015-12-21 07:00:54 UTC
(In reply to fausto from comment #5)
> 
> 00:01.0 PCI bridge: Intel Corporation 82865G/PE/P AGP Bridge (rev 02)
> 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
> R200 [
> Radeon 9100]

A quick glance in wikipedia says R200 is OpenGL 1.3 capable. That's very far from GL ES 2, and I think it is a completely fixed-function card (no shaders). Therefore Weston's gl-renderer cannot run on it, and you will be better off with Pixman-renderer.

This also puts it in the Mesa classic driver set, not Gallium3D.

> Result of debug:
> 
> libGL search for .drirc in $HOME not in /etc. I copied /etc/drirc in
> /root/.drirc.

drirc is irrelevant, unless it contains directives that break your setup. It does not have to exist by default.

> libEGL debug: added egl_dri2 to module array
> libEGL debug: the best driver is DRI2
> libEGL debug: the value (0x9) of attribute 0x3040 di not meet the criteria
> (0x4)

Hmm, I was expecting more output, like which .so it will load. That's kind of crucial.

/usr/include/EGL/egl.h:#define EGL_RENDERABLE_TYPE               0x3040

#define EGL_OPENGL_ES2_BIT                0x0004

Bit 0x4 is not in 0x9, so that means GL ES 2 is not supported here, but see below.

> I don't know what this means.
> 
> In /usr/lib/xorg/dri there are:
> i915_dri.so        nouveau_dri.so        r300_dri.so    radeonsi_dri.so
> i965_dri.so        nouveau_vieux_dri.so  r600_dri.so    swrast_dri.so
> kms_swrast_dri.so  r200_dri.so           radeon_dri.so  vmwgfx_dri.so
> 
> In /usr/lib/xorg/driver there are:
> ati_drv.so  radeon_drv.so
> 
> In /usr/lib/mesa there are:
> libEGL.so        libGL.so        libGLESv1_CM.so        libGLESv2.so
> libEGL.so.1      libGL.so.1      libGLESv1_CM.so.1      libGLESv2.so.2
> libEGL.so.1.0.0  libGL.so.1.2.0  libGLESv1_CM.so.1.1.0  libGLESv2.so.2.0.0

The file lists look ok from what I can tell.

> Where I can found the module egl_dri2?

It is a built-in, you already saw it loaded correctly.

> Aniway weston --backend=drm-backend.so --use-pixman work perfectly.
> 
> PS:
> result of glxinfo | grep render
> libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so
> libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
> direct rendering: Yes
>     GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
>     GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
> Extended renderer info (GLX_MESA_query_renderer):
> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 128 bits)
>     GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
>     GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil, 
>     GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
>     GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp, 
>     GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,

llvmpipe is a software renderer, not a GPU driver. Either your GPU is too old to be useful and you or someone chose software rendering, or even your Xorg driver setup is broken.

---

In summary, Weston's gl-renderer is not written for this old hardware and you have to --use-pixman. The only thing left in this bug is to check if we can be more clear with the error message in Weston.


PS. Never do 'grep' on a log or a program output unless asked to, otherwise you likely miss useful information.
Comment 7 fausto 2015-12-21 19:57:05 UTC
(In reply to Pekka Paalanen from comment #6)
> (In reply to fausto from comment #5)
> > 
> > 00:01.0 PCI bridge: Intel Corporation 82865G/PE/P AGP Bridge (rev 02)
> > 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
> > R200 [
> > Radeon 9100]
> 
> A quick glance in wikipedia says R200 is OpenGL 1.3 capable. That's very far
> from GL ES 2, and I think it is a completely fixed-function card (no
> shaders). Therefore Weston's gl-renderer cannot run on it, and you will be
> better off with Pixman-renderer.
> 
> This also puts it in the Mesa classic driver set, not Gallium3D.
> 
> > Result of debug:
> > 
> > libGL search for .drirc in $HOME not in /etc. I copied /etc/drirc in
> > /root/.drirc.
> 
> drirc is irrelevant, unless it contains directives that break your setup. It
> does not have to exist by default.
> 
> > libEGL debug: added egl_dri2 to module array
> > libEGL debug: the best driver is DRI2
> > libEGL debug: the value (0x9) of attribute 0x3040 di not meet the criteria
> > (0x4)
> 
> Hmm, I was expecting more output, like which .so it will load. That's kind
> of crucial.
> 
> /usr/include/EGL/egl.h:#define EGL_RENDERABLE_TYPE               0x3040
> 
> #define EGL_OPENGL_ES2_BIT                0x0004
> 
> Bit 0x4 is not in 0x9, so that means GL ES 2 is not supported here, but see
> below.
> 
> > I don't know what this means.
> > 
> > In /usr/lib/xorg/dri there are:
> > i915_dri.so        nouveau_dri.so        r300_dri.so    radeonsi_dri.so
> > i965_dri.so        nouveau_vieux_dri.so  r600_dri.so    swrast_dri.so
> > kms_swrast_dri.so  r200_dri.so           radeon_dri.so  vmwgfx_dri.so
> > 
> > In /usr/lib/xorg/driver there are:
> > ati_drv.so  radeon_drv.so
> > 
> > In /usr/lib/mesa there are:
> > libEGL.so        libGL.so        libGLESv1_CM.so        libGLESv2.so
> > libEGL.so.1      libGL.so.1      libGLESv1_CM.so.1      libGLESv2.so.2
> > libEGL.so.1.0.0  libGL.so.1.2.0  libGLESv1_CM.so.1.1.0  libGLESv2.so.2.0.0
> 
> The file lists look ok from what I can tell.
> 
> > Where I can found the module egl_dri2?
> 
> It is a built-in, you already saw it loaded correctly.
> 
> > Aniway weston --backend=drm-backend.so --use-pixman work perfectly.
> > 
> > PS:
> > result of glxinfo | grep render
> > libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so
> > libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
> > direct rendering: Yes
> >     GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
> >     GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
> > Extended renderer info (GLX_MESA_query_renderer):
> > OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 128 bits)
> >     GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
> >     GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil, 
> >     GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
> >     GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp, 
> >     GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,
> 
> llvmpipe is a software renderer, not a GPU driver. Either your GPU is too
> old to be useful and you or someone chose software rendering, or even your
> Xorg driver setup is broken.
> 
> ---
> 
> In summary, Weston's gl-renderer is not written for this old hardware and
> you have to --use-pixman. The only thing left in this bug is to check if we
> can be more clear with the error message in Weston.
> 
> 
> PS. Never do 'grep' on a log or a program output unless asked to, otherwise
> you likely miss useful information.

I'm sorry.
Comment 8 fausto 2015-12-21 20:16:19 UTC
libEGL debug: the value (0x9) of attribute 0x3040 di not meet the criteria (0x4)

To be honest it is repeated for 12 times.
Comment 9 GitLab Migration User 2018-06-08 23:54:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/weston/issues/71.


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.