jump to navigation

Getting Details about My Laptop Battery – and Taking Care of it April 8, 2007

Posted by Carthik in guides, maintenance, ubuntu.

Recently I have noticed that the “stamina” of my Acer notebook’s battery has been getting progressively worse. The laptop is hardly a year old and yet I get only 3/4ths of the time I used to get with it when I bought it. I wanted to know more details about how my battery’s doing.

Laptop Battery
(img credit: Sean Dreilinger on Flickr)

To find out all the details you would want to know about you battery, browse to the directory
/proc/acpi/battery/ and then to the directory that has your battery in it.

Once there, see the contents of the files to learn more about your battery. Here’s what my files tell me:
battery statistics screenshot

So, as you can see, my battery does not charge to its full design capacity of 4400 mAh. It only charges to 3134 mAh, which is almost 3/4ths of the original capacity. Looks like my battery is on the downhill slide.

Since it is a Lithium Ion battery, I went looking for details on how to take good care of it. It is a good thing I did, because it demystified me – Letting your battery drain to “dead” before recharging it is not good. I really thought it was, but it is not. Wish I had known this earlier! I found an excellent page online with details of what factors affect the performance and lifespan on Lithium Ion batteries. The page includes graphs to show stored charge levels, temperature, discharge load etc affect battery longevity. In case you don’t have the time to read the page, here’s some points for you to remember to ensure a long life for your LiON battery:

  • Avoid frequent discharges to 0% stored charge.
    • Several partial discharges with frequent recharges is better, since Lithium-Ion batteries have no “memory”
    • You still have to allow it to go from full charge to near-empty charge once in 30 charge cycles to make sure that the battery charge monitor is properly calibrated
  • Avoid Heat
    • Don’t leave the laptop in the car
    • If you are going to use the laptop connected to power for a week or more continuously, take the battery out. This will save it from the heat and from the charge-discharge problems
  • The batteries deteriorate even when they are stored cool!
    • Don’t buy a replacement battery or a spare battery until the time when you really need it!
    • If you have to store a Lithium Ion battery – store it at 40% charge and store it in a refrigerator

Take care of your battery, because there is no way to restore capacity to failed batteries. Also, an average battery is good for 300-500 charge/discharge cycles, or about 1-2 years. The main physical reason for the degradation of performance seems to be increased internal resistance, which causes the battery to be unable to deliver the charge stored in it to the outside world (the internal resistance eats it up 🙂 ). Chemical decomposition of components also reduces the charge delivery capacity over time. So it is best to do the most you can to slow down the degradation by following the tips above.

Installing Packages on Computers with Slow Connections Redux July 8, 2006

Posted by Carthik in administration, commands, guides, maintenance, ubuntu.

Earlier, I had written about using apt-zip to upgrade computers on slow internet connections by using a faster machine to do the downloads. However, since that involves understanding how apt-zip works, and a small learning curve, here is a hack that should work pretty well, in spite of it’s hackish nature.

The tip here will let you install new packages (and their dependencies) or upgrade a system by using a faster internet connection to do the downloading. First we get the URIs for the pacakges to be downloaded, then we download the packages and transport them to the computer with the slower connection. Thanks to Ewan for this tip posted to the ubuntu-users list a long time ago.
The steps:
1) On the computer you wish to install something new on (or upgrade), do a $sudo apt-get update

2) Then use apt-get to generate a list of the packages it needs to download, in order to install the package that you need, but not download them:
$sudo apt-get -qq --print-uris install name-of-package | cut -d\' -f 2 > urilist
this gives you a file ‘urilist’ in the same directory as the one in which you ran the previous command, with a list of files to download.

3) Take your list to a machine with a fast internet connection and download the packages using wget:
$wget -i < urilist

4) Take your newly downloaded debs home and copy them into the
/var/cache/apt/archives/ directory

5) Rerun the same apt-get command, but without any special parameters:
$ sudo apt-get install name-of-package

apt-get should tell you the quantity of packages that it will install,
and how much it will download. The download amount should be zero since
the packages are already downloaded.

Read Emails from your System using Evolution May 25, 2006

Posted by Carthik in administration, maintenance, ubuntu.

The system installed on your PC sends you mails. You usually see a message saying “You have new mail.” when you open a new terminal window. Some of these emails report errors, when things didn’t go right. Some list things that need to be done after some software is installed/upgraded. In any case, the assumption is that you read these mails. You can also send other users on the system mail messages using this system, but since I assume this is only for a standalone PC with users you can talk to if needed (I am sure your significant other would rather hear what you have to say, that read it in a system mail message 😉 )

You can read them using pine or mutt (after you install them) from the command line, but what’s better is that you can read them using Evolution. Follow the instructions below to do so:

In Evolution:

  1. Select Edit->Preferences
  2. Select the “Mail Accounts” tab and click “Add”
  3. Fill in the required fields, when asked for e-mail address, input USERNAME@HOSTNAME (where USERNAME is your username and HOSTNAME is the hostname of the machine (try “localhost” if you aren’t sure)
  4. For “Server Type in Receiving Email”, select “Local Delivery”. In input box Path enter: /var/spool/mail/USERNAME (replace USERNAME with your username).
  5. Follow throw and complete creating the account

You’re done. Now you can read the local system mail using Evolution.

Restoring the Ubuntu usplash after a Kubuntu Install February 20, 2006

Posted by Carthik in administration, maintenance, ubuntu.

If you, like me, installed kubuntu-desktop to try it out, then afterward, you must have noticed that when you boot up, the kubuntu splash screen appears with “kubuntu” in blue (instead of the Ubuntu brown) while the computer is booting up.

While this is not a major problem, it is a minor irritant, since you will have to field questions from people regarding why you use kde instead of the superior gnome. Even if it is not a problem, I found a solution, and so it deserves to be called a problem, just so I can write an entertaining article regarding how to fix this.

To get back your familiar Ubuntu usplash image and screen, do a:
$sudo update-alternatives --config usplash-artwork.so

Now you will get to answer a question regarding whether to use the Kubuntu, Ubuntu (or if you have it installed xubuntu) – desktop usplash imag. Select the one you want and rest at ease.

For those who don’t want to muck around with the terminal, may I suggest a quick read of the galternatives article I authored previously?

P.S. Regular Daily readers might like to know that an article on this site got dugg. I apologize for not having published anything since then – was busy reinstalling Ubuntu on a machine, and life interfered, too.

Clean Up Old Thumbnails February 15, 2006

Posted by Carthik in administration, commands, maintenance, snippets, ubuntu.

The nautilus file manager shows you thumbnails of images, pdf files etc when you are browsing your directories. But you already know that. Nautilus also saves a copy of the thumbnails for later, to speed things up. The thumbnails are stored in your ~/.thumbnails directory. Over time, thumbnails keep accumulating, since, even if you delete a file (an image, say), the thumbnail remains. Cleaning this up might save you some space. It saved me about 650MB!

I found this neat command that you can execute to find and delete thumbnails that have not been accessed in the last 7 days. Deleting a thumbnail should not affect anything much, since if Nautilus cannot find a thumbnail, it will just create one anew.

$find ~/.thumbnails -type f -atime +7 -exec rm {} \;

You can put that code in your cron if you like, to have it run every month or so.