12

About a few months ago I was using Ubuntu (doing something in the command line) when it started lagging really bad. I would hit S (or any other key) and like 20 seconds later it would show up in my terminal.

Naturally I killed the machine and rebooted. The system started working just fine, but about 30 minutes later it did the same thing. Now I'm forced to use Ubuntu in 30 minute spurts. I've looked at my running processes and none of them are taking large amounts of CPU or RAM.

Luckily I've dual-booted so I could still use my machine. Now I need to get this fixed and I'm wondering what my options are. Will I be forced to do a fresh install or is there another way?

Anwar
  • 76,649
Kredns
  • 966

4 Answers4

8

First install htop and iotop:

sudo apt-get install htop iotop

Then start three terminals, and run each of these commands in each of them:

iotop

This command will show you any process that is writing to the hard drive

htop

This command will show a more colourful alternative to top. Pay special attention to the amount of free memory. If this starts running low, you will probably soon see an increase in disk writes in the iotop-command (above), which in turn may indicate that something is leaking memory...

tail -f /var/log/messages

This command will show system messages. If some program crashes or such, more info may popup here. So when you start noticing system lags, check the output from this command...

Of course, non of the above actually solves your problem, but it might help diagnose it.

Cheers /N

Nicke
  • 485
  • 6
    Nicke, rather than just copying my answer practically word for word (http://askubuntu.com/questions/18564/is-my-filesystem-corrupt-or-something), it would be more respectful to simply link the original question. Not impressed. – Scaine Jan 30 '11 at 14:37
  • 4
    -1 for plagiarism. Also once my system starts lagging I'm not able to type commands such as this because after about 40 seconds of lagging the system locks up and I have to do a hard reboot. – Kredns Jan 30 '11 at 16:00
  • 3
    What? I certainly did not! And what do you mean by "word-by-word", there are hardly any similar sentences (except of course for the commands which are common knowledge). Besides, @Scaine, the above post addresses the specific issue of a suspected memory leak which I don't think yours does. I would not mind at all linking to your post now that I know it exists, but accusing me of plagiarism I certainly do mind -- there are polite ways of pointing out similarities in topic without insinuating deliberate theft! – Nicke Jan 30 '11 at 18:48
  • 1
    Then my apologies, Nicke. Seemed far too coincidental to use specifically the same commands. I mean htop when top would do fine for example. Also, dmesg is more common, but I prefer tailing the kern.log because it's realtime. I thought it was too coincidental. Again sorry. – Scaine Jan 30 '11 at 19:10
  • 1
    Coincidence, I don't know: any rudimentary troubleshooting of system lags would include monitoring cpu load, disk load and check for any suspicious log messages... I think htop is more handy than top (mouse support, scrollable process list, less cluttered output etc) -- and we're probably not the only ones. 'tail -f' is the standard command to "follow" a file; i.e print new lines as they are written to it... dmesg just dumps the content of /var/log/dmesg once and then quits -- no continuous output of new lines. So, concidental? Perhaps, but enough to presume "plagiarism"? I don't think so... – Nicke Jan 30 '11 at 20:45
  • tail -f /var/log/messages is very commonplace in my world. Just a case where two people thought the same commands would help in similar situations. – Thelema Feb 01 '11 at 19:06
  • @Nicke: Okay tail -f /var/log/messages actually solved my problem. It showed that PulseAudio was encountering some errors. I'm going to give you the benefit of the doubt and just assume this was a coincidence. However, if you did somehow come across @Scaine's answer when solving this problem you should definitely provide a link. I will remove my downvote if you edit the answer (since it's been 2 days it won't let me remove it normally). – Kredns Feb 02 '11 at 03:41
3

Your real problem could be overheating. I had this exact same problem. All I did was elevate my laptop by keeping it on Dana's Text Book of MIneralogy (4th Edition). Your problem is overheating if you hear your fan whirring at a high speed. It is actually struggling to keep your laptop cool. Processing power is diverted to keep the fan going.

usersurya
  • 31
  • 1
  • If it is overheating, CPU may simple shut itself down, and cause your system to shut off.

    I have the same slow down issue on 14.04, and the current workaround is really to reboot.

    – Antony Aug 19 '14 at 13:18
1

Check your memory usage - I run the System Monitor applet in my panel, and it lets me know if I'm getting close to running out of memory. When I run too many programs, I have similar problems - really slow responsiveness.

If it is a memory problem, try using top or the full system monitor tool that you can launch from the applet to identify which process(es) are using up your memory. Often you can remove it and not have problems, but double-check first.

Thelema
  • 111
0

You could reinstall the system, sure

Sometimes ubuntu does special things like that or just WANTS TO REMOVE KEYBOARD LAYOUT etc.

your problem IS a high cpu load (like cou load 2-3 and cpu utilisation 30%)

Also try to do that: clean everything you can find change everything that might affect your processor (also like cpu governor) Make sure your computer does not have energy saving options Clean cache (RAM, swap and everything else you can)

Please also add more information: Are you using an HDD or SSD Protocol your cpu LOAD and cpu UTILISATION (there is a difference)

I'm sorry I do not know all that commands to do that but I know all that is possible...

edit: look at that

Jan 29 21:12:18 lucas kernel: [   17.082569] Skipping EDID probe due to cached edid
Jan 29 21:12:20 lucas kernel: [   18.642992] Skipping EDID probe due to cached edid
Jan 29 21:12:20 lucas kernel: [   18.692599] Skipping EDID probe due to cached edid
Jan 29 21:12:21 lucas kernel: [   19.800059] Skipping EDID probe due to cached edid
Jan 29 21:12:21 lucas kernel: [   19.819674] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro,commit=0
Jan 29 21:12:21 lucas kernel: [   19.852597] Skipping EDID probe due to cached edid
Jan 29 21:12:21 lucas kernel: [   19.930092] Skipping EDID probe due to cached edid
Jan 29 21:12:21 lucas kernel: [   19.980054] Skipping EDID probe due to cached edid
Jan 29 21:12:23 lucas kernel: [   22.038562] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro,commit=0
Jan 29 21:12:26 lucas kernel: [   25.102579] Skipping EDID probe due to cached edid
Jan 29 21:12:26 lucas kernel: [   25.160090] Skipping EDID probe due to cached edid
Jan 29 21:12:26 lucas kernel: [   25.200067] Skipping EDID probe due to cached edid

what is sda5

france1
  • 174
  • FWIW, EDID probe is working out how to handle a (new) monitor. Probing for a new monitor every 40ms might not be right ! OP, did you do anything about the firmware bug mentioned in the logs? 'please try module parameter "video.allow_duplicates=1"'? What GPU and video driver are you using, all stock? Anything unusual connected to graphics card, a dangling cable? – pbhj Jul 03 '21 at 20:24
  • 1
    This question is from 2014 and is solved, so I don't think the OP is going to add more information. This also doesn't answer the question, you're just asking more questions – not my real name Jul 03 '21 at 21:26
  • @RayWu It is an answer - sure I'm asking for but I answered things that he or others with this problem can do! – france1 Jul 04 '21 at 07:08
  • You're assuming that the problem is CPU load and also asking a seemingly unrelated question – not my real name Jul 04 '21 at 15:02
  • @RayWu So this isn't actually solved. Ohers also can have this problem. On different computers I might have crazy slow downs - also happens with 18.04 so NOT SOLVED – france1 Jul 05 '21 at 14:06
  • @RayWu Every answer is assuming. You prob. just know if you tested it. And if now someone comes with that problem we could know if this was the problem – france1 Jul 05 '21 at 14:07
  • @france1 I understand that there may be other solutions to similar problems but I don't think the OP is going to give you any more information – not my real name Jul 05 '21 at 19:11