Reply
Thread Tools
tso's Avatar
Posts: 4,783 | Thanked: 1,253 times | Joined on Aug 2007 @ norway
#111
heh, looked like you caught a update check in the act (note the number of apt related stuff).

beyond that, and metalayer-crawler, i cant see anything that really stands out. but then im no athority on what should and should not be running at any one moment.
 
Sevanteri's Avatar
Posts: 48 | Thanked: 10 times | Joined on Jun 2008 @ Oulu, Finland
#112
I reflashed again yesterday. Everything seems to be fine now.
No battery drain and no apt stuff in ps -e at all.
__________________

Jolla, The First One TOH
N9, black 16GB
N810
 
Posts: 4 | Thanked: 2 times | Joined on Jan 2008 @ spain
#113
i got bored having battery problems with diablo so guess what i did: went back to chinook... and i cannot find anything that i miss from diablo.. even some things work better (rocket key behaving strangely, this battery issue). Now the battery lasts forever
 
Posts: 25 | Thanked: 8 times | Joined on Feb 2009 @ Venezia
#114
First of all, thanks everybody for sharing their experiences in this thread: I felt so frustrated until I realized I was not the only one having problems with my device (N800 with Diablo 5.2008.43-7).
I made a bit of experience tring to find a workaround for this issue, that made me know my device a little better, and that made me finally realize the way the scripts placed in the "/etc/network/if-*.d" folders work.
It might also be that, in the meantime, someone has found a real solution (not jus a workaround) for this problem, and maybe reading the followiong lines point me to the proper solution.
So I thought it could have been nice to write the whole story so to share it with others.
Here it is.

THE STORY
I've been running chinhook for one year and a half, without having any battery problem.
I installed and uninstalled everything, really _everything_, whithout never having a single problem.
A couple of weeks (it's August 2009...) ago I had to reflash my device (the internal mmc was gone), so I decided to give Diablo a try.
It's been the occasion to clean up my system, so I reinstalled all (but only) the software I needed (which includes a few status bar applets), customized my device to my needs, and so on. A couple of days (maybe more?) playing with my device. In the end I realized that I had this crazy problem with my battery, and I felt lost.
Well, I felt lost because, on my searches, I didn't find any apps which seemed to be eating cpu cycles. Top, htop, load applet... all of them reported very little cpu usage.
I also tried uninstalling all the applets (metalayer-crawler also, I know it's not an applet...), keeping my device monitored with battery-status, just to discover that the problem seemed to be randomly appearing, unrelated to any piece of software or to the presence of the internal/external SDHC card.
What helped finding the problem was the battery-status program (and this thread, of course).
In offline mode, with the device "sleeping", my device eats 0.4% of its battery per hour.
But sometimes, in the same conditions, the battery was dropping as much as more than the 20% per hour!
In that condition, as albright suggested (THANKS ALBRIGHT!!!) I checked with iwconfig my connection, and found out that even if it was dropped, iwconfig reported that the somehow still working connection had its power management set to off! (read albright posts for more info).
Well, I tried what albright suggested, once again (THANKS ALBRIGHT!!!):
"killall wlancond"
To make it short, in my experience, this command fixes the problem everytime.

THE PROBLEM
What causes the problem, I don't know.
I tried to load different drivers for the wifi subsystem (tried a couple), but none of the cx3110x.ko I found was working for me. Maybe the driver is not the problem anyway.
Maybe wlancond itself?

THE SOLUTION
Well, it's not really a solution.
And I didn't found it myself: it's been albright to suggest it, I only customized it a little.
First of all, maybe due to a different Diablo version (again, I'm running 43-7), I don't need to "rmmod cx3110x": restarting wlancond is (at the moment) enough. Moreover, since wlancond is one of these daemons which are "watched" by the system (it is run trought dsmetool) I need only to kill the process, and it will be automatically re-launched again.
Now, I don't want to bother with albright (which has been MUCH more clever than me), but I didn't like the cron job to run the script... I haven't cron installed and I like to keep my device as light as possible. And I don't like the idea of something which is compulsively runnig in the background every "-n" minutes. Plus, I want my battery to last as long as possible, and the cron job would be eating (little) resources and battery. So I prepared my own script (a magnificent piece of code) and placed it in "/etc/network/if-post-down.d".
This way, the script is executed only _once_, when the wifi signal gets disconnected.
Note: the script must be set executable, and the name of the script must be in compliance with what stated in the man page of the "run-parts" command, otherwise it won't be executed (this took me few hours to realize...)! That means, no dots in the name of the scripts that therefore will be in the form of "name-of-script", without the usual ".sh" in the end.
The only requirements to run the script is to gain root privileges (otherwise you won't be able to place the script in the proper directory) and to install "wireless-tools" (iwconfig is required, and it is not part of the pre-installed software in our lovely tablet...).
I'm not programming hero but I'm sure that the script could be packed up as a "tiny" .deb file, so that it could be easily installed even by the n00best...

THE SCRIPT
Code:
#!/bin/sh
#magnificent piece of code, uh?
if [[ "`iwconfig wlan0|grep -c "Management:off"`" -gt 0 ]]; then
  killall wlancond
fi
FINAL NOTES
Copy and paste it.
Name it as you prefer (but read the note above). Mine is called "restart_wlancond" (I lack fantasy), without the final ".sh".
Place it in "/etc/network/if-post-down.d".
Give it the proper execution permission.
That's it.

Hope it helps.

Last edited by fabbro; 2009-08-20 at 19:15.
 
Reply

Tags
battery drain, diablo


 
Forum Jump


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