← Back to team overview

kicad-developers team mailing list archive

Difficult (Linux + Virtualbox + GLX) bug and weird workaround


Hi All,

I've been trying to run Kicad in Virtualbox for some time now. Version 5.x
always worked ok with their graphical interface.

Then I discovered that in later versions of Ubuntu (20+) some versions of
Kicad crash. This is due to a opengl rendering thing. I raised a bug but it
has not yet really been looked at (
https://gitlab.com/kicad/code/kicad/-/issues/8944 )

It seems that the crash is inside GL_UTILS::SetSwapInterval (in gl_utils.h)

Checking the code, I noticed this gem:

        /// Do not try to set the swapping over remote connections
        /// Video drivers lie and then crash when they can't handle the
adaptive swapping
        if( wxGetEnv( wxT( "SSH_CONNECTION"), nullptr ) )
            return 0;

So just as an experimental workaround, I tried setting the environment
variable SSH_CONNECTION (to anything) - and it WORKS! This actually makes
the tools operate normally. The 3d viewer isn't particularly fast (software
rendering) but it all starts up and is quite responsive enough on simple

This workaround is awful and I really hope that the Mesa GLX driver is
fixed soon- I have looked at the source but it is difficult to parse.