Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SOLVED - Shutdown* laptop when mains is disconnected

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
FranBlakes



Joined: Wed Dec 01, 2010 9:16 pm
Posts: 92
Location: Worcs.

PostPosted: Sat Oct 13, 2012 10:28 am    Post subject: SOLVED - Shutdown* laptop when mains is disconnected Reply with quote

I'm using Ubuntu 10.04 LTS on an ageing laptop.

The battery only lasts 1min 40sec appx.
When the battery dies, the BIOS resets Sad

So is there a way that when mains is disconnected eg power failure, the laptop would hibernate or shutdown. Hibernate takes 45secs.

Any help would be appreciated Smile
_________________
Ubuntu 10.04.4 LTS!


Last edited by FranBlakes on Sat Oct 13, 2012 11:36 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8367
Location: Warrington, UK

PostPosted: Sat Oct 13, 2012 10:08 pm    Post subject: Reply with quote

Try putting this in /etc/acpi/events/unplugged

Code:
event=ac_adapter.*0$
action=/usr/sbin/hibernate


The first line matches on an ACPI event sent when the AC adaptor is unplugged, the action should be set to whatever command your system needs to initiate hibernation.

This is only a very temporary fix though, soon your battery will last even less time, or none at all, as mine recently started doing.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
FranBlakes



Joined: Wed Dec 01, 2010 9:16 pm
Posts: 92
Location: Worcs.

PostPosted: Sat Oct 13, 2012 11:36 pm    Post subject: Reply with quote

Thanks nelz!

The laptop has always plugged in, which they say damages the battery.

The command I had to use, just in case any 10.04 users need it is
Code:
pm-hibernate

_________________
Ubuntu 10.04.4 LTS!
Back to top
View user's profile Send private message Send e-mail
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Sun Oct 14, 2012 10:01 pm    Post subject: Reply with quote

Take the battery out if always on the mains.
_________________

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
Back to top
View user's profile Send private message MSN Messenger
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8367
Location: Warrington, UK

PostPosted: Mon Oct 15, 2012 12:28 am    Post subject: Reply with quote

Then he loses the 100 seconds of grace that the battery still gives him. A laptop battery acts as a UPS when running off the mains.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Mon Oct 15, 2012 8:57 am    Post subject: Reply with quote

I was thinking more on the lines of saving the life of the battery.

For my works business laptops they advice not have them connected permanently for any longer than 2 weeks.
_________________

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
Back to top
View user's profile Send private message MSN Messenger
FranBlakes



Joined: Wed Dec 01, 2010 9:16 pm
Posts: 92
Location: Worcs.

PostPosted: Tue Oct 16, 2012 8:09 pm    Post subject: Reply with quote

I have switched the laptop on whilst unknowingly unplugged - only have to go through the slow boot on next power-up (due to BIOS resetting).

It's a wonder they don't make laptops/batteries that when charged 100% `disconnect` from the mains, then start re-charging when the battery reaches 20%.

Just wondering how long the battery will last before it wont charge...
_________________
Ubuntu 10.04.4 LTS!
Back to top
View user's profile Send private message Send e-mail
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Tue Oct 16, 2012 11:34 pm    Post subject: Reply with quote

The daughters Medion lasted 19 / 20 months before it stopped charging...
_________________

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
Back to top
View user's profile Send private message MSN Messenger
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast