# Automatic Keyboard Layout Switcher stopped working

**URL:** <https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227>\
**Category:** Budgie Applets\
**Created:** [July 2, 2019, 4:45pm UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227 "2019-07-02T16:45:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mili](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mili](https://discourse.ubuntubudgie.org/u/mili)\
**Post date:** [July 2, 2019, 4:45pm UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/1 "2019-07-02T16:45:23Z")

</div>

Hi,

My favorite feature, Automatic Keyboard Layout Switcher stopped working.  
I tried removing, adding, uninstalling, installing, etc. but without success.  
When I add it to the panel it’s not shown (doesn’t work either, I thought it’s icon problem).

Does anybody have an idea how to re-enable it?

---

<div class="post-metadata">

**Author:** ![fossfreedom](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.ubuntubudgie.org/fossfreedom/32/1405_2.png) [@fossfreedom](https://discourse.ubuntubudgie.org/u/fossfreedom)\
**Post date:** [July 2, 2019, 4:59pm UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/2 "2019-07-02T16:59:00Z")

</div>

Sounds odd.

From a terminal please run

```
budgie-panel --replace &

```

Then add the applet to the panel. Any errors or warnings displayed in the terminal?

---

<div class="post-metadata">

**Author:** ![mili](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mili](https://discourse.ubuntubudgie.org/u/mili)\
**Post date:** [July 2, 2019, 5:03pm UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/3 "2019-07-02T17:03:14Z")

</div>

Thanks for quick reply.  
There are CRITICAL messages.

(budgie-panel:10354): Gtk-CRITICAL \*\*: 19:01:01.255: gtk\_widget\_destroy: assertion ‘GTK\_IS\_WIDGET (widget)’ failed  
Traceback (most recent call last):  
File “/usr/lib/budgie-desktop/plugins/budgie-keyboard-autoswitch/budgie-keyboard-autoswitch.py”, line 64, in do\_get\_panel\_widget  
return KeyboardAutoSwitchApplet(uuid)  
File “/usr/lib/budgie-desktop/plugins/budgie-keyboard-autoswitch/budgie-keyboard-autoswitch.py”, line 122, in **init**  
open(lang\_datafile).read().strip()  
File “/usr/lib/python3.7/ast.py”, line 46, in literal\_eval  
node\_or\_string = parse(node\_or\_string, mode=‘eval’)  
File “/usr/lib/python3.7/ast.py”, line 35, in parse  
return compile(source, filename, mode, PyCF\_ONLY\_AST)  
File “”, line 0

```
^

```

SyntaxError: unexpected EOF while parsing  
sys:1: Warning: invalid (NULL) pointer instance  
sys:1: Warning: g\_signal\_emit\_by\_name: assertion ‘G\_TYPE\_CHECK\_INSTANCE (instance)’ failed

(budgie-panel:10354): Gtk-CRITICAL \*\*: 19:01:18.065: gtk\_box\_pack: assertion ‘GTK\_IS\_WIDGET (child)’ failed

(budgie-panel:10354): Gtk-CRITICAL \*\*: 19:01:18.065: gtk\_container\_child\_set\_valist: assertion ‘GTK\_IS\_WIDGET (child)’ failed

(budgie-panel:10354): Gtk-CRITICAL \*\*: 19:01:27.492: gtk\_widget\_get\_parent: assertion ‘GTK\_IS\_WIDGET (widget)’ failed

(budgie-panel:10354): Gtk-CRITICAL \*\*: 19:01:27.492: gtk\_container\_foreach: assertion ‘GTK\_IS\_CONTAINER (container)’ failed

---

<div class="post-metadata">

**Author:** ![mili](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mili](https://discourse.ubuntubudgie.org/u/mili)\
**Post date:** [July 2, 2019, 5:05pm UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/4 "2019-07-02T17:05:41Z")

</div>

![Screenshot%20from%202019-07-02%2019-05-05](https://canada1.discourse-cdn.com/flex035/uploads/ubuntubudgie/original/2X/2/29c9209218ec663342a2bbf290f03894acb7fc5a.png)

---

<div class="post-metadata">

**Author:** ![fossfreedom](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.ubuntubudgie.org/fossfreedom/32/1405_2.png) [@fossfreedom](https://discourse.ubuntubudgie.org/u/fossfreedom)\
**Post date:** [July 2, 2019, 8:46pm UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/5 "2019-07-02T20:46:41Z")

</div>

What are the file-sizes for the two files in ~.config/budgie-extras/langswitch ?

If they are not zero bytes - what are the contents?

If they are zero bytes in size then please delete the zero byte size file(s)

---

<div class="post-metadata">

**Author:** ![mili](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mili](https://discourse.ubuntubudgie.org/u/mili)\
**Post date:** [July 2, 2019, 9:09pm UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/6 "2019-07-02T21:09:38Z")

</div>

Output:

- lang\_data -\> empty
- default\_lang -\> “us”

I’ve deleted both, re-added applet to the panel and **it works again**.

Thank you!

We have a solution if it happens again. If you know the cause please share.  
It’s great applet by the way.  
I’m using multiple inputs and I had to change it several dozen times per hour before I found this.

---

<div class="post-metadata">

**Author:** ![janw](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@janw](https://discourse.ubuntubudgie.org/u/janw)\
**Post date:** [September 11, 2021, 7:46am UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/7 "2021-09-11T07:46:31Z")

</div>

The Debian/Ubuntu package budgie-keyboard-autoswitch-applet is missing a reference to xdotool (this is the cause of the python exception).

Fix with:

```auto
sudo apt install xdotool

```

I have also noticed that after budgie-keyboard-autoswitch-applet started working, the standard Keyboard Layout applet does not get updated when Autoswitcher changes the layout. Thus Keyboard Layout applet shows incorrect layout info.

---

<div class="post-metadata">

**Author:** ![fossfreedom](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.ubuntubudgie.org/fossfreedom/32/1405_2.png) [@fossfreedom](https://discourse.ubuntubudgie.org/u/fossfreedom)\
**Post date:** [September 11, 2021, 7:56am UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/8 "2021-09-11T07:56:06Z")

</div>

Which version of the package are you using?

---

<div class="post-metadata">

**Author:** ![janw](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@janw](https://discourse.ubuntubudgie.org/u/janw)\
**Post date:** [September 11, 2021, 7:57am UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/9 "2021-09-11T07:57:50Z")

</div>

Package: budgie-keyboard-autoswitch-applet  
Version: 1.1.0-1  
Priority: optional  
Section: misc  
Source: budgie-extras

But I’m not on Ubuntu, I have Debian Bookworm (amd64). I have just filled a bug report to Debian.

---

<div class="post-metadata">

**Author:** ![fossfreedom](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.ubuntubudgie.org/fossfreedom/32/1405_2.png) [@fossfreedom](https://discourse.ubuntubudgie.org/u/fossfreedom)\
**Post date:** [September 11, 2021, 8:01am UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/10 "2021-09-11T08:01:45Z")

</div>

Bookworm will be getting v1.3 soon and xdotool will be a dependency.

The other observation should be filed here please

> **[GitHub - UbuntuBudgie/budgie-extras: Additional Budgie Desktop enhancements...](https://github.com/ubuntubudgie/budgie-extras)**
>
> Additional Budgie Desktop enhancements for user experience - GitHub - UbuntuBudgie/budgie-extras: Additional Budgie Desktop enhancements for user experience

---

<div class="post-metadata">

**Author:** ![janw](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@janw](https://discourse.ubuntubudgie.org/u/janw)\
**Post date:** [September 11, 2021, 8:24am UTC](https://discourse.ubuntubudgie.org/t/automatic-keyboard-layout-switcher-stopped-working/2227/11 "2021-09-11T08:24:31Z")

</div>

I have filled an issue on the github about the Keyboard Layout applet showing wrong layout info.

Thank you,  
Jan W
