(Replying to self)
The answer for how to enable laptop mode is not in "man laptop-mode.conf". I fiddled with
that, and tried to run /etc/init.d/laptop_mode, and tried to run laptop_mode init.
laptop_mode status says "Laptop Mode is NOT allowed to run: /var/run/laptop-mode-enabled does
not exist."
running sudo laptop_mode gives the unhelpful and contradictory:
state: closed
yes
Laptop mode disabled, active.
So even though cat /proc/sys/vm/laptop_mode says I'm in laptop mode (2), my cycle count
continues to increase at a rate of one/minute.
Posted Nov 8, 2007 23:47 UTC (Thu) by jwb (guest, #15467)
[Link]
> state: closed
> yes
> Laptop mode disabled, active.
That is hilarious. Laptop mode has always been a questionable hack, at least the one shipped
by Ubuntu. At one point Ubuntu was shipping both laptop_mode and laptop_mode_tools, which
were contradictory even though their packages didn't claim to conflict. On my PowerBook
(where the brilliant firmware cannot be blamed) laptop mode would spin my disk down after *1
second* of inactivity. No joke. Then the disk would spin up again right away. The drain on
the battery was tremendous. I had to purge laptop_mode (or was it laptop_mode_tools) and
reboot the machine to make it stop doing that.
Laptops, power management, and Ubuntu
Posted Nov 13, 2007 10:39 UTC (Tue) by mdz@debian.org (subscriber, #14112)
[Link]
Ubuntu has not shipped laptop-mode, ever. It has never even entered the main repository.
Of course, you are welcome to install arbitrary packages from universe and tweak them to suit
your needs, but you must also take responsibility for the results.
Laptops, power management, and Ubuntu
Posted Nov 13, 2007 15:42 UTC (Tue) by jwb (guest, #15467)
[Link]
Ubuntu shipped laptop-mode in the "main" component (aka the official, supported component) in
Warty, Hoary, and Breezy. That's three times, not "never" as you say.
Laptops, power management, and Ubuntu
Posted Nov 13, 2007 16:02 UTC (Tue) by mdz@debian.org (subscriber, #14112)
[Link]
You're right, I didn't look back that far (over two years now). That laptop-mode is an
Ubuntu-specific tool which is long obsolete and will be removed from universe as well.
In any case, it was removed from main when laptop-mode-tools was added (in 6.06), so it
remains true that Ubuntu did not in fact ship them both.
Laptops, power management, and Ubuntu
Posted Nov 13, 2007 10:35 UTC (Tue) by mdz@debian.org (subscriber, #14112)
[Link]
You don't actually want laptop mode enabled unless you've made a great effort to optimize the
rest of the system to make it useful (that's why it's disabled by default). Enabling it will
just result in the disk spinning up and down a lot, which is what most people investigating
this issue want to avoid.
Laptops, power management, and Ubuntu
Posted Nov 13, 2007 15:14 UTC (Tue) by kevinbsmith (guest, #4778)
[Link]
Actually, my 2-year old laptop had Ubuntu pre-installed. I have never even heard of
laptop-mode until last month, so it was never enabled. And yet my drive has 1.2 million
cycles.
So your post continues to add to my confusion, and offers yet another suggestion ("remove
laptop mode") that won't solve the problem for me.
As for your other post at 10:39:
Of course, you are welcome to install arbitrary packages from
universe and tweak them to suit your needs, but you must also
take responsibility for the results.
More invalid blame of the user. I didn't install what you think I installed, thank you very
much.
1255838 cycles and counting. Still increasing at 5000 per day. Sigh.
Laptops, power management, and Ubuntu
Posted Nov 13, 2007 15:21 UTC (Tue) by mdz@debian.org (subscriber, #14112)
[Link]
Don't be silly; reread the comments I was responding to. I addressed two points:
1. That Ubuntu provided two conflicting tools for enabling laptop mode (it hasn't)
2. That enabling laptop mode would be a good way to prevent a high number of load/unload
cycles (it isn't)
I didn't suggest that you remove the tools for laptop-mode, though I did recommend against
enabling it.
If you want to set default power management settings for your disk in Ubuntu, /etc/hdparm.conf
is probably the best way to go about it.
Laptops, power management, and Ubuntu
Posted Nov 13, 2007 17:15 UTC (Tue) by kevinbsmith (guest, #4778)
[Link]
I apologize for misunderstanding which of the two laptop modes you were talking about. Still,
it's clear that neither is causing my problems. And other folks have suggested that enabling
laptop mode (with appropriate settings) is a way to solve the problem. (Some folks say the
hdparm -B setting is ignored if you are not in laptop mode).
I appreciate the pointer to /etc/hdparm.conf. It's not mentioned on Ubuntu's wiki page, and I
don't remember seeing it anywhere else. I just added this to mine:
/dev/sda {
apm = 254
spindown_time = 240
}
Unfortunately, I can't find any way to confirm that I added it correctly. I have no idea
whether those commands are in effect or not. I rebooted.
But my cycle count continues to increase by 4/minute, so it hasn't solved my problem.
I also checked my BIOS, and there are no settings there to control how the hard drive behaves.
And I re-ran hdparm directly (-B 254 and -S 240), and my cycle count continues to increase at
the same rate.
Laptops, power management, and Ubuntu
Posted Nov 23, 2007 19:52 UTC (Fri) by kevinbsmith (guest, #4778)
[Link]
Quick update, in case it helps someone else. It seems that my Samsung drive ignores hdparm
settings unless you first do:
sudo smartctl -o on /dev/sda
Don't ask me why. It makes no sense. But it worked. My load cycle count has finally stopped
increasing. At this point, my drive seems to be ignoring the hdparm -B parameters (stuck at
128 according to hdparm -I), but seems to be paying attention to -S (not fully confirmed).
When I suspended for 10 minutes, my load cycle went up by exactly one, which is a good sign.
Here is my forum post (basically what I just said here):
http://ubuntuforums.org/showpost.php?p=3825166&postco...
At this point, I suspect that if I can get my system to stop accessing the drives every few
seconds, the heads will park when idle, as they should. Next quest: Find a good guide to how
to configure relatime. Why is that so hard to find?