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?

5
  • 1
    does this also happen if you don't "use" ubuntu for 30min after bootup?
    – aatdark
    Jan 29, 2011 at 23:03
  • 1
    It only happens when I'm using it. Otherwise it will sit there just fine. And I can use it for 30 mins lag free.
    – Kredns
    Jan 29, 2011 at 23:12
  • 1
    do you get some messages in /var/log/syslog or /var/log/kern.log indicating a problem?
    – aatdark
    Jan 29, 2011 at 23:41
  • Here is my /var/log/syslog: pastebin.com/HbAC8p8e
    – Kredns
    Jan 30, 2011 at 2:16
  • And here is my /var/log/kern.log: pastebin.com/8V6Z48vk
    – Kredns
    Jan 30, 2011 at 2:17

4 Answers 4

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

7
  • 6
    Nicke, rather than just copying my answer practically word for word (askubuntu.com/questions/18564/…), it would be more respectful to simply link the original question. Not impressed.
    – Scaine
    Jan 30, 2011 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, 2011 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, 2011 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, 2011 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, 2011 at 20:45
2

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.

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, 2014 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.

3
  • This isn't the case. It's not that I have too many programs running. It will lag with just 1 terminal window open. I have 3GBs of RAM and a Dual-Core CPU.
    – Kredns
    Jan 29, 2011 at 22:55
  • Regardless of how many programs you run, there may be a buggy process consuming memory.
    – Nicke
    Jan 30, 2011 at 9:05
  • But none does though.
    – marines
    Mar 12, 2014 at 14:36
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

7
  • 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 3, 2021 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 Jul 3, 2021 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 4, 2021 at 7:08
  • You're assuming that the problem is CPU load and also asking a seemingly unrelated question Jul 4, 2021 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 5, 2021 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.