Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Keyboard stops working (Linux)

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 24 Aug, 2010 11:31:06

Message: 1 of 16

Why could be the reason for Matlab/Ubuntu suddenly ignoring keystrokes at its seeming behest, while *every* other program continues to accept keyboard input unabated?

Subject: Keyboard stops working (Linux)

From: Steven_Lord

Date: 24 Aug, 2010 13:42:33

Message: 2 of 16



"Matthias " <matthew.goddard@bcf.uni-freiburg.de> wrote in message
news:i50ahq$8bd$1@fred.mathworks.com...
> Why could be the reason for Matlab/Ubuntu suddenly ignoring keystrokes at
> its seeming behest, while *every* other program continues to accept
> keyboard input unabated?

With this limited information, I have no idea.


What version of MATLAB are you using?
What version of Ubuntu?
What specifically are you doing (working with the Desktop, working with a
figure window, running code, etc.) when this problem occurs?
How long does the problem persist? Does it last until you kill and restart
MATLAB, or does it only last for a shorter period of time?
What functions are you using in your work when the problem occurs? Any
MEX-files? Any programs that you run using SYSTEM, DOS, UNIX, or the bang
operator (!)?
What else is running (including any system processes that you don't normally
think about when you think of "running" applications) when the problem
occurs?


You should probably contact Technical Support with the above information and
ask them for help investigating.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 24 Aug, 2010 14:05:08

Message: 3 of 16

Thanks for your response. I'll try to address your questions one by one:

> What version of MATLAB are you using?
R2009b

> What version of Ubuntu?
10.04, 64-bit

> What specifically are you doing (working with the Desktop, working with a
> figure window, running code, etc.) when this problem occurs?
This can happen either by switching (Alt-Tab) between windows *within* Matlab, or switching windows between Matlab and other apps.

> How long does the problem persist? Does it last until you kill and restart
> MATLAB, or does it only last for a shorter period of time?
Restarting Matlab is the only way to restore keyboard use to Matlab

> What functions are you using in your work when the problem occurs? Any
> MEX-files? Any programs that you run using SYSTEM, DOS, UNIX, or the bang
> operator (!)?
The prob is unrelated to the running of any script. AFAIK it is related only to the switching of focus between windows

> What else is running (including any system processes that you don't normally
> think about when you think of "running" applications) when the problem
> occurs?
Nothing out of the ordinary whatsoever. This can happen if I have 10+ apps running, or if I only have Matlab running. I have a language daemon (IBus) that loads on startup, but this is unrelated AFAIK because I don't normally have to switch input languages from Mandarin to English while using Matlab; and I have tested switching, which makes no difference. Also, keyboard layout is the standard US default, and switching to German for e.g., doesn't offer a solution.
 
> You should probably contact Technical Support with the above information and
> ask them for help investigating.
Ok I will wait and see if this develops further and if not then I will contact tech support.
Cheers :)

> --
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: Keyboard stops working (Linux)

From: Andy

Date: 24 Aug, 2010 14:13:04

Message: 4 of 16

Do you use Compiz or other desktop effects? If so, turn them off and see if you can reproduce the keyboard problems.

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 25 Aug, 2010 07:16:10

Message: 5 of 16

"Andy " <myfakeemailaddress@gmail.com> wrote in message <i50k1g$skr$1@fred.mathworks.com>...
> Do you use Compiz or other desktop effects? If so, turn them off and see if you can reproduce the keyboard problems.

Ok, thanks, I'll try this and see if it's related.

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 25 Aug, 2010 11:08:03

Message: 6 of 16

Update:

Ok, that's twice now this morning, within the space of one hour that keyboard input stopped in Matlab. On both occasions this happened after having pressed the Tab key (auto complete) for the nth time while inside the command line.

Subject: Keyboard stops working (Linux)

From: Steven_Lord

Date: 25 Aug, 2010 13:57:37

Message: 7 of 16



"Matthias " <matthew.goddard@bcf.uni-freiburg.de> wrote in message
news:i52tij$hkg$1@fred.mathworks.com...
> Update:
> Ok, that's twice now this morning, within the space of one hour that
> keyboard input stopped in Matlab. On both occasions this happened after
> having pressed the Tab key (auto complete) for the nth time while inside
> the command line.

Was the text located immediately before the cursor when you pressed Tab
something that would have a large number of potential completions? I'm
thinking something like a single character, maybe 't' or 's'? I'm trying to
determine if MATLAB appears to have stopped responding because it's busy
working to generate a large list of completions.

Still, if that were the case I would expect it to return with a message that
there are many, many completions after a short while. What would you
estimate to be the longest time (10 seconds, a minute, 2 minutes, 5 minutes)
you have waited for MATLAB to become responsive again before you killed it?

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Keyboard stops working (Linux)

From: Andy

Date: 25 Aug, 2010 14:06:04

Message: 8 of 16

"Matthias " <matthew.goddard@bcf.uni-freiburg.de> wrote in message <i52tij$hkg$1@fred.mathworks.com>...
> Update:
>
> Ok, that's twice now this morning, within the space of one hour that keyboard input stopped in Matlab. On both occasions this happened after having pressed the Tab key (auto complete) for the nth time while inside the command line.

Was this with or without Compiz? Do you have Tab bound to some other action? Another thought: there is a setting in Ubuntu to activate windows when you hover the mouse over them. Do you have this setting turned on? And if so, is your mouse over the MATLAB window when this problem occurs?

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 26 Aug, 2010 10:53:04

Message: 9 of 16

"Steven_Lord" <slord@mathworks.com> wrote in message <i537gh$5tf$1@fred.mathworks.com>...

> Was the text located immediately before the cursor when you pressed Tab
> something that would have a large number of potential completions? I'm
> thinking something like a single character, maybe 't' or 's'? I'm trying to
> determine if MATLAB appears to have stopped responding because it's busy
> working to generate a large list of completions.

Yes, the text was located immediately before the cursor when I pressed Tab. The number of completions was small, however, because I usually type enough for Matlab to immediately narrow down the list to my structures, and in turn, their fields. To test your idea, I have been trying tab-autocomplete following the single characters 't' 's' 'e' 'a'. It worked flawlessly, and in each produced a long list of possibilities in ~100 msec.


> What would you estimate to be the longest time (10 seconds, a minute, 2 minutes, 5 > minutes) you have waited for MATLAB to become responsive again before you killed > it?

Actually, out of impatience, I hadn't systematically tried this. Usually I would try a bunch of random keystrokes, make sure keyboard input still worked elsewhere, then restart Matlab. So perhaps ~20 sec on average. I can try waiting longer intervals during the next several occasions.

It's been almost four hours today now and and no issues yet. I'll also check the system logs for any error messages next time this happens.

Cheers

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 26 Aug, 2010 11:07:04

Message: 10 of 16

"Andy " <myfakeemailaddress@gmail.com> wrote in message <i5380c$92o$1@fred.mathworks.com>...
> "Matthias " <matthew.goddard@bcf.uni-freiburg.de> wrote in message <i52tij$hkg$1@fred.mathworks.com>...

> Was this with or without Compiz? Do you have Tab bound to some other action? Another thought: there is a setting in Ubuntu to activate windows when you hover the mouse over them. Do you have this setting turned on? And if so, is your mouse over the MATLAB window when this problem occurs?

That was with Compiz on. I still have yet to try this without Compiz effects....for me they're just so functional and I've been procrastinating turning them off :p

Tab is not bound to anything special, only the defaults, and I have no conflicts with it's use. I think I know the feature you mentioned, but hovering my mouse over any given window does not activate it by itself. For the mouse to do this I first must activate the Viewport switcher by holding down the middle mouse button, which zooms out showing all windows, then I hover the mouse over a desired window and release the mouse button to activate the chosen window.

Cheers

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 26 Aug, 2010 12:32:04

Message: 11 of 16

Update:

Keyboard stopped working in Matlab again.

As it occurred, I was typing a statement in the terminal window and used tab to autocomplete, which then made the length of the statement greater than the display width of the terminal window. It was at that point keyboard input ceased. Have not replicated this yet though.

Time of onset: 1.08pm.
Checked Ubuntu system logs: no errors for 1.08 pm
Disabled Compiz advanced graphics effects - no change
Copied and pasted text into terminal using mouse, then typed - no change
Cycled to other app windows using Alt-Tab and back to Matlab - no change
Time of Matlab restart: 2.17 pm

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 1 Sep, 2010 09:10:20

Message: 12 of 16

Just did it again. This time completely independently of the Tab key. It actually stopped accepting keyboard input when I opened the help file!

Will submit this as a bug report.

Thanks for your comments & suggestions.

Subject: Keyboard stops working (Linux)

From: Jackson Tan

Date: 3 Sep, 2010 00:50:07

Message: 13 of 16

Just to throw in a comment that I'm facing the same problem as well. I'm using R2010a on Ubuntu 10.04. Happened numerous times.

MatLab stops taking in keyboard inputs even though it is obviously working with other applications. MatLab is not busy either, since mouse buttons work. I'm not certain what triggers it, but I think it is probably windows/desktop switching (i.e. outside MatLab).

Puzzling, and irritating (especially when re-running the script will take several minutes and stretch my computer).

Jackson


"Matthias " <matthew.goddard@bcf.uni-freiburg.de> wrote in message <i5l59s$8j1$1@fred.mathworks.com>...
> Just did it again. This time completely independently of the Tab key. It actually stopped accepting keyboard input when I opened the help file!
>
> Will submit this as a bug report.
>
> Thanks for your comments & suggestions.

Subject: Keyboard stops working (Linux)

From: Matthias

Date: 3 Sep, 2010 09:42:06

Message: 14 of 16

"Jackson Tan" <tornado.zone84@gmail.com> wrote in message <i5pgnv$8mr$1@fred.mathworks.com>...
> Just to throw in a comment that I'm facing the same problem as well. I'm using R2010a on Ubuntu 10.04. Happened numerous times.
>
> MatLab stops taking in keyboard inputs even though it is obviously working with other applications. MatLab is not busy either, since mouse buttons work. I'm not certain what triggers it, but I think it is probably windows/desktop switching (i.e. outside MatLab).
>
> Puzzling, and irritating (especially when re-running the script will take several minutes and stretch my computer).
>
> Jackson

Hey,

I contacted support and they pointed out the following known issue with linux and java (Matlab uses Java for the GUI), which interestingly specifically also related to IBus:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617

After disabling IBus, Matlab ran problem free all day yesterday.

I also updated java to:
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

I will test over the next week whether the java update, with and without IBus running, resolves the issue.

Subject: Keyboard stops working (Linux)

From: Chuck37

Date: 24 Nov, 2010 23:33:04

Message: 15 of 16

I have/had this and it seems to be related to SCIM, which is similar to iBus I guess. I killed all the SCIM processes and it seems to just pop back up. This seems to work though:

"SCIM can be disabled in GNOME by going to the System tab on the title bar, then Preferences, then More Preferences, then Input Method. Select "Never Use Input Methods" and then log out."

So far so good with this fix. I don't need or want SCIM anyway.

Subject: Keyboard stops working (Linux)

From: Hongkai

Date: 27 Sep, 2012 22:27:08

Message: 16 of 16

I had the same problem on Both R2012b and R2011a. I turned off iBus and the keystroke comes back to life.

"Chuck37" wrote in message <ick7bg$dpt$1@fred.mathworks.com>...
> I have/had this and it seems to be related to SCIM, which is similar to iBus I guess. I killed all the SCIM processes and it seems to just pop back up. This seems to work though:
>
> "SCIM can be disabled in GNOME by going to the System tab on the title bar, then Preferences, then More Preferences, then Input Method. Select "Never Use Input Methods" and then log out."
>
> So far so good with this fix. I don't need or want SCIM anyway.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us