LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2019, 05:22 AM   #1
feynman1942
LQ Newbie
 
Registered: Jul 2019
Posts: 2

Rep: Reputation: Disabled
Keyboard input lag in bash


Hi,

I'm experiencing an annoying issue with keyboard lag when I'm typing in a terminal. If I type an 's' character after any other character, it takes about half a second to show up. If I type another character immediately after the 's' character, they both show immediately.

I'm running ubuntu-gnome 16, and I'm experiencing this in xterm, gnome-terminal and terminator. When I switched to tty1, I had the same behaviour only after I logged in.

This behaviour does not show when I switch to dash or zsh. However, if I start a python shell, the 's' character doesn't show up at all until I type a next character, in an ipython shell this phenomenom does not occur.

When I switch to the root user none of the above problems occur.
 
Old 07-12-2019, 08:17 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Maybe some setting in the specific user's .bashrc or .bash_profile that is different from root user's? Some sort of key definition in one of those making it determine if you're going to do something else (e.g. sticky key, alias that starts with s, etc...)?

I use bash all day, every day, and haven't seen the behavior you describe.

Years ago, I did see that kind of behavior on all characters in sh/ksh on UNIX when we were doing token ring via satellite to remote sites. 1/4 second doesn't sound long until you have to wait for every character to echo back in full duplex mode. Switching to half-duplex helped but then you'd have to make sure you had no typos before hitting enter.
 
Old 07-12-2019, 11:47 AM   #3
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by feynman1942 View Post
If I type an 's' character after any other character, it takes about half a second to show up. If I type another character immediately after the 's' character, they both show immediately.
Sounds a bit like your locale (language/keyboard setting) supports a multi-key sequence that starts with the "s" key, so the input handler is waiting to see IF you complete the sequence (and then echoes the composed char) or this was just a bare "s".
 
Old 07-12-2019, 07:34 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
It's wise to rule out hardware in cases like this. If you have another keyboard that you know works, swap it and see if the problem persists

Also, pop the cover off the key to make sure that some bit of debris has not worked its way under the key.
 
Old 07-17-2019, 09:51 AM   #5
feynman1942
LQ Newbie
 
Registered: Jul 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
I've attached some different usb keyboards and ssh'ed into my laptop from a different machine, the issue still persists, so a hardware problem can be ruled out. I've also tried sourcing my .bashrc from the root user account, which didn't trigger the weird behaviour I see on my own user account so it's probably not something in there.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fgets is not taking input from keyboard after one input in centos 7.5 rahulvishwakarma Programming 9 10-12-2018 12:29 PM
xf86-input-keyboard and xf86-input-mouse masked CollieJim Gentoo 4 11-09-2009 09:57 PM
Repeated "input: AT Translated Set 2 keyboard as /class/input/input" messages AcerKev Mandriva 2 09-16-2007 08:35 AM
Bizarre input lag with Radeon 9200 and ATI drivers TFK Linux - Hardware 1 06-27-2004 12:44 PM
my mouse input is takes as keyboard input in BASH e1000 Slackware 5 12-08-2003 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration