Delay before you can type after switching input source

Bug #1754702 reported by Alejandro
This bug report is a duplicate of:  Bug #1370953: layout switch is delayed. Edit Remove
128
This bug affects 24 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Unknown
Unknown
gnome-shell (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

In ubuntu 18.04 I installed different keyboard languages: spanish latin american, japanese, japanese-ibus. To change the input method you press the selected key, and an indicator menu appears on-screen to indicate which language is selected next. The menu disapears after 2~3 seconds and during which time typing is blocked. If you type while the language input method menu is displayed, the menu will not disapear and stay as long as you type.

The language input menu should not block typing, and the disapearance of the menu should not be delayed by typing.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your report. Changing affected package to gnome-control-center.

I recall <https://askubuntu.com/q/998077>. From the discussion there we found that the input source chooser doesn't show up if you use some alternative shortcut for switching input sources, but the delay during which you can't type is still there.

There is <https://launchpad.net/bugs/1244090> which might be a duplicate bug, but I don't mark it as such since I'm not sure.

affects: language-selector (Ubuntu) → gnome-control-center (Ubuntu)
Revision history for this message
Alejandro (aleoliva) wrote :

Hello, Thanks for the information. I reviewed the information that you sent me. It is the same issue as described in the ask ubuntu question. Therefore it should be the same problem as the bug you mentioned. I have been using unity, and for 18.04 thought about moving to gnome, so this is the first time I experience it. Should I mark as duplicate of 1244090? The only new information is that it affects 18.04 too. Thanks in advance.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

That other bug is several years old, and both the code and exact behavior have changed since then, so I suggest that we keep them separate and let an experienced developer evaluate their possible relationship.

Revision history for this message
Alejandro (aleoliva) wrote :

I also do not know about the code, but I tested ubuntu mate 18.04 and ibus. Here a similar menu appears, but there is no delay when typing and changing input method. Maybe it could be a hint to fix the bug.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I changed the bug title a bit to reflect the known observations.

summary: - input method on-screen animation prevents typing
+ Delay before you can type after switching input source
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergey Valitov (valitov.st) wrote :

The other day installed ubuntu 18.04, and there is this bug. Please correct. It is impossible to work.

Revision history for this message
Bogdan Dukhevych (dukhevych) wrote :

Same issue. Very annoying bug.

Revision history for this message
kongbeng13 (kongbeng3000) wrote :

i am use key "WIN + SPACE", and have problem about this bug.

now i can fix, it look like ubuntu delay if you use key "fn", "Win", "Super".

i try to change change layout by use "crtl+space", now it so fast.

may be help you.

affects: gnome-control-center (Ubuntu) → gnome-shell (Ubuntu)
Revision history for this message
Victor Porton (porton) wrote :

I have Ubuntu Gnome with English and Russian.

When I click Meta+Space quickly, the "indicator menu" does NOT appear. But the input is blocked for an about a half of a second or a second.

Revision history for this message
nickname (icognac) wrote :

Same problem. In syslog after layout switching I can see:

org.gnome.Shell.desktop[1470]: Window manager warning: Overwriting existing binding of keysym 68 with keysym 68 (keycode 2b).

Revision history for this message
sphericalhorse (sphericalhorse) wrote :

I'm using CapsLock to switch keyboard layouts, and I'm also affected by this bug.
I believe that now the priority of this bug is underestimated, because most of the people use one and sometimes two layouts, so they may not face with this problem often and assume that it's not so important. But when you live in a bilingual country and use 3 layouts all the time (I'm using UA/RU/EN), this problem becomes super annoying.
For me personally, it's the biggest reason why I'm not going to upgrade Ubuntu from 16.04 to 18.04 on my work PC.

I came here from https://bugs.launchpad.net/bugs/1790335, and it seems like that bug is also
a duplicate of the current bug.

Revision history for this message
Iliya (my-working) wrote :

I faced this issue too. Also I found that default layout switcher is very restrictive. For example I сouldn't set right Alt or Caps Lock keys to switch layout.

However I found workaround with gnome-tweaks. Setting layout switcher as described here https://askubuntu.com/a/1029605 solved all these problems for me.

Revision history for this message
Plamen (plamen-shkodrov) wrote :

The issue persist after changing it with tweak. I'm using Shift + Alt for years. But after language switch it always takes 1-2 seconds. No screen freezing or anything. Just the language takes time to change. As mentioned above, very annoying if you have to change languages frequently.

Revision history for this message
Alejandro (aleoliva) wrote :

I have one more update. I could not use ubuntu 18.04 with this bug, so since then, I have been working on ubuntu 16.04 with unity. Yesterday I tried ubuntu 19.04 on a live usb and after configure to my usual setting, the bug was not present. I proceeded to install in on my computer, and I found the bug again. I tried the same procedure and I got the same results. Therefore, I am guessing it could be some configuration file somewhere. After backing up my files, I did a clean install and now the bug is nowhere to be found. I could not determine what it was, but I am thinking it was something in the transition to gnome was not compatible. I am using 19.04 with no problem now, working perfectly and very surprised at how much the desktop has evolved in over a year. Beautiful and fast! kudos to everyone involved. I originally filed this bug, so I am not sure if it can be marked as not in disco dingo. Thanks

Revision history for this message
Dmitry Chumak (megavenik) wrote :

> I originally filed this bug, so I am not sure if it can be marked as not in disco dingo

If upgrading the existing system to 19.04 does not fix the issue, I don't think that 19.04 could be marked as "unaffected". We need to find that configuration and make if fixable within usual upgrade process, not just by reinstalling OS every time praying for different bugs to just disappear:)

Revision history for this message
George Sgouros (sgouros) wrote :

Please let me add up to those who consider this bug as greatly underestimated.

This bug forces all bilingual users who use a custom keyboard layout shortcut to EITHER:

1. change their workflow (e.g. set a different combination for language layout change) OR
2. use a different Linux version

With the current bug in existence, doing any meaningful work with Ubuntu is absolutely impossible.

And IMHO bilingual users who use a custom keyboard layout are plenty...

Revision history for this message
Oleg (olegyam) wrote :

Hi!

I've made a workaround python script which switches layout itself using `gsettings` command. Apparently, it helped some people reduce the delay (including myself), so I'm going to post it here. Though, I don't know why it works.

https://github.com/yamnikov-oleg/switch-layout

Revision history for this message
Iain Lane (laney) wrote :

Can someone please give instructions for how to reproduce this bug from a clean install of Ubuntu? I've tried changing the key binding in Tweaks but it doesn't happen here.

Revision history for this message
Timur I. Davletshin (timur-davletshin) wrote :

Have you tried removing default 400 ms switcher delay?

gsettings set org.freedesktop.ibus.general switcher-delay-time -1

Revision history for this message
Timur I. Davletshin (timur-davletshin) wrote :

#20 — well, it worked for me.

Revision history for this message
Dmytro Korzhevin (korg) wrote :

Better to use:

gsettings set org.freedesktop.ibus.general switcher-delay-time -10

Revision history for this message
Dmytro Korzhevin (korg) wrote :

Problem still exist in Ubuntu 19.10

Revision history for this message
Klyshko Nikita (n-klyshko) wrote :

Also have this issue on Ubuntu 18.04.

Revision history for this message
Stanislav (gurland) wrote :

I just have installed Ubuntu 20.04 and this bug is still there (after switching layout everything on system freezes on a second). I had created question on askubuntu for 19.10 version https://askubuntu.com/questions/1211801/ubuntu-19-10-change-keyboard-language-freeze with video that displays freeze https://youtu.be/zIb2p1n80pA

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

This is probably something which needs to be fixed upstream. If you have any useful information to add to the upstream issue, please do so.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1154

tags: added: bionic focal performance
Revision history for this message
Gimly (vgimly) wrote (last edit ):

After long time after upgrade 18.04 -> 20.04 finally solved this bug.

In 18.04 before upgrade switching key was caps-lock. After upgrade - caps-lock still switch layout, but floating indicator windows RU|EN appears on the screen which eats keys pressed for 1 second and sometimes switches caps-lock mode instead or with layout change.

Solution is:
1. Go Settings, keyboard shortcuts, set layout switch combination to "Super + Space" (was CapsLock).
Настройки -> Комбинации клавиш -> Переключиться на следующий источник ввода -> Win+пробел
2. Go dconf editor, search org.gnome.desktop.input-sources xkb-options
Change its value from: 'grp:alt_shift_toggle' to 'grp:caps_toggle'.
3. PROFIT:

a) Layout correctly switches with Caps-Lock key. Fast. No delays. No indicator window appear. No keystrokes lost. No CapsLock mode accidental switch.
b) Caps-Lock mode can be switched with Shift+Caps-Lock, without layout change.
c) Win+Space worked as well: QUICK press - no indicator appears. If you hold Win key more then 400 ms after space - then indicator window appears - and you can cycle layouts by pressing space multiple times (holding win key).

Revision history for this message
sphericalhorse (sphericalhorse) wrote :

#27 Are you using Xorg session or Wayland session? Because I still have this problem present on 20.04 with Xorg session, and as I read somewhere, it was solved for Wayland.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.