# Linux: EGL headless context videodriver

**URL:** <https://discourse.libsdl.org/t/linux-egl-headless-context-videodriver/24994>\
**Category:** SDL Development\
**Created:** [September 11, 2018, 7:17am UTC](https://discourse.libsdl.org/t/linux-egl-headless-context-videodriver/24994 "2018-09-11T07:17:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hfink](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/h/f9ae1b/32.png) [@hfink](https://discourse.libsdl.org/u/hfink)\
**Post date:** [September 11, 2018, 7:17am UTC](https://discourse.libsdl.org/t/linux-egl-headless-context-videodriver/24994/1 "2018-09-11T07:17:47Z")

</div>

Hi,

We’ve had a use-case where we wanted an application that uses SDL2 for OpenGL context creation to use a headless EGL context rather than anything that would attempt to open a window (similar as done in [this blog post](https://blogs.igalia.com/elima/2016/10/06/example-run-an-opengl-es-compute-shader-on-a-drm-render-node/)). I got this working in SDL2 by stripping the KMS video driver basically of everything that is KMS/Config-specific, and only let it provide an EGL context (very little had to be changed in the EGL bits to make this work). While that seems to work well, it’s a hack, and I wonder if I could contribute this in a cleaner way. Maybe a new simple video driver? Or a hint to the DUMMY video driver? What do you think could be an acceptable way to implement this feature upstream?

Best regards,

Heinrich
