I can use my laptop with out any problem for a while ( sometimes around 12 hours and sometimes just half an hour ), then suddenly one by one, the applications will be closed. I can't shutdown. So I get trapped in a state where I can't open any application and can't shutdown.

Example Situation

I was working on laptop. I had rythmbox, firefox, codeblocks, notepad, files and terminal open. Suddenly, notepad won't save any more. So I closed it. Then the text file won't open any more. I realized what's happening, but I continued working so that I can use the situation to write a question here. After a while, the music stopped. Then firefox closed. Tried opening it again, but nothing happened. Tried to shutdown by pressing the button on the upper right corner of screen. It's suppose to show a drop down menu, but nothing appears. So can't shutdown through this. I opened the terminal. Typed "sudo poweroff", and it showed "command not found: Input/Output Error". Next I closed the lid of my laptop so that it sleeps. I opened the lid to find that I have been logged out. Tried to shutdown from the upper corner button, but the drop down menu did not appear. Next I try to login, but it says wrong password. I am 100% sure that the password is correct.

How I Get Out

It's an example situation, but every situation leads me to a dead end, where I finally simply push the power button of laptop to force it to switch off. I feel that it's bad, but it's the only out of this situation.

Some History

I was using Windows 8 before. I switched to ubuntu cause I was facing a weird problem there. Suddenly one day, out of blue, my hard disk usage started to spike to 100%. The laptop would get laggy and unusable. I switched to Ubuntu fearing some OS problem. But now even in Ubuntu I am facing a different weird problem. At least, here it won't get laggy.

How I use My Laptop

I keep my laptop switched on for really long time every day. I will start my laptop the moment I wake up and continue to use it until I sleep. So that's around 12-16 hours. I tend to use Firefox for internet, Codeblocks for Programming and Rythmbox for music. That's it.

My Doubts

Is it my hard disk? Is it getting too old or something? Or perhaps it's overheating. I don't use a cooler. Is it time to get a new laptop? I want to avoid buying a new one.


Thanks for the replies. I am trying to do what you guys have instructed. It is tough doing it while the laptop keeps on getting stuck. I managed to get few more data. I will keep on updating as I collect them.

  1. I tried sudo shutdown now in the "hanged" state. It said "permission denied: cannot access /var/lib/sudo/10.
  2. I installed iotop. When I ran it during "hanged" state, it showed 0 write and read speed.
  3. I am on process of doing SMART scan. But I noticed my hard disk temperature 45C/113F. That seems high.
  4. When I went to "Disks" and into my hard disk, it showed 593 bad sectors. Is that bad?
  5. I try to create a file using "touch" it says "Read Only File System". Can't use "mv" either. apt-get can't install anything either.
  6. Suppose there is folder called Pictures. If I write "cd Pictures", it works. But If I write "cd Pic" and press tab to auto fill the name, the terminal closes.
  • sounds to me like a bug with the kernel...
    – Alvar
    Aug 31, 2014 at 10:17
  • Look into /var/log/syslog or /var/log/messages, anything of use in there?
    – Jan
    Aug 31, 2014 at 10:20
  • 1
    You can use the Disks utility to check the SMART data for the disk. If that says the disk is fine, then we can look at other things.
    – muru
    Aug 31, 2014 at 10:35

2 Answers 2


This will help reduce spindowns and spinups when your laptop is running on battery. Open a terminal and type the following commands:

First, make a backup:

sudo cp /etc/hdparm.conf /etc/hdparmcopy

Then, type the following command to apply the needed changes:

echo '/dev/sda {
    apm = 254
    apm_battery = 254
}' | sudo tee -a /etc/hdparm.conf

Finally, reboot for the changes to take effect. You can test this out by unplugging your laptop and typing the following command:

sudo hdparm -B /dev/sda

the output should say:

 APM_level  = 254

Your IO tasks can get all backed up and jumbled and I've found that "noop" works best for me.

Noop sets your IO tasks to be done in the order of first thing first instead of prioritizing. To set your scheduler to noop open a terminal and type the following command:

echo 'noop' | sudo tee /sys/block/sda/queue/scheduler

To make this change persistent beyond a reboot, edit the file /etc/default/grub by opening a terminal and typing the following command:

sudo nano /etc/default/grub

Now, edit the line:


to say this instead:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"

Press ctrl + o, press enter, and then ctrl + x to exit the file.

Finally, run the following command to update grub:

sudo update-grub

For temperature:

Install lm-sensors to keep an eye on laptop temperatures:

sudo apt-get install lm-sensors

After installation, open a terminal and type the following command:

sudo sensors-detect

Follow the instructions.

To view temps, type the following command in an open terminal:

watch sensors

see also: prevent-your-laptop-from-overheating

and: monitor-hardware-temperature-in-ubuntu

  • on a side note, you can use iotop or htop to find out what process is using system resources
    – mchid
    Aug 31, 2014 at 10:54

Try typing the command sudo shutdown now. If that doesn't work hold the power button . Like suggested in the earlier comment it might be your hard drive.

  • "Alt Ctrl + F1" to go to tty1, and press "Alt Ctrl + Del"; this will initiate a restart without any input.
    – Anon
    Aug 31, 2014 at 11:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .