Anki 2.1.50 does not run [xkbcommon issue under linux]

Recently, I have updated to Anki 2.1.50 in my Manjaro. Actually, I have installed anki-bin as the other versions didn’t show me the Deck without running with --disable-seccomp-filter-sandbox option.

Whenever I run the new installed anki-bin, I get the following error:

Running with temporary Qt5 compatibility shims.
Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
Preparing to run...
Qt info: 

GLImplementation: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.6
Using Default SG Backend: yes
Using Software Dynamic GL: no
Using Angle: no

Init Parameters:
  *  application-name Anki 
  *  browser-subprocess-path /usr/lib/qt6/QtWebEngineProcess 
  *  create-default-gl-context  
  *  disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  in-process-gpu  
  *  use-gl desktop 
 
xkbcommon: ERROR: Couldn't process include statement for 'us(pes_keypad)'
xkbcommon: ERROR: Abandoning symbols file "(unnamed)"
xkbcommon: ERROR: Failed to compile xkb_symbols
xkbcommon: ERROR: Failed to compile keymap
[1766840:1766896:0420/123027.815937:FATAL:xkb_keyboard_layout_engine.cc(640)] Keymap file failed to load: us-pes_keypad
fish: Job 1, 'anki' terminated by signal SIGTRAP (Trace or breakpoint trap)

I have found an awkward solution to my issue, and that’s changing my keyboard to another layout and then rerunning it! This behavior is so weird and annoying.

Is there any issue with my OS or the Anki?

1 Like

Added to Certain keyboard layouts cause Anki to crash on startup · Issue #1814 · ankitects/anki · GitHub

1 Like

In the meanwhile, from what I can tell, it’s not the layouts themselves, but the order they are set to xkb.
In my xkb.conf I had

Layout  = "us,eu"
Variant = "colemak,"

working fine, but reversed

Layout  = "eu,us"
Variant = ",colemak"

produced an error.

When booting up Anki, the latter xkb-config caused trying to compile a keymap eu(colemak) which does not exist on the system instead of the correct us(colemak), I guess failing to parse the empty variant as the default variant. In your case it’s trying to load us(pes_keypad) when the correct should be ir(pes_keypad) .

If you can login with ir-layout, you could reduce the awkwardness a tad by reversing the layout and variant settings, and passing -option grp:ctrls_toggle or similar to setxkbmap, and then changing to your preferred layout after login by pressing both ctrl’s, or which ever toggle method you choose.

You can take a look at all the available settings by man xkeyboard-config and the section ‘Options, Switching to another layout’

1 Like