Announcement

Collapse
No announcement yet.

Laptop Battery Charge Management

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Laptop Battery Charge Management

    Great write up!

    fwiw - haven't experienced any of the above in Arch or Sidux on my T41.

    And wildly off topic:

    I'm trying to get my T41 to stop charging the battery automagically as it reaches 80%. Have you got any experience with that?
    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

    #2
    Laptop Battery Charge Management

    Originally posted by toad
    fwiw - haven't experienced any of the above in Arch or Sidux on my T41.
    My guess is this might be ubuntu specific, possibly related to some issues (and attempts to solve them) with hardware controlled vs. software controlled backlight (and other extra buttons).

    And wildly off topic:
    I'm trying to get my T41 to stop charging the battery automagically as it reaches 80%. Have you got any experience with that?
    Not really, are you trying to increase battery life with such a setting?

    Comment


      #3
      Laptop Battery Charge Management

      Yep, it is bad if batteries get charged to 100% and you keep charging them after that. I checked tp_smapi in thinkwiki and am told that the T41 is capable of a lower threshold but not an upper threshold. I am not trying to sort out a workaround but have not made any inroads yet
      Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

      Comment


        #4
        Laptop Battery Charge Management

        Originally posted by toad
        Yep, it is bad if batteries get charged to 100% and you keep charging them after that. I checked tp_smapi in thinkwiki and am told that the T41 is capable of a lower threshold but not an upper threshold. I am not trying to sort out a workaround but have not made any inroads yet
        We're getting seriously off-topic here

        I was about to suggest tp_smapi, but also noticed it's not fully functional in T41s.

        For what it's worth, I'm under the impression battery is not charged any further when it reaches "full" capacity...so I don't think it "keeps charging them after that".

        I'm aware that it is recommended to keep battery charge in the mid ranges (and not at 100%) for maximum battery life, but in my experience (though I'm no expert on the subject) heat is just as big a factor in reducing battery life...so you just might be better off by removing the battery while on AC power (and storing it in a cool place). Li-ion batteries are usually fairly good in keeping their charge while stored. Even better if you yank it out while it's under 80% capacity.

        Comment


          #5
          Laptop Battery Charge Management

          Okay, last post off topic...

          Yanking it out is what I do, but it is a pain (call me lazy!) - so I am still looking for an automated, hands free, lazy friendly way of doing it

          And thanks for hearing me out!
          Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

          Comment


            #6
            Laptop Battery Charge Management

            Okay, REALLY last post off topic, but since you are a T41 owner you may be interested in it.

            I've just finished editing the archwiki page which can be found here. All the instructions are there.

            Now I am no programmer, but if one could throw something up that would periodically check battery status and have line 1 kick in automatically when it reaches 80% and have line 2 kick in when it falls below 40% would be fantastorgasmic

            At the mo I've put an alias for each in my .bashrc but I'm sure one could knock up a little bash script to get full acpi functionality...
            Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

            Comment


              #7
              Laptop Battery Charge Management

              Originally posted by toad
              Now I am no programmer, but if one could throw something up that would periodically check battery status and have line 1 kick in automatically when it reaches 80% and have line 2 kick in when it falls below 40% would be fantastorgasmic
              That's certainly doable. One could, for example, create a root cronjob to run every 5 mins that checks the battery status, compares it to set values and executes the commands as necessary.
              Probably a ten liner or so, depending on how fancy you want to get.

              There are several ways to read current battery charge% from a script, but I'd use cli programs like 'acpi' or 'acpitool' (installable from the repos) to show battery status.

              You need some 'grep and cut' or 'awk'ing to store only the %-value to a variable than can be compared to your charge thresholds:
              Code:
              #Just an (ugly) example how to read the numerical % value into a variable, if there are more than one battery present, you'll need grep as well.
              CURRENTCHARGE=$(acpitool -b | cut -d, -f2 | cut -d. -f1 | cut -b2-)
              (you can try running 'acpitool -b | cut -d, -f2 | cut -d. -f1 | cut -b2-' to see that it returns the charge value)

              Comment


                #8
                Laptop Battery Charge Management

                Here's a short "proof-of-concept" script:
                Code:
                #!/bin/bash
                
                CURRENTCHARGE=$(acpitool -b | cut -d, -f2 | cut -d. -f1 | cut -b2-)
                # The following command is for testing/debugging purposes, can be removed
                echo "charge is $CURRENTCHARGE"
                
                if [ x$CURRENTCHARGE == x ]; then
                  # The following command is for testing/debugging purposes, can be removed
                  echo "Cannot get a charge reading"
                  #Exit if cannot get battery charge reading, like when battery is removed
                  exit 0
                fi
                
                if [ $CURRENTCHARGE -gt 80 ]; then
                  #Replace the following line with the command you wish to run when charge is over 80%
                  echo "Charge is greater than 80%"
                  exit 0
                fi
                if [ $CURRENTCHARGE -lt 40 ]; then
                  #Replace the following line with the command you wish to run when charge is less than 40%
                  echo "Charge is less than 40%"  
                  exit 0 
                fi
                
                exit 0
                Note that the script can only handle 1 battery "as it is"

                If a moderator sees this, this battery discussion could be moved to a new topic

                Comment


                  #9
                  Laptop Battery Charge Management

                  kubicle - cool! Will try it in due course - MANY thanks and hope you find the info useful as well
                  Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                  Comment

                  Working...
                  X