Cinnamon: Keyboard layout applet crashes.

Created on 3 Jan 2019  ·  3Comments  ·  Source: linuxmint/cinnamon

At a seemingly random point during the Cinnamon session the keyboard layout applet disappears and cannot be loaded anymore. The keyboard shortcut to switch between layouts stops working too.
I'm pretty sure it's something related to the xapps library, which is why I opened an issue in its repository: https://github.com/linuxmint/xapps/issues/63 . I thought of opening one here too just for reference for anyone experiencing this.

Configuration:

  • Cinnamon version: 4.0.8
  • Distribution: Arch
  • Graphic card and driver: Intel HD Graphics 620, driver i915
  • Linux 4.18, 64 bit

Relevant .xsession-error:

Cjs-Message: 19:13:16.380: JS LOG: Unknown network device type, is 14
Cjs-Message: 19:13:16.392: JS LOG: Unknown network device type, is 13
Cjs-Message: 19:13:16.392: JS LOG: Unknown network device type, is 13
Cinnamon warning: Log level 8: xapp_kbd_layout_controller_get_current_group: assertion 'controller->priv->enabled' failed

(cinnamon:1043): Cjs-WARNING **: 19:13:45.953: JS ERROR: TypeError: item is undefined
_syncGroup@/usr/share/cinnamon/applets/[email protected]/applet.js:265:9

Cinnamon warning: Log level 8: xapp_kbd_layout_controller_get_current_group: assertion 'controller->priv->enabled' failed

(cinnamon:1043): Cjs-WARNING **: 19:13:45.954: JS ERROR: TypeError: item is undefined
_syncGroup@/usr/share/cinnamon/applets/[email protected]/applet.js:265:9

Cinnamon warning: Log level 8: xapp_kbd_layout_controller_get_current_group: assertion 'controller->priv->enabled' failed

(cinnamon:1043): Cjs-WARNING **: 19:13:45.954: JS ERROR: TypeError: item is undefined
_syncGroup@/usr/share/cinnamon/applets/[email protected]/applet.js:265:9

Cinnamon warning: Log level 8: xapp_kbd_layout_controller_get_current_group: assertion 'controller->priv->enabled' failed

(cinnamon:1043): Cjs-WARNING **: 19:13:45.954: JS ERROR: TypeError: item is undefined
_syncGroup@/usr/share/cinnamon/applets/[email protected]/applet.js:269:9

Cinnamon warning: Log level 8: xapp_kbd_layout_controller_get_current_group: assertion 'controller->priv->enabled' failed

(cinnamon:1043): Cjs-WARNING **: 19:13:45.954: JS ERROR: TypeError: item is undefined
_syncGroup@/usr/share/cinnamon/applets/[email protected]/applet.js:269:9


(cinnamon:1043): Cjs-CRITICAL **: 19:13:47.841: JS ERROR: SyntaxError: unterminated character class @ /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:3251

Most helpful comment

Hi @pviotti , thanks for the script, switching worked for me, after adapting to my layouts.. funnily enough, I didn't have your problem (I was debugging something unrelated - one shortcut press for switching layouts switches 2/skips one), but now my keyboard indicator dissappeared after using your script for the first time (with correct layouts), and not even a cinnamon restart, or removing/adding the applet will bring it back. I'll try a re-login, and then a restart. I'm just writing it here as a warning for other people running cinnamon 4.2.4+tina with a working keyboard layout applet. :)
EDIT: what fixed it for me:
1) in keyboard settings, click "reset to default"
2) right-click on a panel, and edit panel. Keyboard layout icon will appear, as a keyboard. Right-click it, and remove that applet.
3) log out, and log back in (that was enough for me, but I could try and reproduce it)
4) re-create the layouts
5) add the keyboard applet again.
Good news is that my original problem is now also resolved :)

All 3 comments

In case anyone needs it, here is a simple script that can be used as workaround to switch between keyboard layouts.

#!/bin/bash
# Simple script to switch between Irish and Italian keyboard layouts

current=`setxkbmap -print | awk -F"+" '/xkb_symbols/ {print $2}'`
case $current in
    ie)
        setxkbmap it
        ;;
    it)
        setxkbmap ie
        ;;
esac

Hi @pviotti , thanks for the script, switching worked for me, after adapting to my layouts.. funnily enough, I didn't have your problem (I was debugging something unrelated - one shortcut press for switching layouts switches 2/skips one), but now my keyboard indicator dissappeared after using your script for the first time (with correct layouts), and not even a cinnamon restart, or removing/adding the applet will bring it back. I'll try a re-login, and then a restart. I'm just writing it here as a warning for other people running cinnamon 4.2.4+tina with a working keyboard layout applet. :)
EDIT: what fixed it for me:
1) in keyboard settings, click "reset to default"
2) right-click on a panel, and edit panel. Keyboard layout icon will appear, as a keyboard. Right-click it, and remove that applet.
3) log out, and log back in (that was enough for me, but I could try and reproduce it)
4) re-create the layouts
5) add the keyboard applet again.
Good news is that my original problem is now also resolved :)

Just to cross reference.
@camypaj's comment helped me resolve that issue: #7792, at least for me.
Nice one mate :+1: hope it can help others.

Was this page helpful?
0 / 5 - 0 ratings