LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2011, 08:39 PM   #1
compsciStudent
LQ Newbie
 
Registered: Nov 2011
Posts: 14

Rep: Reputation: Disabled
Incorrect reading of battery life in ubuntu 11.10


Hello,

I have another problem which I have never encountered before. It has occurred twice now.

I am running ubuntu 11.10, but my main OS is windows Vista.

When my battery is fully charged, and I unplug the cord, Ubuntu gives me a warning saying that "battery power is critically low, computer will suspend".
A few seconds later, my computer suspends. But my battery is fully charged!

Any ideas????

Thanks!
 
Old 11-01-2011, 09:40 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
If you have ACPI installed, try "cat /proc/acpi/battery/BAT1/state". I am responsible for a netbook that won't drive the battery widget until this is done. I added it to rc.local.
 
Old 11-01-2011, 10:27 PM   #3
compsciStudent
LQ Newbie
 
Registered: Nov 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you!

Just to confirm, the command that you gave me, should I execute it in the terminal?
And what exactly does it do? I am just curious.
Also, what is your rc.local?

I apologize, I am new to all of these terms
 
Old 11-01-2011, 11:38 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Yes, in a terminal - "cat" merely displays the contents of the file. Any command you are unsure of you can use "man command" for help - even "man man" works. Use "q" (no quotes - in any of those commands) to exit man.

/etc/rc.local is part of the start-up (boot) scripts that get run automatically. If you put a command in there it will run every boot. Normally if you mess with the initscripts you'll lose your change when an update comes in.
rc.local (as it is referred to) is special in that it is yours to safely update.

Forgot to mention.
The reason I do this is merely to (apparently) generate an interrupt to ACPI so it is aware of the battery. I was looking around the state files one day, and it (the widget) started working. Seemed lika a simple solution, so I kept at it.

Last edited by syg00; 11-01-2011 at 11:44 PM.
 
Old 11-02-2011, 08:39 AM   #5
compsciStudent
LQ Newbie
 
Registered: Nov 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you very much.
I am currently learning unix, and this is some good practice.

I will try this later.
Your post was very detailed and helpful, thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Laptop Battery life.. Does Distro affect battery life?? jeevanism Linux - Hardware 6 07-09-2011 03:16 AM
Low battery life and very hot Laptop with Ubuntu 10.10 cletus8 Linux - Laptop and Netbook 6 02-23-2011 06:55 AM
LXer: Extending Ubuntu's Battery Life LXer Syndicated Linux News 0 02-29-2008 06:30 PM
Windows: 4-5 hour battery life, Gentoo : ~2:30 battery life numerous Linux - Laptop and Netbook 3 01-17-2005 09:39 PM
windows, good battery life -> fedora, bad battery life daedalusq1115 Linux - Laptop and Netbook 1 01-17-2005 07:40 AM


All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration