maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N800 (https://talk.maemo.org/forumdisplay.php?f=25)
-   -   Dismal Diablo Battery Life - N800 (https://talk.maemo.org/showthread.php?t=21676)

khalid 2010-10-13 17:14

Re: Dismal Diablo Battery Life - N800
 
I have been dealing with low battery life for quite some time. I even replaced the battery thinking my battery was simply not holding charge and nothing changed. For the last few months I started paying closer attention to when battery life drops and I have come to some definite conclusions. I have been using advanced-power applet to monitor battery. A few times I managed to notice battery percentage dropping fast and noticed that the temperature reported was in 90s. Normally the temp hovers around 70. "top" shows CPU mostly idle. From there I concluded CPU was spending lot of time spinning in interrupt handler since that time will not show up in top and CPU spinning in interrupt handler would explain rise in temperature. I then started monitoring interrupt counts and noticed that when I connect wifi, the wifi driver plumbs the interrupt into interrupt table and this interrupt is normally unplumbed when I disconnect. When my battery life was dropping fast and CPU temp was rising, I noticed that wifi interrupt had not been unplumbed even though I was no longer connected and interrupt count was going up. So for the last few weeks I have gotten into the habit of putting n800 in offline mode instead of just disconnecting from wifi. This forces wifi driver to be unloaded and interrupt unplumbed. I am seeing pretty good battery life since then. I still had two episodes of battery life dropping faster than I expected but nothing like what it used to be.

If you are seeing poor battery life, try putting n800 in offline mode every time you disconnect from wifi and see if it improves battery life.

Straycat 2010-10-13 17:27

Re: Dismal Diablo Battery Life - N800
 
Quote:

Originally Posted by khalid (Post 840233)
... in offline mode every time you disconnect from wifi and see if it improves battery life.

That's what I use to do but my battery don't last far than 2 days in total idle mode. And when I come to play with suddenly drops near zero.

khalid 2010-10-15 16:50

Re: Dismal Diablo Battery Life - N800
 
Quote:

Originally Posted by Straycat (Post 840246)
That's what I use to do but my battery don't last far than 2 days in total idle mode. And when I come to play with suddenly drops near zero.

Last night I noticed my N800 was fairly warm and it was in offline mode. I looked at the list of modules loaded and "cx3110x" was still loaded. So going into offline mode does not necessarily unload cx3110x module. I am quite certain after all the experiments I did that cx3110x is the culprit behind battery level dropping fast. Right way to fix this would be to look through the source code and find the bug that causes it to leave interrupt plumbed and spurious interrupts coming in at high rate.

I have written a trivial script to unload and reload cx3110x module. I will try that for a few days after every wifi disconnect and see how that goes. It is lot more inconvenient to do this than going into offline mode though. Here is the script:

#!/bin/sh
sudo rmmod cx3110x
sleep 1
sudo insmod /mnt/initfs/lib/modules/2.6.21-omap1/cx3110x.ko

lma 2010-10-15 19:16

Re: Dismal Diablo Battery Life - N800
 
Quote:

Originally Posted by khalid (Post 842053)
I have written a trivial script to unload and reload cx3110x module.

Note that if you do that you typically have to restart wlancond as well.

BTW, are you using manually configured IP settings? If so have a look at bugs 3992/6615.

khalid 2010-10-16 00:30

Re: Dismal Diablo Battery Life - N800
 
Quote:

Originally Posted by lma (Post 842133)
Note that if you do that you typically have to restart wlancond as well.

BTW, are you using manually configured IP settings? If so have a look at bugs 3992/6615.

Wi-fi no longer connects after unloading and loading cx3110x. So I added code to stop wlancond before unloading cx3110x and start it again after reloading cx3110x. Wi-fi still does not connect. Looking through dmesg, cx3110x reports a different mac address than the original one which causes my AP to reject any connection since it has mac address access control enabled. If I change the mac address back to original one using ifconfig, wifi starts connecting again. Any one have any idea why it loses mac address if cx3110x is reloaded?

I am using DHCP for wifi.


All times are GMT. The time now is 16:15.

vBulletin® Version 3.8.8