Why is it that on a totally idle R-Pi B, that normally sits around 0-1% CPU utilization, if I open a LXTerminal window, it pegs the CPU at 100% even if I don't do anything but let it sit there at the $ prompt. It stays that way until I close the window, and then it drops back to 0-1%.
1 Answer
It is quite possible that the termianl software is simply running a 'loop' contineously checking for keyboard input at maximium speed (rather then checking, say 10x a second and 'sleeping' in between)...
If you are running on batteries this could be quite an issue - if that's the case all I can suggest is 'try a different terminal program' (eg BASH shell) & see if it's different
-
"It is quite possible that the terminal software is simply running a 'loop' contineously checking for keyboard input" -> No, GUI library APIs are event driven using callbacks. "'try a different terminal program' (eg BASH shell)" -> Bash is not a terminal emulator, it's a shell (and a terminal emulator is not a shell). Unless the system has been changed from default,
bash
is running inside the terminal emulator.– goldilocks ♦Commented Feb 14, 2015 at 16:23
top
orhtop
to see which process(es) are responsible?top
(I think the package is calledprocps
, soapt-get install procps
); by default it will start with the highest CPU process at the top. It should be pretty easy to figure out. Once you know that, there may be some things you can do to further diagnose the problem -- leave a comment @goldilocks.