KiCad 5, GTK+2 vs GTK+3 Restrictions
------------------------------------

Right now KiCad 5.x isn't fully ready for using GTK+3 bindings through
wxWidgets3 and related additional packages which depend somehow on wxWidget3
like the package wxpython.

What are the problems?
There are two bigger issues that resulting in some restricted behavior of
the KiCad binaries.

 1.) First the wxWidget GUI binding against GTK+3 aren't fully
     ready for a full productive usage of the KiCad suite and KiCad is becoming
     significantly sluggish if the GTK+3 libraries of wxWidget would be used.
     Also some sporadic segfaults can happen. To use GTK+3 some more source
     code improvements needs to be done by upstream. Maybe a series of
     KiCad 5.1.x will be released later to fix this problem.
     So currently KiCad is build to use still GTK+2 bindings.

 2.) The usage of the scripting features of wxpython isn't possible as the
     wxpython package isn't available anymore for usage with GTK2+. This
     unfortunately is resulting in a turned off support of SCRIPTING_WXPYTHON
     and the Pcbnew application hasn't a Python scripting interface for now.
     This should be usable again once a full GTK3+ support is built into KiCad.

 -- Carsten Schoenert <c.schoenert@t-online.de>  Sat, 26 May 2018 12:00:00 +0200

KiCad 5, the 'Modern Toolset (Accelerated)' in Gerbview or Pcbnew and Wayland
-----------------------------------------------------------------------------

If you running your DE (Desktop Environment) under Wayland [1], a planned
replacement for X [2], and you have turned on the 'Modern Toolset (Accelerated)'
in Pcbnew or Gerbview you probably experience some strange things like crashes
of your complete DE session.

This happen due a issue within the wxWidget3.0 framework while running in a
Wayland session together with the GTK3 bindings against the wxWidget framework.
This is no problem inside KiCad. The bugtracker for KiCad is tracking this
issue on Launchpad in the bug report 1755360 [3] and the KiCad project has
made an announcement about the problem on the project website [4]. The origin
of the problem is tracked on the TRAC instance on wxwidgets.org [5].

Right now there is no easy solution for this regression. You can use some
workarounds to get KiCad working nevertheless.

1. Do not use the 'Modern Toolset (Accelerated)' and use instead the 'Modern
   Toolset (Fallback)' option.

2. Run KiCad within a X11 session.
   To do so you have also two options.

   Option 1: Switch over to use X11 instead of the Wayland as base for your
   DE. This requires a complete log off from your running DE session and
   select 'X11' from the settings in your window manager before start the
   window manager itself.

   Option 2: Start KiCad (or the standalone applications) within a dedicated
   X11 session by setting the environment variable 'GDK_BACKEND' to 'x11'
   while calling pcbnew or gerbview. e.g.

     $ GDK_BACKEND=x11 kicad
      or
     $ GDK_BACKEND=x11 pcbnew

How to check if I'm running a x11 or a Wayland session?
You can use this oneliner to detect your session you running on. Please adjust
'YOUR_USER_NAME' with your login name.

  $ loginctl show-session `loginctl|grep YOUR_USER_NAME|awk '{print $1}'` -p Type

If you get the following output your session is running within Wayland.

  $ Type=wayland

[1] https://wiki.gnome.org/Initiatives/Wayland
[2] https://en.wikipedia.org/wiki/X_Window_System
[3] https://bugs.launchpad.net/kicad/+bug/1755360
[4] http://kicad-pcb.org/help/known-system-related-issues/#_wayland
[5] https://trac.wxwidgets.org/ticket/17702

 -- Carsten Schoenert <c.schoenert@t-online.de>  Sun, 8 Apr 2018 18:00:00 +0200
