[Mesa-users] i915 hardware accelerated rendering performance depends on monitor connected

Julius Ziegler ziegler at atlatec.de
Mon Oct 22 09:08:40 UTC 2018


Dear mesa-friends,

I am observing a weird phenomenon and I hope I can get some pointers here.

I am developing an application that uses opengl for general purpose 
computation. No opencl, no cuda, just glsl shaders. All my rendering is 
going to textures. I am working on an Intel NUC with Ubuntu 18.04, using 
the i915 driver.

Initially, I had this running under xorg, with a (useless) window open 
just to get an opengl context. Already in this state I observed that my 
application achieves a higher frame rate when a monitor is connected. I 
could not make heads or tails of this and finally blamed this on xorg 
and some initialization stages happening or not depending if a monitor 
is connected or not.

I thought it would be nice to have this running without a window system 
anyway (it is supposed to become a headless system), so I transformed my 
application to egl and gbm, using a surfaceless setup. I was very happy 
to get this working. I can now run the application without having to 
start an x-server.

But the phenomenon stayed exactly the same!

There is one difference, when having an x-server running, I can un-plug 
the monitor and the performance stays good. When having a console only, 
the performance gets bad again as soon as I unplug the monitor.

To help retrace the error, I adapted the program "peglgears" from the 
mesa-demos folder, to use gbm as my original application, so that it can 
be run without an xserver. I also adapted it to use render-to-texture.

You can find the source code here:

http://atlatec.de/downloads/gbmeglgears.c

With a monitor connected, it gives me ca. 16000 frames per seconds. 
Without, ca. 6000.

Further below you can find the begin of the output of the program 
eglinfo (which is also found in the mesa-demos), I thought maybe it is 
useful.

Does anybody understand what is going on? Could it have to do with 
vsync? This is the only thing that I can think of that might have 
something to do with the monitor.

I am really new to this and never expected to have to dive in so deep. 
Any basic pointers are welcome.

Thanks!

Julius



EGL client extensions string:
     EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
     EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland
     EGL_EXT_platform_x11 EGL_MESA_platform_gbm
     EGL_MESA_platform_surfaceless

GBM platform:
EGL API version: 1.4
EGL vendor string: Mesa Project
EGL version string: 1.4 (DRI2)
EGL client APIs: OpenGL OpenGL_ES
EGL extensions string:
     EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age
     EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import
     EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_config_attribs
     EGL_KHR_create_context EGL_KHR_create_context_no_error
     EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses
     EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image
     EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image
     EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base
     EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync
     EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
     EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image
     EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display






More information about the mesa-users mailing list