| View previous topic :: View next topic |
| Author |
Message |
FranBlakes

Joined: Wed Dec 01, 2010 9:16 pm Posts: 82 Location: Worcs.
|
Posted: Sat Oct 13, 2012 10:28 am Post subject: SOLVED - Shutdown* laptop when mains is disconnected |
|
|
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
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  _________________ 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 |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8002 Location: Warrington, UK
|
Posted: Sat Oct 13, 2012 10:08 pm Post subject: |
|
|
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. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
FranBlakes

Joined: Wed Dec 01, 2010 9:16 pm Posts: 82 Location: Worcs.
|
Posted: Sat Oct 13, 2012 11:36 pm Post subject: |
|
|
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 _________________ Ubuntu 10.04.4 LTS! |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1552 Location: Guisborough
|
Posted: Sun Oct 14, 2012 10:01 pm Post subject: |
|
|
Take the battery out if always on the mains. _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8002 Location: Warrington, UK
|
Posted: Mon Oct 15, 2012 12:28 am Post subject: |
|
|
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. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1552 Location: Guisborough
|
Posted: Mon Oct 15, 2012 8:57 am Post subject: |
|
|
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. _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
FranBlakes

Joined: Wed Dec 01, 2010 9:16 pm Posts: 82 Location: Worcs.
|
Posted: Tue Oct 16, 2012 8:09 pm Post subject: |
|
|
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 |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1552 Location: Guisborough
|
Posted: Tue Oct 16, 2012 11:34 pm Post subject: |
|
|
The daughters Medion lasted 19 / 20 months before it stopped charging... _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|