Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the deal. When using 12.04 laptop runs so cool and quiet but immediately I plug in, the temperature of the Hard drive starts to go up. (hitting 60•C in no time). However when I unplug the AC cable, the temperature drops to normal levels (45-50•C). What could be done to correct this? Thanks in advance

HP PAVILION DV6700 Intel Core Duo 2.0Ghz 4gb RAM 250 GB HDD

Here are pastebins of hdparm and smartctl on my ubuntu partition sda3:

sudo smartctl -a /dev/sda3 (on battery)

sudo smartctl -a /dev/sda3 (on AC)

sudo hdparm -I /dev/sda3 (on battery)

sudo hdparm -I /dev/sda3 (on AC )

sudo hdparm -i /dev/sda3 (on battery)

sudo hdparm -i /dev/sda3 (on AC)

share|improve this question
Make sure your vents and fans are not clogged and working. – psusi May 23 '12 at 19:23
Vents are not clogged and fans are working well. HD ONLY overheats on AC so it ain't a fan/vent issue – Mysterio May 23 '12 at 19:48
In an effort to save battery power your system is probably spinning down the disk when not in use for some period of time. When on AC it may be keeping it spun up for maximum performance -- generating higher temp. I believe but can't confirm that Linux has configuration parameters for this. The default power preferences in 12.04 don't offer control of this to the user. I've seen but can't recall the source, power managers with more detailed control. That is where I'd look for a solution. – fragos May 26 '12 at 21:17
If only I could change these parameters so the hard drive will behave exactly as it does on battery – Mysterio May 26 '12 at 23:40
In my experience, heat issues generally boil down to electrical issues. How old is this laptop? – Huckle May 28 '12 at 5:20
up vote 6 down vote accepted

Here's the solution:

laptop-mode-tools is controlling power management for your hard drive, and you need to configure it appropriately for your situation.

Open /etc/laptop-mode/laptop-mode.conf for editing with root privileges, and around line 276 (on Ubuntu 12.04), change this value to 600


This is the amount of time before your drive is told to "spin down" or idle on AC power. 10 minutes with no read/write activity is reasonable.

And around lines 290-291 (on Ubuntu 12.04), change both these values to 1:



These set the power management level granted to the drive, with 1 being "full" power management, and 254 being "almost zero" power management. The latter setting is the reason for your temperatures, because you can set the level, but how the drive manages power at a level is entirely up to it -- it completely depends on the implementation in the drive's firmware, and can vary by model, manufacturer, etc.

With the changes, we are now telling the drive to perform the same power management it does while on battery (which is satisfactory for you). This is different from simply allowing the drive to spindown while on AC (as in @EliahKagan's answer), because that would still leave the drive's power management set to near zero at level 254.

How to determine power management level

To find out the current level, while on battery, AC, or any other situation:

sudo hdparm -I /dev/sda | grep Advanced (replace sda appropriately)

share|improve this answer
Edited answer with further tests :) – izx May 30 '12 at 19:56
No problem, depending on what works we can then make it persistent. – izx May 30 '12 at 21:56
That's expected because these only last until you switch the power source :) I'll post a persistent answer tonight. -B 1 enables HDD power management while -B 254 pretty much disables it. – izx May 31 '12 at 15:35
(don't do 1.9 tweak - leave the old values as you did, btw) – izx Jun 1 '12 at 14:35
darn, it's laptop-mode that's overriding the raw hdparm settings: if 1.99 doesn't work, edit /etc/laptop-mode/laptop-mode.conf and change NOLM_HD_IDLE_TIMEOUT_SECONDS=7200 to 60, LM_AC_HD_POWERMGMT=254 to 1 and NOLM_AC_HD_POWERMGMT=254 also to 1. Reboot and try -- THAT should do it. – izx Jun 1 '12 at 14:49

Have you tried installing Jupiter? (

set it continuously to 'power on demand' or 'power saving', maybe that spins down the HD

I have it on Precise Pangoling 12.04, works great (although i don't really have your overheating problem...)

Hope it helps

share|improve this answer
Jupiter & Powertop are both installed – Mysterio May 29 '12 at 16:09

I would like to request you to test this on some other version of Ubuntu (like ubuntu 10.4 or 11.04 or 11.10 - you can use live version of those distro). If the problem still persists,

A. first check your earthing connection because improper earthing always leads to the overheating problem

B. check your A/C adapter because it may be damaged and causing hdd over heat while plugging into the ac source.

c. Check your laptop battery a failing battery caused the problem with the adapter because it could be attempting to "overcharge" the battery, which doesn’t increase the battery’s charge, but, rather radiates the charge as heat energy (this is what is causing your overheating).

i will ask you to remove your laptop battery and then plug it into ac source in-order to check the battery.

share|improve this answer
It took me 2 days to download 12.04 (crappy Internet access) but I will try it and report – Mysterio May 27 '12 at 20:25
BTW it's super horrible in 11.10 I had to stay away from Ubuntu as the laptop was literally too hot to handle – Mysterio May 27 '12 at 20:27
there are 3 possible reason which could be the result of your problem. i am adding them to my my answer, i hope this fix your problem. – Arkaprovo Bhattacharjee May 28 '12 at 0:28
@ArkaprovoBhattacharjee: Sorry, but to be brutally honest this sort of Electronics 101 advice is nonsense considering OP's question. (a) Almost every laptop AC adapter is a switching converter which has nothing to do with ground/earth -- in fact, a lot of them do have 2-pin plugs with no connection for ground/earth! (b) No AC adapter damage is going to only affect the hard drive causing "over heat" -- the only possible damage is overvoltage at the output, and the laptop/motherboard's own power conditioning will lead to either failing gracefully (shut down/refuse to start) (continued) – izx May 28 '12 at 7:24
@ArkaprovoBhattacharjee: (continued)... or ungracefully (something will fail, leaving laptop unable to start) (c) This is also a useless suggestion based on the situation described -- he is monitoring his HD temps, not his battery or overall system temps. The HD temp monitor (internal) is NEVER going to be affected so much by external heat (like a battery overcharging or whatever) to report almost instantaneous 10 deg C swings in temperature. – izx May 28 '12 at 7:25

Charging your laptop battery generates heat. So when you plug in your AC power, and your laptop battery isn't fully charged (it's previously been running off battery), it will start charging the battery, thus generating heat.

This is why you usually get the fan spinning up when switching to AC power after being on battery, and inevitably the system components will heat up due to the heat from the battery.

The hard drive, being reasonably close to the battery, will probably heat up a bit too. This therefore is a plausible explanation of what you are observing.

There are other things that would cause your laptop to get warmer when it's on AC power, such as various components coming out of a "low power" mode, but the battery charging, IMHO, is a much more significant factor.

You say that your hard drive is "overheating" but only mention that it reaches 60 degrees. In reality, manufacturers usually list 60 degrees as the top of the "safe operating temperature" for 2.5 inch drives. Your laptop manufacturer will have designed your laptop's cooling system so that the most extreme situation (charging battery while stressing CPU, etc) should still cause all components to remain within their safe operating temperature. However, they make a number of assumptions. They assume that your room temperature is a certain value, that you're using the laptop on a solid, flat surface, its ventilation holes aren't blocked, etc. If it's 28 degrees inside and you have the laptop on your lap, then components will exceed their safe operating temperature. Similarly, if the fan fails or is blocked, then it will also.

It's also not unusual for laptops simply to run too hot because they have poor thermal design from the start.

The hard drive manufacturer will have given some "breathing room" in specifying 60 degrees as the top safe operating temperature, which will partially make up for non-ideal cooling situations. That is, if you go up to 65 it shouldn't be "too bad". You probably don't need to worry about imminent death of your laptop. But any heat will reduce the life of your components and the cooler the better. You should look into whether the fan is operating correctly, whether you're using the laptop in a hotter environment than a typical room temperature, and whether you have the laptop on a soft or warm surface or one which will press against the air vents. If using the laptop on your lap, get a solid tray/stand for it to sit on. Some companies sell these with built-in cooling fans which I think is overkill.

share|improve this answer
What I'm looking for is to make the Hard Drive behave like it does on battery when using the AC. – Mysterio May 28 '12 at 14:28
Behave in what way? Your original question only mentions the heat issue which I've written about above. Do you want to clarify? – thomasrutter May 28 '12 at 16:02
Meant how cool the temperature is on battery. I want that when running on AC – Mysterio May 28 '12 at 23:31
With all due respect, did you read my above answer at all? – thomasrutter May 29 '12 at 1:59
How do you propose that this heat is generated then? By a fault in the hard drive that somehow manifests when the laptop is on AC power? I'm almost certain it'll simply just be heat from the battery charging. It won't be instantaneous, but it'll be noticeable within minutes. – thomasrutter May 29 '12 at 6:53

To enable hard drive spindown even when running on AC power, press Alt+F2, and run this command:

gconf-editor /apps/gnome-power-manager/disks

This will open the Configuration Editor and bring you directly to the options for automatically spinning down disks. Make sure spindown_enable_ac is checked as well as spindown_enable_battery.

share|improve this answer
Are there any potential negative effects with this tweak? – Mysterio May 28 '12 at 23:43
@Mysterio I'm not aware of any negative effects of spinning down when running from AC power, that would not also apply to spinning down when running from battery. As for spindown generally, theoretically spinning your hard drives down (an back up again) frequently could shorten their life by putting more wear on the motor...if they spin up and down a lot. (Otherwise, it should make them last longer, because the motor is not running as much.) The only real caveat I can think to add to this tweak is that I am not 100% certain it'll work, as there may be other factors preventing spindown. – Eliah Kagan May 29 '12 at 0:23
Thanks for the info. It's half past midnight over here so I'll try it out and report in the morning. Hope it works :) – Mysterio May 29 '12 at 0:28
I would be cautious about this given this bug report. Lower-level APM/acoustic tweaking (see my answer) may achieve similar results without setting AC spindown to the same value as battery spindown. – izx May 29 '12 at 13:27
@EliahKagan : I'm trying to take the low-level approach to your high-level, trying to explicitly set hdparm settings triggered on AC to those that are triggered on battery, or similar, to come up with a temp/performance balance the OP finds acceptable :-) – izx May 29 '12 at 15:39

I've had this issue on 4 occasions, since having several laptops since 2007. It didn't matter what brand(Toshiba, HP, Dell, ASUS)

Everything you're talking about is plausible.

My situation was resolved in the following way. As much as I have taken on board ALL the comments that OTHER people have also suggested, realistically all the 4 occasions were resolved after finding the one factor in all of them. When I replaced a NEW battery, the overheating issue wasn't a factor anymore. When I returned the OLD battery, YES I had what everybody complained about. In all 3 occasions I did the following; while assuming the battery was OK because I had often kept the AC connection plugged in, of course seeing the FULL BATTERY image made me feel the BATTERY was fine. It was easy to just go on with whatever I was doing. When I came across the issue with the hard drive overheating, I just happened to have a friend that owns a computer store that gave me a NEW or currently working battery(he tested for as reliable), then plugged that into my laptop. For THAT TEMPORARILY REPLACED battery, the hard drive OVERHEATING issue was pretty much non existent. Curiously, I replaced MY OLD battery that I ASSUMED was fine(because I LOVED to see it FULLY CHARGED), then I pulled out the AC adaptor to allow the laptop to run off the battery. NOW THIS is something that I OBSERVED in ALL 3 occasions, that allowed me to now SHARE this observation with you. In ALL 3 occasions, the battery RAN DOWN within the first 20 minutes(none of them went longer than 20minutes(ie 4minutes, 12minutes, 15min, 20min)) and the battery alert came up 7minutes remaining your battery is low. Basically the none of the batteries lasted as they would usually run for at least 2 hours.

YES I also cleaned out the fan and blew out the motherboard of any dust. My friend has the laptop repair shop. Even keeping the OLD battery, the same issue would arise, the Hard Drive would overheat, while I had the AC connector plugged in, AND if I took out the AC connector, the battery did not last very long(in my case under 20minutes).

Therefore, the issue was the battery that could not hold it's charge anymore. I had been keeping the battery plugged into the AC for about 3 years ongoing, & yes I also occasionally ran it on it's own without the AC while sitting on the bus or in the airport. BUT I MOSTLY kept it connected on the AC, like ALOT of people, FEELING the ASSUMED comfort that I was always 100% full power when something went wrong(blackout poweroutage in asia Vietnam, Thailand, Cambodia). In the past I INITIALLY did what everyone else seem's to always bring up, clean the fan area, blow off the dust, check power settings, blame the hard drive. After REPLACING the battery, obviously because in all 3 occasions it could not CONTINUE past 20 minutes without the warning LOW BATTERY POWER. In my situation, which SOUNDS like what everyone is talking about, the battery was the issue.

Is the hard drive LESS HOT when only on the BATTERY(not connected to the AC adaptor), YES in my case it was LESS HOT, whether it was on the NEW BATTERY, or even on the FAULTY BATTERY(that did not last longer than 20 minutes with the warning LOW BATTERY POWER).

But in ALL occasions, when the FAULTY BATTERY(assumed to be working well with FULL POWER STORED) was connected to the AC connector, the Hard Drive and generally underneath the LAPTOP area was OBVIOUSLY very HOT, then often would cause an automatic shutdown after some time(within 3 hours sometimes or after many hours under 48 hours). It didn't matter whether I had the AIRCON in the hotel room or a fan blowing directly on the laptop. The Faulty battery always appeared to have the issue with the UNDERNEATH feeling GENERALLY UNCOMFORTABLY HOT(hard drive area, cpu, memory chips).

Replace the battery after seeing it not last very long like I did, then YES for the next 2-3years we MAY NOT have the same issues again(Max 4years). BUT I now know the symptoms of this after 4 occasions. I don't waste time, after watching the battery not last long on it's own. I just get a new battery.

Will there be times that your AC ADAPTOR is at fault? YES, but in that case, your battery won't be charged fully, and you will see that it doesn't appear to be CHARGING the battery or show connected to the AC power. Replace that too in that case. Only cost $6-$8 in Asia, and lasted LONGER than the batteries. THose occasions I didn't have overheating. I just didn't see the battery being charged.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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