Pcbnew refuses to open on Ubuntu 20.04

Hi,

I have been using Kicad on Windows and Linux for some time (5+ years) without (too many) trouble.

But now, after upgrading my main machine from Ubuntu 18.04 to 20.04, pcbnew (and footprint editor) no longer works. I tried Kicad 5.0.x, the new 5.1.7, 5.1.8, without success. It just freezes and I am forced to close the Kicad app. Running from the console, there is the message: “Segmentation failure (core dumped)”.

If you try to open a pre-existing pcb file, the pcbnew screen will appear (but not the board) and will freeze immediately.

Kicad project manager, schematic, gerber, etc., all work normally.

Any suggestions would be greatly appreciated.

Thank you,
André W.

This is my environment / setup:

Ubuntu 20.04.1 LTS
64-bit
Gnome 3.36.3
X11

Intel Core i7-6700 CPU @ 3.40GHz × 8
Mesa Intel HD Graphics 530 (SKL GT2)
32G RAM

Application: KiCad
Version: 5.1.8-db9833491~87~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-54-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.68.0
Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

Two things come to mind: some leftover files from the update process, and graphics drivers.

Rename the KiCad configuration directory (Where are the configuration files (settings, library tables)?) to start KiCad from scratch. Test non-accelerated fallback canvas/rendering first.

If that doesn’t work, you should find out what binary libraries the executable links to. Then we could see if some wrong runtime file is used.

Thank you very much eelik!

After restarting KiCad without the config directory it worked again. So I started to compare the pcbnew files (old and reborn). The relevant difference was the canvas_type option: 2 (default reborn) works; 0 (my old setup) crashes. Something changed on display drive / type from Ubuntu 18 to 20, I suppose, as it had been working just fine for a couple of years before the upgrade.

The only thing that still refuses to work is the 3D viewer. It opens, sometimes shows the board for while then scramble the image, freezes up and crashes the KiCad application entirely.

I will look for a display, openGL configuration or something related to the 3D, but if you can give me a direction, I would be more than grateful.

Regards,
André W.

I don’t know anything else than to check if the drivers are up to date. Search for the model name with “ubuntu”. I don’t know how well IntelHD cards are supported, usually they work out of box I think.

I suppose you have a desktop machine. With such powerful setup it wouldn’t be too much to add a new video card, what you think?

If you haven’t done so already, I suggest installing the oibaf PPA for updating your graphics. It’s a very active PPA with updates several times a week with the newest graphic drivers. I’ve used it myself for over a year with very good results.

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update

Thank you for your suggestion, but…

Yes, it is a desktop I put together myself a couple of years ago. While somewhat powerful (good Intel chipset, Core i7, 32G RAM, 1T SSD), I don’t play games, don’t edit videos or anything that is graphic intensive. I run some math simulations (Scilab, Fortran, C), and run 2D and 3D static CADs only (KiCAD, FreeCAD). So, no plans for a fancy graphic card, that consume more power, produce more heat and consume more money ;). I was more than happy with the onboard video performance, at least until last week when everything was working perfectly.

What bothers me is: this exact configuration have been working just fine for years. I did a bunch of good boards with KiCAD without a glitch. Where was my brain when I decided to upgrade the OS???

If there is a thing that is problematic with Linux and some complex programs as KiCAD, is upgrading. I really love KiCAD but it is always a pain to upgrade or migrate to a new machine. Even now, after (most) everything working again - thanks to your help, my footprint libraries are missing and I will have to configure it all again before start to use it.

I will try the suggestion about updating the video drive from ML9104 and see what happens.

Last resource, I can use a dual boot and put back Ubuntu 18.04 with my previous KiCAD setup (ouch).

Thank you again!
André W.

Thank you. I will give it a try.

I have some strange things happening here. When the 3D viewer freezes, my screen behaves oddly, leaving artifacts, ghosts and other corrupted lines and pixels all around following my mouse movements. It just stops when I reset the gnome gui. Probably a video card / memory bug issue.

Regards,
André W.

Just to complement. All configurations are corrected now libraries, footprints - all ok (again…).

The only problem that persists is the 3D viewer. Takes a lot of time to start and always crashes after some use.

I did test my video setup with the glmark2 program. All OpenGL testes went perfect whilst not incredibly fast (as expected anyway).

The benchmark result is copied at the end of this message.

I will call it “solved” as I can’t keep investigating instead of working. I will try to live without 3D preview for while. It is sad but it is what I can do for now.

Thank you very much eelik and ML9104 for the help.

Regards,
André W.


glmark2 2014.03+git20150611.fa71af2d

OpenGL Information
GL_VENDOR: Intel
GL_RENDERER: Mesa Intel® HD Graphics 530 (SKL GT2)
GL_VERSION: 4.6 (Compatibility Profile) Mesa 20.0.8

[build] use-vbo=false: FPS: 1339 FrameTime: 0.747 ms
[build] use-vbo=true: FPS: 1387 FrameTime: 0.721 ms
[texture] texture-filter=nearest: FPS: 1305 FrameTime: 0.766 ms
[texture] texture-filter=linear: FPS: 1293 FrameTime: 0.773 ms
[texture] texture-filter=mipmap: FPS: 1346 FrameTime: 0.743 ms
[shading] shading=gouraud: FPS: 944 FrameTime: 1.059 ms
[shading] shading=blinn-phong-inf: FPS: 1010 FrameTime: 0.990 ms
[shading] shading=phong: FPS: 914 FrameTime: 1.094 ms
[shading] shading=cel: FPS: 876 FrameTime: 1.142 ms
[bump] bump-render=high-poly: FPS: 680 FrameTime: 1.471 ms
[bump] bump-render=normals: FPS: 1907 FrameTime: 0.524 ms
[bump] bump-render=height: FPS: 1460 FrameTime: 0.685 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 616 FrameTime: 1.623 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 351 FrameTime: 2.849 ms
[pulsar] light=false:quads=5:texture=false: FPS: 914 FrameTime: 1.094 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 333 FrameTime: 3.003 ms
[desktop] effect=shadow:windows=4: FPS: 520 FrameTime: 1.923 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 757 FrameTime: 1.321 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 288 FrameTime: 3.472 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 785 FrameTime: 1.274 ms
[ideas] speed=duration: FPS: 636 FrameTime: 1.572 ms
[jellyfish] : FPS: 574 FrameTime: 1.742 ms
[terrain] : FPS: 84 FrameTime: 11.905 ms
[shadow] : FPS: 627 FrameTime: 1.595 ms
[refract] : FPS: 189 FrameTime: 5.291 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 796 FrameTime: 1.256 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 1057 FrameTime: 0.946 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 834 FrameTime: 1.199 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 956 FrameTime: 1.046 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 960 FrameTime: 1.042 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 1252 FrameTime: 0.799 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 827 FrameTime: 1.209 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 808 FrameTime: 1.238 ms

                      glmark2 Score: 867 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.