195

Could you help me with hell of a weird issue? I use Intellij IDEA 13 on Ubuntu 14.04, and from time to time my keyboard completely (yep, completely, it's not about shortcuts) locks in IDEA. I still can do anything I want in IDEA with my mouse, also I can use the keyboard everywhere else except IDEA. And it can be fixed only by restarting IDEA so far.

Can anybody give a hint, please?

Ann Kilzer
  • 183
  • 2
  • 8
Treble Snake
  • 2,053
  • Can it be that your keyboard is simply being captured by some field inside IntelliJ? Is it a random thing or does something specific trigger it? – Ruraj Jul 24 '14 at 07:08
  • I don't think some field can capture keyboard like that, but I'll check it more precisely next time. And it seems to be random thing. – Treble Snake Jul 24 '14 at 11:10
  • 4
    My collegue and I are experiencing precisely the same thing (same OS and IntelliJ 13.1.4). I have to restart IntelliJ once every few hours (I'm able to use Alt-F4, though) - extremely annoying. I also find it to happen completely randomly. Last time I was in the middle of editing an HTML file. Not while pressing a shortcut. – bisgardo Jul 24 '14 at 12:28
  • I had two instances of IntelliJ running and they both froze. Don't know if it's relevant, but when I close the IDE, detaching a running application server normally takes very short time. After a freeze happens, I have to cancel that because it doesn't seem to finish. – bisgardo Jul 24 '14 at 12:34
  • Open IDEA log file idea.log from menu Help > Show Log in Files and look, what exceptions are thrown out. I have a same problem, but, unfortunately, I couldn't find information on it. If you don't find the solution, address in IDEA bugtracker. – injecto Sep 02 '14 at 09:41
  • @injecto OK, thanks for the advice. I'll do it next time the bug appears. – Treble Snake Sep 02 '14 at 14:28
  • I have had this problem too suddenly keyboard shortcut does not work (Intellij Idea 13 in Ubuntu 14.04) – Saeed Zarinfam Oct 06 '14 at 16:49
  • 3
    This is a Java issue that effects other Java Swing GUI's including SOAP UI. "ibus-daemon -rd" fixes the issue as well – rjdkolb Feb 09 '16 at 12:02
  • I had similar problem with IntelliJ IDEA 2016 Build IU 145.597 with Ubuntu 14.04. Using this code in console: ibus-daemon -rd it worked for me ! – JPacheco Apr 27 '16 at 19:04
  • Check out this bug: https://youtrack.jetbrains.com/issue/IDEA-23472 Killing ibus-deamon process fixed it for me. – Nevena Oct 15 '14 at 08:44

4 Answers4

248

There is a an open issue in jetbrains youtrack for intellij idea that recommend two solutions:

  1. Keyboard input may be unlocked by restarting IBus daemon from a console:

    ibus-daemon -rd
    
  2. IBus can be disabled for IDEA by unsetting env. variable XMODIFIERS, but ability to input national characters in IDEA will be lost:

    XMODIFIERS="" idea.sh
    

I have used the second one and fixed my problem.

  • 27

    "ibus-daemon -rd" from a console.

    That worked! Great-great thanks!)

    – Treble Snake Oct 23 '14 at 08:37
  • 6
    6 months later, Option 1 is no longer recommended as it may cause JVM crash :/ – mike May 01 '15 at 14:57
  • 2
    What do you mean national characters, @Mike, it worked for me today June the 2th – Abderrahmane TAHRI JOUTI Jun 02 '15 at 09:05
  • @AbderrahmaneTAHRIJOUTI Yes, it works; it's just that it's not a long term solution as it might cause JVM crashes (some users have reported it in the open issue). – mike Jun 02 '15 at 10:15
  • 24
    "ibus-daemon -rd" - I'm seriously considering to tattoo this on my arm. – Balázs Németh Jun 17 '15 at 13:24
  • @BalázsMáriaNémeth Better yet, is to open keyboard settings, and add the command to a custom keyboard combination; just tested it with my Alt+Shift+Ctrl+*, for instance. ;) – andersoyvind Jun 19 '15 at 08:17
  • 1
    "ibus-daemon -rd" is love – Daniela Morais Jul 30 '15 at 16:06
  • 4
    Last update on the issue (Jun 17 2015) recommends to export IBUS_ENABLE_SYNC_MODE=1 – Nacho Coloma Sep 23 '15 at 12:01
  • Interesting facepalm moment: Adding 'XMODIFIERS="" idea.sh' to your bashrc opens IDEA each time a new shell window opens -- so 5 copies for me at startup. Need to add export: 'export XMODIFIERS="" idea.sh' . – user48956 Mar 22 '16 at 19:05
  • I'm having the same issue with IDEA 2018.3 on Ubuntu 18.04, and can confirm that the suggested fix still works. – Jorn Mar 04 '19 at 12:33
  • confirmed on 20.04. Another fix is to open Language Support and set Keyboard input method system to none. – Evan Apr 24 '20 at 20:55
  • I'm going with pkill -f ibus-daemon... I have had lockups about 5x per day... for weeks... on Ubuntu 18.04 with the latest Intellij 2020 download... I really don't care about a silly Ibus feature... I care a LOT about Intellij working reliably. – developer.g May 18 '20 at 10:07
14

I was able to solve it with what I found here that is basically adding export XMODIFIERS="" on idea.sh

Alfergon
  • 529
10
  1. Temporary solution: simply execute ibus-daemon -rd on the terminal.
  2. Permanent solution: the 01 Oct 2015 update on the issue recommends to:

Either upgrade IBus to version 1.5.11 or add export IBUS_ENABLE_SYNC_MODE=1 to your ~/.profile, then restart a session.

Alternatively, you can turn off IBus at System Settings | Language Support | Keyboard input method.

IDEA 15 will show a warning if an incompatible version of IBus is in use.

Alex
  • 306
  • 1
  • 3
  • 12
1

I've tried this out and its working so far but I'll update if it freezes up again. I've seen a suggestion on youtrack that suggests to turn off iBus which seems to interfere particularly because of it's use of the ctrl + space shortcut to change language settings. You can do that by going to:

language support > keyboard input method system > none

enter image description here

**** UPDATE *****

After running it for a while this technique still didn't work as I kept freezing. I guess for now I'll stick to the following workaround to restart ibus which is a bit inconvenient but what can you do.

go into terminal

type:

ibus-daemon -rd