V5.0.0-rc2 OpenGL not detected, Ubuntu 18.04


#1

Hi
I just installed V5.0.0-rc2 from the nightly ppa and I can’t select the ‘modern accelerated’ toolset. It says ‘OpenGL 2.1 required’.
I’ve been using the OpenGL canvas on version 4.x with no problems, on the same machine.
My OpenGL version is 3.3, as far as I can determine :
glxinfo | grep “OpenGL version”
OpenGL version string: 3.3.0 NVIDIA 340.106

Also, kicad-ogltest fails with :
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
*** Caught unhandled unknown exception; terminating

The fallback and legacy toolsets do seem to work so it’s not a huge deal but I’m sure the accelerated toolset should work on this PC…
Does anyone have any suggestions ?
Thanks !


#2

In case anyone else has the same problem, it seems there is a problem with Kicad and the nvidia-340 driver.
Selecting the open source nouveau driver in Ubuntu instead fixed it.


#3

Isn’t that driver (340) from stone age? I have 384.130 which is the “recommended” in Kubuntu 17.10. Or do you have an older card which isn’t supported with newer drivers (I don’t know if it’s possible)?


#4

Thanks and yes, it’s an older card (GeForce9500GT, must be about 8 years old). Ubuntu 18.04 recommends 340 for it. I did try a couple of later versions - they don’t work at all and flood the system log with messages like ‘use version 340 for this card’.
The nouveau driver is fine though…


#5

Would you mind to rise a bug with this information, at least it will be register in a proper place?
There may be something that developers could do to fix that issue, or at least it will be reported as a known issue.


#6

This is telling you that you don’t have the DRI drivers loaded for your video card. For the opensource driver, they are dependencies (mesa-utils & libgl1-mesa-glx) but I’m not sure which are correct for the NVIDIA proprietary drivers.


#7

Could you type “glxinfo” in the terminal on both nouveau and nvidia drivers and send us the output?

Tom


#8

Thanks for the help everybody.
Note that I’m happy using the nouveau driver going forward myself but I have no problem helping if anyone thinks this is a problem that actually needs looking into…I’m not convinced it is a Kicad bug.
I’ve attached the glxinfo outputs.glxinfo_nvidia-340.txt (55.5 KB)
glxinfo_nv96.txt (80.3 KB)
I don’t know anything about OpenGL or how this all works but I did clone and build a debug version of Kicad.
kicad-ogltest seems to fail just after loading /usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0 which is symlinked to libGLX_mesa.so.0.0.0 (whichever driver I am using). I wondered if it should not be using mesa if using the Nvidia drivers, but programs like glxgears still worked anyway.


#9

Today I booted into Debian Buster (Dual boot, Other is Mint 17 with KiCad 4.0.7 on another partition, but with the same /home) and did apt - update / upgrade / dist-upgrade and then started KiCad 5 for the first time.
I also seem to have problems with OpenGL.

Version info:

Application: kicad
Version: 5.0.0-rc3+dfsg1-1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.60.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.2 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3
Platform: Linux 4.16.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.62.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.60.0
Compiler: GCC 7.3.0 with C++ ABI 1011

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

I can run KiCad / EEschem / PCBnew, but I can not activate the OpenGL canvas in PCBnew.
[F11] says:

Warning
OpenGL 2.1 or higher is required!

But apart from that PCBnew seems to work with the legacy canvas.
However, when I attempt to start the 3D viewer I get a few errors, with an option to show a “Backtrace:” with more info:

ASSERT INFO:
…/src/gtk/window.cpp(2996): assert “(m_widget != __null)” failed in DoGetClientSize(): invalid window
BACKTRACE:
[1] wxWindow::DoGetClientSize(int*, int*) const
[2] wxAuiManager::AddPane(wxWindow*, wxAuiPaneInfo const&)
[3] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[4] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[5] wxEvtHandler::TryHereOnly(wxEvent&)
[6] wxEvtHandler::DoTryChain(wxEvent&)
[7] wxEvtHandler::ProcessEvent(wxEvent&)
[8] wxWindowBase::TryAfter(wxEvent&)
[9] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[10] wxMenuBase::SendEvent(int, int)
[11] g_closure_invoke
[12] g_signal_emit_valist
[13] g_signal_emit
[14] gtk_widget_activate
[15] gtk_menu_shell_activate_item
[16] g_closure_invoke
[17] g_signal_emit_valist
[18] g_signal_emit
[19] gtk_propagate_event
[20] gtk_main_do_event
[21] g_main_context_dispatch
[22] g_main_loop_run
[23] gtk_main
[24] wxGUIEventLoop::DoRun()
[25] wxEventLoopBase::Run()
[26] wxAppConsoleBase::MainLoop()
[27] wxEntry(int&, wchar_t**)
[28] __libc_start_main
[29] _start

Pressing “Continue” pops up the next failed assertion:

ASSERT INFO:
…/src/gtk/window.cpp(2857): assert “m_widget” failed in DoSetSize(): invalid window

BACKTRACE:
[1] wxWindow::DoSetSize(int, int, int, int, int)
[2] wxBoxSizer::RecalcSizes()
[3] wxSizer::Layout()
[4] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[5] wxBoxSizer::RecalcSizes()
[6] wxSizer::Layout()
[7] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[8] wxBoxSizer::RecalcSizes()
[9] wxSizer::Layout()
[10] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[11] wxBoxSizer::RecalcSizes()
[12] wxSizer::Layout()
[13] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[14] wxBoxSizer::RecalcSizes()
[15] wxSizer::Layout()
[16] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[17] wxBoxSizer::RecalcSizes()
[18] wxSizer::Layout()
[19] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[20] wxBoxSizer::RecalcSizes()
[21] wxSizer::Layout()
[22] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[23] wxBoxSizer::RecalcSizes()
[24] wxSizer::Layout()
[25] wxWindowBase::Layout()
[26] wxAuiManager::DoFrameLayout()
[27] wxAuiManager::Update()
[28] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[29] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[30] wxEvtHandler::TryHereOnly(wxEvent&)
[31] wxEvtHandler::DoTryChain(wxEvent&)
[32] wxEvtHandler::ProcessEvent(wxEvent&)
[33] wxWindowBase::TryAfter(wxEvent&)
[34] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[35] wxMenuBase::SendEvent(int, int)
[36] g_closure_invoke
[37] g_signal_emit_valist
[38] g_signal_emit
[39] g_closure_invoke
[40] g_signal_emit_valist
[41] g_signal_emit
[42] gtk_accel_group_activate
[43] gtk_accel_groups_activate
[44] gtk_window_activate_key
[45] g_closure_invoke
[46] g_signal_emit_valist
[47] g_signal_emit
[48] gtk_propagate_event
[49] gtk_main_do_event
[50] g_main_context_dispatch
[51] g_main_loop_run
[52] gtk_main
[53] wxGUIEventLoop::DoRun()
[54] wxEventLoopBase::Run()
[55] wxAppConsoleBase::MainLoop()
[56] wxEntry(int&, wchar_t**)
[57] __libc_start_main
[58] _start

“Continue” again & 3rd error:

ASSERT INFO:
…/src/gtk/window.cpp(3578): assert “m_widget != __null” failed in SetFocus(): invalid window

BACKTRACE:
[1] wxWindow::SetFocus()
[2] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[3] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[4] wxEvtHandler::TryHereOnly(wxEvent&)
[5] wxEvtHandler::DoTryChain(wxEvent&)
[6] wxEvtHandler::ProcessEvent(wxEvent&)
[7] wxWindowBase::TryAfter(wxEvent&)
[8] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[9] wxMenuBase::SendEvent(int, int)
[10] g_closure_invoke
[11] g_signal_emit_valist
[12] g_signal_emit
[13] g_closure_invoke
[14] g_signal_emit_valist
[15] g_signal_emit
[16] gtk_accel_group_activate
[17] gtk_accel_groups_activate
[18] gtk_window_activate_key
[19] g_closure_invoke
[20] g_signal_emit_valist
[21] g_signal_emit
[22] gtk_propagate_event
[23] gtk_main_do_event
[24] g_main_context_dispatch
[25] g_main_loop_run
[26] gtk_main
[27] wxGUIEventLoop::DoRun()
[28] wxEventLoopBase::Run()
[29] wxAppConsoleBase::MainLoop()
[30] wxEntry(int&, wchar_t**)
[31] __libc_start_main
[32] _start

“Continue” again and 4th error:

ASSERT INFO:
…/src/gtk/window.cpp(2857): assert “m_widget” failed in DoSetSize(): invalid window

BACKTRACE:
[1] wxWindow::DoSetSize(int, int, int, int, int)
[2] wxBoxSizer::RecalcSizes()
[3] wxSizer::Layout()
[4] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[5] wxBoxSizer::RecalcSizes()
[6] wxSizer::Layout()
[7] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[8] wxBoxSizer::RecalcSizes()
[9] wxSizer::Layout()
[10] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[11] wxBoxSizer::RecalcSizes()
[12] wxSizer::Layout()
[13] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[14] wxBoxSizer::RecalcSizes()
[15] wxSizer::Layout()
[16] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[17] wxBoxSizer::RecalcSizes()
[18] wxSizer::Layout()
[19] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[20] wxBoxSizer::RecalcSizes()
[21] wxSizer::Layout()
[22] wxSizerItem::SetDimension(wxPoint const&, wxSize const&)
[23] wxBoxSizer::RecalcSizes()
[24] wxSizer::Layout()
[25] wxWindowBase::Layout()
[26] wxAuiManager::DoFrameLayout()
[27] wxAuiManager::OnSize(wxSizeEvent&)
[28] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[29] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[30] wxEvtHandler::TryHereOnly(wxEvent&)
[31] wxEvtHandler::ProcessEventLocally(wxEvent&)
[32] wxEvtHandler::ProcessEvent(wxEvent&)
[33] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[34] g_closure_invoke
[35] g_signal_emit_valist
[36] g_signal_emit
[37] gtk_widget_size_allocate
[38] g_closure_invoke
[39] g_signal_emit_valist
[40] g_signal_emit
[41] gtk_widget_size_allocate
[42] g_closure_invoke
[43] g_signal_emit_valist
[44] g_signal_emit
[45] gtk_widget_size_allocate
[46] g_closure_invoke
[47] g_signal_emit_valist
[48] g_signal_emit
[49] gtk_widget_show
[50] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[51] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[52] wxEvtHandler::TryHereOnly(wxEvent&)
[53] wxEvtHandler::DoTryChain(wxEvent&)
[54] wxEvtHandler::ProcessEvent(wxEvent&)
[55] wxWindowBase::TryAfter(wxEvent&)
[56] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[57] wxMenuBase::SendEvent(int, int)
[58] g_closure_invoke
[59] g_signal_emit_valist
[60] g_signal_emit
[61] g_closure_invoke
[62] g_signal_emit_valist
[63] g_signal_emit
[64] gtk_accel_group_activate
[65] gtk_accel_groups_activate
[66] gtk_window_activate_key
[67] g_closure_invoke
[68] g_signal_emit_valist
[69] g_signal_emit
[70] gtk_propagate_event
[71] gtk_main_do_event
[72] g_main_context_dispatch
[73] g_main_loop_run
[74] gtk_main
[75] wxGUIEventLoop::DoRun()
[76] wxEventLoopBase::Run()
[77] wxAppConsoleBase::MainLoop()
[78] wxEntry(int&, wchar_t**)
[79] __libc_start_main
[80] _start

“Continue” again and then KiCad crashes completely. I had started KiCad from the commandline, and in the meantime the terminal window has also spit out a summary of the above errors:

paul@dualcore:~$ kicad
21:05:10: Debug: Checking template path ‘/usr/share/kicad/template’ exists
21:05:10: Debug: FileWatcherReset: add ‘/home/paul/projects/kicad/mumar-basisprint-st32f103c8t6/lib.pretty’

21:05:10: Debug: FileWatcherReset: add ‘/home/paul/projects/kicad/mumar-basisprint-st32f103c8t6/rescue-backup’

21:05:13: Debug: Loading project ‘/home/paul/projects/kicad/mumar-basisprint-st32f103c8t6/mumar-basisprint-st32f103c8t6.pro’ settings.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
…/src/gtk/window.cpp(2996): assert “(m_widget != __null)” failed in DoGetClientSize(): invalid window
…/src/gtk/window.cpp(2857): assert “m_widget” failed in DoSetSize(): invalid window
…/src/gtk/window.cpp(3578): assert “m_widget != __null” failed in SetFocus(): invalid window
…/src/gtk/window.cpp(2857): assert “m_widget” failed in DoSetSize(): invalid window
…/src/gtk/window.cpp(2857): assert “m_widget” failed in DoSetSize(): invalid window
Trace/breakpoint trap

My Video card is a GeForce 210 (N218)

paul@dualcore:~$ glxinfo |grep “OpenGL version”
OpenGL version string: 3.3.0 NVIDIA 340.107
paul@dualcore:~$ glxinfo > glxinfo.txt
glxinfo.txt.tar.gz (5.7 KB)

This Video driver could be a bit old, but it is what debian Buster installs by default.
I did see something about a “legacy driver” but I can’t remember where.
I tried to collect what info I can, but I do not understand much of this stuff…
Maybe I should also put this in a bug report somewhere, but I would like some feedback on this before I try to attract some developer’s attention.


#10

I think the bug tracker would be a better place to discuss the issue, but I have an impression that your video driver/OpenGL setup is broken. You get two error messages that should give you some hints when typed in a web search engine:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast