Footprint editor woes in KiCad 8.0.4 on Linux

The footprint editor tends not to open on my Linux machine, KiCad 8.0.4, Wayland.

Lauching it results in nothing. What seems to trigger this behavior is opening the schematic or layout editor. After that, the footprint editor seems unaccessible, until we quit KiCad altogether and relaunch it. If we just launch KiCad project manager and launch the footprint editor, it works.

Has anyone else run into the same issue?

Is Linux Wayland an operating system?

No. In short, Wayland is a protocol for transferring data between an application and the video card.

https://www.howtogeek.com/900698/what-is-wayland-on-linux-and-how-is-it-different-from-x

Ok, I guess:

  • This is probably purely an issue related to running on Wayland.
  • The KiCad team won’t/can’t do anything much about it, I’ve heard about related issues on Wayland that it was all on wxWidgets’ shoulders and we have to wait until wxWidgets gets things fixed, if it ever happens.
  • That I must be one of the very few who use KiCad on Wayland.

I’m actually running into another issue, with hotkeys working only when they want.

I think KiCad is officially not supported on Wayland, so I guess we’re just on our own anyway if we do this.

As to the Wayland situation, it’s getting disastrous. It’s becoming the default now in most major distributions, yet there’s still so many differences in basic features compared to X11 that there are issues with many apps out there. Odd stuff.

Anyway, is there maybe an env variable we can set when running KiCad to force running it in X11 mode (which will go via XWayland when using Wayland)? Asking because in previous versions (6 & 7), I was running KiCad via XWayland and there were significantly fewer issues. Or maybe there is a build flag that needs to be set for this? (Currently using KiCad from my distro, but I can build it - that’s what I have done to keep older versions in parallel.)

Haven’t Ubuntu users been Waylanded (Waylaid?) since 22.04 by default? Have those KiCad users switched back to X11 or are they not complaining?

This is what arrives in the computer when the Ubuntu download button on the Kicad site is pressed

Application: KiCad Schematic Editor x86_64 on x86_64

Version: 8.0.5-rc1-202408281405~54a373a7e2~ubuntu22.04.1, release build

Libraries:
	wxWidgets 3.2.1
	FreeType 2.11.1
	HarfBuzz 2.7.4
	FontConfig 2.13.1
	libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18

Platform: Linux Mint 21.3, 64 bit, Little endian, wxGTK, X11, cinnamon, x11
OpenGL: Mesa, NV106, 4.3 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2

Build Info:
	Date: Aug 28 2024 14:05:43
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.6.3
	Curl: 7.81.0
	ngspice: 42
	Compiler: GCC 11.4.0 with C++ ABI 1016

Build settings:

Looks like Mint decided to stick with X11.

So what’s your distro and what your KiCad tells in the version info?

XWayland usage is forced in KiCad Flatpak and Ubuntu PPAs, at least.

Otherwise, running KiCad like: GDK_BACKEND=x11 kicad forces XWayland usage.

If you build KiCad with KICAD_USE_EGL=OFF, it will set GDK_BACKEND=x11 by itself.
And GLX support is more mature in wxWidgets, compared to EGL.

If you do this, you have to rebuild wxWidgets with:

  • --disable-glcanvasegl if using configure script
  • wxUSE_GLCANVAS_EGL=OFF if using CMake

Well I use Arch. So pretty much all packages are very recent.
This is my info:

Application: KiCad x86_64 on x86_64
Version: 8.0.5, release build
Libraries:
    wxWidgets 3.2.6
    FreeType 2.13.3
    HarfBuzz 9.0.0
    FontConfig 2.15.0
    libcurl/8.10.0 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0 nghttp3/1.5.0
Platform: Arch Linux, 64 bit, Little endian, wxGTK, Wayland, KDE, wayland

Running KiCad with GDK_BACKEND=x11 did the trick to force X11 mode. The dead giveaway is that in Wayland mode, you get the default Wayland icon on all app windows. In X11 mode (through XWayland), you get app icons back.

In X11 mode, the issues I mentioned above do not happen. So that confirms it’s specific to “native” Wayland mode.

(Unfortunately, there’s currently a big performance regression in amdgpu that makes some apps using XWayland to have huge GUI lags, and KiCad is one of them. So the X11 backend is currently not an option on Wayland until amdgpu gets fixed, which should be soon now.)

Of course you’re unlikely to run into these issues if you use a more conservative distro. But if anyone else is concerned, hope that’ll help. And I hope wxWidgets will eventually play much better with Wayland. I understand that the Wayland project itself doesn’t make it all that easy.

I also use arch linux (hyprland window manager with linux) so I’ve been wondering if it was a known issue. Issues are just something you have to put up with on wayland (though kicad on windows definitely has its issues, such as the giant windows bug i encounter all the time, and the broken crash detection that reopens kicad when i close it lol). At least you can work around it by opening a new instance and running the footprint editor there. Why does it only do it for the footprint editor and not the pcb editor, though?