[ale] Linux swap space vs hibernate, power shutdown settings
Ron Frazier
atllinuxenthinfo at c3energy.com
Mon Nov 7 10:06:45 EST 2011
On 11/6/2011 9:33 PM, David Tomaschik wrote:
> On 11/06/2011 08:36 PM, Ron Frazier wrote:
>
>
>> Given the situation, I'd really like to figure out how to tell Gnome to
>> shut down at 75% battery power left, which is what I've done in
>> Windows. That way, it will stand a fighting chance of stabilizing if
>> I'm not there to babysit in the event of a power failure.
>>
> Hope you didn't think I was lecturing you on UPS choices -- it was more
> intended to convey my own frustration by common UPS ratings. The UPS I
> have is probably half the size of my whole desktop... and is one of the
> pricier ones out there.
>
> Anyway, as much as I hate how it sometimes feels like gnome took the
> windows registry and ran with it, the setting you're looking for can be
> changed in gconf-editor at the following key:
> /apps/gnome-power-manager/thresholds/percentage_low. (At least, that
> works for my laptop battery... I haven't found time to test it on my UPS.)
>
>
David,
I didn't think you were lecturing. As an engineer, I should have known
better when buying the UPS. What's that old saying, let the buyer
always assume that the vendor / manufacturer is going to screw you over
and mislead you. (OK, so I embellished it a bit.) I think the UPS
packaging, in this particular case, at least, is ambiguous, misleading,
and possibly intentionally deceptive.
Thanks for that gconf thing. That may be just what I need. I'll give
it a try when I get some time. I've looked on and off for something
like that for a year.
I hate testing UPS's. Once before, right after I installed this UPS, I
pulled the plug on my machine, and didn't know the UPS would only last
3-4 minutes. I was running Windows at the time, but the same thing
could apply to Linux. The default was to shutdown at 10% of battery
remaining. So, the system obediently waited for that power level. At
10%, it initiated the shutdown sequence. 18 seconds later, the battery
died, right in the middle of a whole bunch of disk writes. It took out
my entire Windows partition, and I spent the next 3 days rebuilding the
system. Maybe this time, I'll test with a live CD and no file systems
mounted!
By, the way, I also learned the hard way on an old laptop, that an old
battery can suddenly die when the charge meter reads 50%. So, even if
10% is a good power level to shut down at, that only applies to a
healthy battery. From these experiences, I've developed procedures to
test each battery individually under load and set the shutdown settings
for each separate case. I set them to allow: A) the longest practical
working time on battery power. (Not so relevant to desktop, but very
relevant if you want to use your laptop without AC power.) B) plenty of
time to shut down, and C) plenty of time remaining in the battery to
allow a restart and to find a power source in case you didn't know it
shut down due to a dead battery. For a laptop with a high capacity
battery, that amounts to about 30 minutes of reserve power at shutdown.
For a standard battery, it amounts to about 20 minutes of reserve.
These numbers are somewhat arbitrary. I have found, however, that near
the end of the discharge cycle, the charge meters tend to be less
accurate. For the desktop, I don't have much choice, the battery might
have about 1 minute of reserve power at shutdown. However, I don't
normally run the desktop on battery and I do usually know if there was a
power failure. In that case I would restart it on AC power right from
the start.
When less techie friends ask me how I learned all I did about computers,
I say by banging my head on a brick wall (of problems) numerous times
for 25 years. It was definitely not easy and it was definitely not
painless. I'm going through some of the growing pains with Linux that I
long ago put in the rear view mirror with Windows.
As far as the registry, I guess they have to store thousands of config
details somewhere. I think a good design compromise would be a per app
data warehouse with a system wide consistent user editor tool. That
way, if the database gets corrupted, it only hoses the app, not the
whole system. Of course, you always want a "reset to defaults" button.
Sincerely,
Ron
--
(PS - If you email me and don't get a quick response, you might want to
call on the phone. I get about 300 emails per day from alternate energy
mailing lists and such. I don't always see new messages very quickly.)
Ron Frazier
770-205-9422 (O) Leave a message.
linuxdude AT c3energy.com
More information about the Ale
mailing list