Not the selected menu under wayland

Every time I select a menu item somewhere in KiCad (project, schem-editor,etc ), it always drops down the first item. So in the screenshot I click on “Voorkeuren” and it opens “Bestand”. (sorry it’s in dutch)

I’m running cachy os (Arch Linux derivative), so the latest stuff. I’m running KDE on wayland. KDE on X doesn’t have this issue.

Is this a known issue?

My understanding is that wayland has problems. Please see:

Yes, I hear you. That page also tells KiCads starts / runs on xwayland, which is outdated info I believe. xprop doesn’t react on KiCad, the quickest way I can see if it’s on xwayland. Also wxwidgets is compiled against wayland gtk libs.

Okay, no quickfix. I might try to recompile with some other options than the standard in Arch package or try other distro in a virtual machine.

I personally use Fedora with XFCE (X11). That combination works quite well but I don’t know how it would behave in a VM on a wayland system.

  • Check on native GTK3 apps.
  • Check on wxWidgets samples.
  • Check on Gnome, Weston, Sway, etc.
  • Check with GDK_BACKEND=x11 (KiCad sets it automatically if built with GLX backend so uses XWayland).
  • Report to respective projects.

Thanks for the list. Maybe I can narrow it down with that list.

The Arch Linux package uses this:
cmake
-B build
-S “$pkgname”
-G Ninja
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_INSTALL_PREFIX=/usr
-D KICAD_USE_EGL=ON
-D KICAD_USE_BUNDLED_GLEW=OFF
-D KICAD_BUILD_I18N=ON
-D KICAD_I18N_UNIX_STRICT_PATH=ON
-D KICAD_BUILD_QA_TESTS=OFF
-W no-dev

So KICAD_USE_EGL=ON is kinda the opposite of GDK_BACKEND=x11

That might be the issue then.
Gentoo forces KICAD_USE_EGL=OFF, this use to be a use-flag issue but bugs started to appear (wx was teh root cause) and so this was removed as an option.

I remeber this as I was going through the bug with gentoo dev’s. Kicad works fine in wayland for me (be it via Xwayland)

Ah nice find on the Gentoo package. Thanks.

Turns out I don’t use much gtk apps lately.

I found Inkspace and Guitarix on my system, they’re built on gtk-3.0 and gtk-2.0. Both have the same issue with the menu.

I also tried Cosmic and Hyprland. Issue remains the same under Hyprland, but works with Cosmic. I must say Cosmic is nice, but zooming with the mouse doesn’t work as smooth as with kde plasma.

So looks like a gtk quirck. KiCad functions very good overall for the rest of the stuff.

bascially EGL is needed for wayland and GLX for X11.
wx is still flaky with wayland :frowning: so several distro’s (fedora, gentoo) force x11 until this is fixed

GLX is X11-only
EGL supports both Wayland and X11 (althrough EGL support in wxWidgets is less mature)

Yes but if you have egl support and on Wayland then we will "attempt " to use Wayland and this is where the issue is
Glx is the only way to reliably force x11

Launching kicad like GDK_BACKEND=x11 kicad is also a way to reliably force X11

yes

GDK_BACKEND=x11 kicad

does start KiCad via xwayland and then the menu works under KDE plasma.

I was trying “export GDK_BACKEND=x11” in a fish shell, that probably doesn’t work or I typed something wrong.