I was using KiCAD 4.0.7 to design a board at night and all was well. I saved and went to bed. The following morning I realized KiCAD started crushing. I knew something had updated the previous night and was causing it to crush but I needed a quick fix to get working again so I can finish my board. So I ran KiCAD from the terminal and opened the project and then opened pcbnew. I opened the 3D viewer and then got a Segmentation Fault. The error message was very clear:
So it was the i965 Intel graphics driver that failed to submit batchbuffer, and I had no idea what that meant. So I Googled that error and I landed on a github issue that gave a hint: force software rendering for libgl in KiCAD.
First I tried it on the terminal:
It ran without any problems, albeit a bit slower 3D rendering which was manageable to just continue working.
Then I tried with the variable set to 0:
And the error was back. That was enough testing. I had found a quick fix to get me going.
To temporarily fix this for every time I launch KiCAD, I edited the .desktop file and added the environmental variable to the exec line:
That was my quick fix. I am still to find out why hardware acceleration is not working for this version with the intel graphics driver and potentially fix it.