Espanso: Espanso Freezes the entire desktop when expanding a match

Created on 14 Apr 2020  路  11Comments  路  Source: federico-terzi/espanso

Every time espanso finds a matching expansion I cannot interact with the desktop for 5-10 seconds, but the mouse cursor still moves.
Most of the time this happens the trigger text is not completely erased.
Espanso's own logs and journalctl were of not much use debugging this.
Tried using clipboard, auto and inject for the backend; same result.

Info:
pt-br keyboard layout

sb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:   bionic

gnome-shell --version
GNOME Shell 3.28.4

echo $XDG_SESSION_TYPE 
x11

espanso dump
config.txt

Linux bug

Most helpful comment

Hey @Luctins,

I was able to reproduce the issue, and after a lot of digging it seems to be a problem related to Gnome with some keyboard layouts, including the pt-br that you are using. (See https://bugs.launchpad.net/ubuntu/+source/meta-gnome3/+bug/1777708)

In the above post, it explains a workaround:

With admin rights, edit the /usr/share/X11/xkb/symbols/br and comment out this line:

modifier_map Mod3 { Scroll_Lock };

so that it becomes:

//modifier_map Mod3 { Scroll_Lock };

Then reboot the system. Espanso should be a lot more responsive by then.

Let me know if that helps!

Cheers :)

All 11 comments

Hey @Luctins,

That is pretty strange indeed, thanks for pointing it out! Some questions for you:

  • How many matches/packages have you installed?
  • Could you please try the following procedure and see if that helps?
    Switch to a US keyboard layout, restart espanso, type any match.

Let me know if you experience problems in that case as well.

Cheers :)

examples:
On gedit:
espanso-bug
on firefox:
espanso-bug2 gif

I use:

espanso package list
basic-emojis - 0.1.0
shruggie - 0.1.0

Uninstalled all packages and tested again, same result;
Also tested with all gnome-extensions disabled, same result;

tested with US keyboard: could not interact with the desktop, and the "shell error tone" was played in quick sucession, could not recover desktop.

tested with US keyboard: could not interact with the desktop, and the "shell error tone" was played in quick sucession, could not recover desktop.

That is very strange @Luctins, I'm sorry you experienced these issues. Are you using a stock Ubuntu installation?

thanks for taking the time to help :smile:.
The only major modification that I recall was uninstalling the nouveau driver (It's a hybrid graphics laptop).
Edit: added lshw output.
log.txt

All right, thank you. I'll try to reproduce this myself and get back to you if I find something :)

Hey @Luctins,

I was able to reproduce the issue, and after a lot of digging it seems to be a problem related to Gnome with some keyboard layouts, including the pt-br that you are using. (See https://bugs.launchpad.net/ubuntu/+source/meta-gnome3/+bug/1777708)

In the above post, it explains a workaround:

With admin rights, edit the /usr/share/X11/xkb/symbols/br and comment out this line:

modifier_map Mod3 { Scroll_Lock };

so that it becomes:

//modifier_map Mod3 { Scroll_Lock };

Then reboot the system. Espanso should be a lot more responsive by then.

Let me know if that helps!

Cheers :)

Wow, that's a not very obvious issue to track down.
As you have suggested I do have 2 keyboards (It's a laptop with a USB keyboard plugged in).
Applied the suggested modification and it seems to do it, Thanks :smile:.

as a bonus, probably will make my desktop more stable overall (I was having mini freezes from time to time for a while now).
Close the issue?

You're welcome :)
I'm going to close the issue now, let me know if you have other doubts

Cheers

Was this page helpful?
0 / 5 - 0 ratings