yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] nobnut:
Thanks. I have just done that and rebooted. I got a notification on reboot that shutdown didn't happen correctly and data was being reset. I am assuming that this is desired as I had deleted the three text files.

I have to go and be patronised by my boss for 10 minutes now (and be sarcastic in my replies), so will leave the test running and post results on my return.

EDIT: Bahhh! Following the test, none of the txt files were present on my SD card.

EDIT 2: Subsequent restarts give me the same shutdown error. If I 'test' DSDSuperUser, it writes a new deepsleepdetective.txt. But no new data is written to it following restart.
[Android Apps and Games] brandall:
Ha! Sounds like fun...

Ok, have discovered the problem with things not going overly smoothly...

Your output:

$uptime
09:23:34 up 19 min, load average: 2.90, 1.99, 1.74

Is not what I have... This must have been changed in the SGSII or perhaps newer devices in general. My output has the sleep-time in, which the task DSDDO then converts to minutes.

Given that it's populating with different info all the maths will be failing from now on seeing as you have cleared the uptime file - prior to that it was reading a value from the top line:

4860
27average:1.45

Although now I'm baffled as to how that top value correctly populated in the first place?!? Confused :confused:

Anyway, I need to revert to the V1 version of how I established the sleep-time using other files and combine that with the updates I've made to DSDDO for V3...

Before I do, can you please post the contents of:

sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

so I know the maths to use! I'm also going to post over in the SGSII forum to see if anyone knows where I can get the sleep-value from now uptime appears to have changed.

Unfortunately, this will not function correctly for you until I get the sleep-time info sorted :(

EDIT:

As expected - the adhoc tasks runs the uptime command.... damn...
[Android Apps and Games] nobnut:
I understand.

1200000 4036
1000000 253
800000 7262
500000 4806
200000 10701

May I suggest Pulser-g2 and Tegrak as possible contacts for that info.

Pulser is a Forum Senior Mod and a ROM Developer (I'm using his ROM). I think he might be interested in your work. I have had good interaction with him. He also has a 'network' of associates who maybe able to help/know.

Tegrak has produced a kernel and some tools for the SGS1 & 2. He might well be a good source of such info. I have had no interaction with him but from reading his thread, he appears to be very helpful.

EDIT: I am not overclocked presently. Many SGSII users have installed Tegrak's app which loads modules onto the existing kernel and allows overclocking. The key feature of his app is the users can set their own CPU speeds and profiles (anything up to 2Ghz). This is loaded at boot. I do not know if this will cause you headaches however as different SGSII users will have different CPU max speeds.
[Android Apps and Games] brandall:
I stuck the question in the Q&A before I read your response - If I get no reply, I'll see if they can help - thank you. In the mean time I'll knock up the fix!

EDIT: I've used up all of my 24hr 'thanks' limit apparently!!! So until they return THANKS!
[Android Apps and Games] nobnut:
I'll ask Pulser to have a look at your Q&A post.

EDIT: Done :)
[Android Apps and Games] bgx:
OK make an reebot now...

You don't have write it in your instructions on the first site:

Oh yes sorry %MUSLEEP is from my Musik Sleep script task write by myself...

I mean when you start to play the musik and then go to the homescreen with the homebutton not with the backbutton and switch diplay off tasker think the musik app isn't loaded but it is. Sorry for my bad english... haven't write a long time english... ;-)

And forgotten to say: THX for the awesome tasks for tasker. Using also your CPU control with minor fixes for myself!
[Android Apps and Games] nobnut:
You are right bgx. I never understand what brandall is saying either ;)
[Android Apps and Games] bgx:
;-) hehe *lol*

What is with the lose focus problem? I tried a little bit with the variable "last app run" but this seems to be empty. How can I teache tasker that only when I exit the app with back button its quit? but when I only move to the homescreen the musik is playing also and the app isn't quit...
[Android Apps and Games] nobnut:
Brandall will need to help you with that. I am new to Tasker.

It is my understanding however that as long as the profile remains 'live' it remains valid, it is not until the profile ends that the profile will 'stop'. From my experience, if I am playing media, it doesn't matter if I change homescreens, or even turn the screen off. The profile is still valid.
[Android Apps and Games] bgx:
No, you can test it! Open your musik player start the musik, pull down the notification bar: it shows DSDmedia... now go with home button to your homescreen an pull the notivication bar down: DSDmedia has gone but musik plays... when I now let the screen off I have wrong data...
[Android Apps and Games] nobnut:
Confirmed.

It also doen't work for me if I play media from a widget. It only registers as long as you are in the media application itself.

It does however appear as an app causing wake in the DSD reports with screen off etc though.
[Android Apps and Games] bgx:
Yeah! thats what I mean nobnut! ...

Perhabs brandall have an idea because I want autorotation in my preview of my camera and here its the same problem...
[Android Apps and Games] nobnut:
I'm sure he can. I don't know enough about Tasker right now though.
[Android Apps and Games] brandall:
Thanks bgx/nobnut, I was about to reply to you saying it wouldn't work because it only registers the last foreground application with %LAPP - then the penny dropped... I'd been testing this turning the screen off directly from the music app which left the variable %DSDMED set... But that will be no good...

Ok... back to the drawing board on that one... Explains a few strange results too...

Damn it! :mad:

EDIT: Sorry, no thanks meter thanks left...
[Android Apps and Games] nobnut:
Brandall,

I was going to post earlier but was too overcome with sadness at not seeing Miss Poland 2011, that I clean forgot.

What I have been thinking for a day or two now is whether Media is really a valid factor in determinig DSD reporting. I understand what you have done and why you have done it Brandall and I am certainly not second guessing you. But hear me out...

Scenario 1

If there is no media playing during deep sleep potential, then it is not an issue, right?

Scenario 2

Someone has accidentally left media playing and they see it show up as a process causing wake in DSD... DSD has fulfilled its purpose in this case.

Scenario 3

A media app (e.g. podcast player) syncs every 15 minutes (hypothetically) and this shows up as 'wake'. Again, there is no media actually playing but is it not possible that this action might trigger DSD? If so, it should appear in any DSD reports.

I understand that most people intentionally play media with the screen off. It is fair to say that we all accept that this in itself will prevent sleep and is therefore going to show up in any DSD reports.

The question from me is therefore, what is the benefit of identifying media as a profile preventing sleep? For my own purposes, I want anything and everything which causes sleep prevention to show up, including media.

...or have I missed the point entirely?

EDIT: I think most users will not even go to the trouble of selecting or deselecting apps for inclusion or exclusion in the real world anyway.
[Android Apps and Games] brandall:
:) Thanks for your input nobut - I hear you and you are probably right about the media apps - leaving anything to the user is a bad idea! It's an issue because it will throw all of the reporting times/percentages out... It wouldn't be so bad, but media could account for 1-100%.... I have to be able to pick up on it somehow.. I'll work it out.. somehow..
[Android Apps and Games] nobnut:
Like I say, it was just a thought.

The same principle, as well as being applied to media, could equally be applied to:

CPU stress tests

News apps

Chat clients

Livewallpapers (badly coded)

Location widgets

etc etc

Anyway, I've got a speech to write now (sigh).
[Android Apps and Games] azj:
OK. I installed V10 last yesterday afternoon. Didn't seem to get any real output (none of the files were overwritten). But I didn't get any obvious errors.

This morning I'm overwhelmed.

- errorlog hasn't been touched which I assume is good.

- dsdtis contains null

- DSD-Bootlog hasn't been touched

- DeepSleepDetective is new and I need to figure out what it's telling me

- batteryinfo is 5000 lines long. What do I do with that?

- There is one new zip file in the Reports folder

- These are the only files I have. I believe I saw a Wake file of some sort mentioned but I don't have one of those.

But I'm not sure where to go from here.
[Android Apps and Games] bgx:
I have triggered "runtastic" as dsdmedia because it logged my runs per GPS and at the same time I play media with the media player! Later at work then have false stats because tasker could not sort out this apps...
[Android Apps and Games] brandall:
Sounds like it's all working correctly for you now - is the adhoc task returning results when you trigger it? The zip file contains all of the reports of errors so they are not overwritten - I need to delete batteryinfo.txt after it has been used, as it's not for the user to view or comprehend. DSD-Bootlog.txt should populate after your next reboot and every reboot after that with the statistics between boots. dsdtis is supposed to show null, so all good!

Any questions, let me know!

It's likely that the chat and benchmark apps would hold a full wakelock, so the screen wouldn't go off. Location, wallpaper and news apps would trigger a wakelock issue correctly as you'd want to be alerted that they were keeping the device awake. Actually, the chat app falls somewhere in the middle... It's pondering time... Speech ..?

The only workaround at the moment is to switch the screen off directly from the media application... Then the profile will remain active. Only suggestion until I work out how to resolve it another way...
[Android Apps and Games] chamonix:
BetterBatteryStats

Brandall told me he was fine with me hijacking his thread a bit so here we go:

I would be happy if you guys could have a look at this app, compare wakelock stats and give me some feedback about the android version it runs on (on the paper that would be Froyo + Gingerbread). Basically the idea of BetterBatteryStats was born because Gingerbread does not provide the activity that SpareParts used to call in previous versions.

Comments, ideas for improvements or whatever feedback is welcome. If you are interested in accessing the sources just let me know, I will pass on the Git-URL.

I really hope this app helps demystifying battery draining a little.

Enjoy
[Android Apps and Games] azj:
DSPAdhoc returns a popup with DSP and UPT lines. Both currently end in 0%. What do they mean? Same info as DSD section at top of DeepSleepDetective.txt and/or what's in DSD-Bootlog.txt?

DSD-Bootlog: This is the first reboot of several where the file has been re-written.

Date | 7-19-2011 |
Time | 13.06 |
DS against total uptime | 0% |
DS against total DSP time | 0% |
Total Display off time | 144 minutes |

How do I make sense of DeepSleepDetective.txt and use it to determine what's happening on my Droid?

-------------DSD-------------
UPT || 15:25:00 || 0%
DSP || 01:59:00 || 0%
-------------DSD-------------

REPORT START
-------------------------
Tue Jul 19 07:56:47 MST 2011

up time: 15:25:30, idle time: 13:01:01, sleep time: 00:00:00

Wakelock Holders
-------------------------
system_server

Historic Wakelock Holders
-------------------------
name expire_count wake_count
"mmc_delayed_work" 0 72
"alarm" 0 61
"wifi_wake" 0 1192
"alarm_rtc" 52 0
"cpcap-irq" 0 26
"pwrkey" 25 0
"wifi_rx_wake" 14737 0
"bpwake" 1314 0
"omap_serial" 1313 0

Active Applications
-------------------------
com.nuance.flext9.input
net.dinglisch.android.tasker
com.android.launcher
com.google.process.gapps
bt.android.elixir
com.aws.android.elite
com.lookout
android.process.acore
com.google.android.apps.maps:NetworkLocationService
com.google.android.music
com.keramidas.TitaniumBackup
com.android.bluetooth
android.process.acore
com.handcent.nextsms
com.fsck.k9
com.mhuang.overclocking
com.androidlost
com.facebook.katana
de.elmicha.app.LocaleExecute

Wakelock Information
-------------------------
-------------
Total partial waklock time: 8d 6h 39m 31s 699ms

Battery Consumption
-------------------------

END OF REPORT
-------------------------
[Android Apps and Games] brandall:
Thanks for sharing chamonix - I pm'd you actually, because I couldn't find the .apk link before! I have been a little tired recently though... Installing now!
[Android Apps and Games] brandall:
Right, before translating the results, firstly we need to get it working properly for you - Returning 0% means something is pretty wrong...

Can you reboot and leave the device off charge - give it a little screen off time and run adhoc again in about 30 minutes and let me know please...

@bgx - if you're there - did rebooting solve the 0% issue for you?? (I've added that to the install instructions!)
[Android Apps and Games] nobnut:
Thank you Chamonix. I can't find the apk link either. Well, I can see it but it is a tar.gz which downloads. I guess it might be inside but I can't extract it on either device I have with me.

Thank you and good luck with your app.

Sent from my HTC Flyer using vodka
[Android Apps and Games] bgx:
@brandall First yes but after a wile i get error loop and now I had again the zero issue!

Had now make an reboot again
[Android Apps and Games] nobnut:
Speech was for my boss who is presenting at some event or other. But it isn't going to happen now. I had enough tonight and walked out. I'm done with that stuff.

Should have done it months ago. It's a very liberating feeling.

Sent from my HTC Flyer using vodka
[Android Apps and Games] brandall:
Ok, thanks for letting me know.

Attached are two updated task (I've check the xml!) DSDAdhoc and DSDDO - can you import them and see if they resolve the issue.

You'll also need to either reboot, or perform a variable clear action to get rid of any rogue variables..

@ azj - this should work for you too!

@ Nobut - Treat yourself!
[Android Apps and Games] brandall:
Agreed - I did it last week :)
[Android Apps and Games] nobnut:
Thank you (no thanks presses left). I will try it, I didn't even know I had a problem.

@Chamonix, am I being blind or stupid regarding the download link for your apk? I can't find it, just a tar.gz.

Sent from my HTC Flyer using vodka
[Android Apps and Games] chamonix:
Sorry about that and thank you for motivating me to finally fix the mime type of my blog that prevented me to upload APK extensions. That is fixednow and the download replaced by the plain APK.

Hope you like it!
[Android Apps and Games] nobnut:
Thank you!!!

Sent from my HTC Flyer using vodka
[Android Apps and Games] bgx:
Thx brandall! Trying now! Make reboot! ;-)
[Android Apps and Games] nobnut:
Wow. Just tried it briefly and it looks excellent. I like the menu options. It will be interesting to see how it works over time.

I will feed back updates on my experiences to you.

Thank you. I have no thanks button presses left :(

Sent from my HTC Flyer using vodka
[Android Apps and Games] azj:
Unplugged, rebooted, display off at least 35 minutes:

UPT: 53:00 0%

DSP: 0:0-0127 something 0%
[Android Apps and Games] brandall:
Thanks for trying - bear with me, I will resolve this somehow! Saw your edit, yes, try the new tasks please, see if they help - can you also post of the output of

/data/DSD/./toolbox uptime

from the terminal please. Your previous output showed

up time: 15:25:30, idle time: 13:01:01, sleep time: 00:00:00

Note that your device is showing zero sleep time... Need to establish if this really is the case for you! I've not set the profiles up to consider zero sleep from 15 hours as a possibility!

The good news is, if this really is the case, when we sort it, your battery should last a lot longer!!!
[Android Apps and Games] nobnut:
Marvellous. We all like a longlife battery... it's better than longlife milk.

Sent from my HTC Flyer using vodka
[Android Apps and Games] brandall:
Even when you've run out of the fresh stuff, it's still not a pleasure to use....

EDIT: Nearly at 500 thanks Nobut! From your testing skills and helpfulness in this thread, I consider that you've deserved every one of them.
[Android Apps and Games] azj:
Haven't tried the new tasks yet but will shortly. uptime output is

up time: 01:24:34, idle time:00:44:56, sleep time: 00:00:-1
[Android Apps and Games] brandall:
Is the 'sleep time: 00:00:-1' a typo?? Or does it actually say '-1' ?

Before you try the updated tasks, please can you let me have the output from the terminal of

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

I can confirm then, that your device indeed, never, ever sleeps...
[Android Apps and Games] nobnut:
azj, are you using an SGSII? If so, are you using Ninpo's v1.14 kernel? If you are, it has debugging code which prevents sleep. Try another kernel, or his v1.13.

@Brandall, normal milk comes from cows... longlife milk comes from bulls.

EDIT: It's my intention to see you to 500 before me.

Sent from my HTC Flyer using vodka
[Android Apps and Games] azj:
It definitely said -1. I just tried it again and sleep time: 00:00:00

time_in_state contents:

800000 42270

700000 1021

600000 111807

550000 617

500000 24729

250000 270909

125000 0

New task results to follow.

Edit:

DSDAdhoc stills shows 0% on both lines of the dialog. I suppose that makes sense since my Droid appears to never actually sleep. I didn't reboot for this so I will reboot now and report back sometime later although it may not be until morning.

Just saw other question. This is an original Motorola Droid with stock, but rooted, Froyo 2.2.2
[Android Apps and Games] nobnut:
Ignore my previous question I can't view signatures. Already answered.

Sent from my HTC Flyer using vodka
[Android Apps and Games] nobnut:
Do you use SetCPU or similar? If so, which governor do you use? Performance?

Sent from my HTC Flyer using vodka
[Android Apps and Games] brandall:
Ok, a quick addition of you frequency times and indeed, your device never sleeps... :eek: What kernel are you using?

"wifi_rx_wake" 14737 0
Total partial waklock time: 8d 6h 39m 31s 699ms

Here is your culprit which I think is a kernel related. I need to research though.

As nobut said, are you using any applications to set your CPU behaviour?

I'm pretty sure that's not milk....... it's cream.
[Android Apps and Games] azj:
I do use SetCPU. I thought i had it set for on demand but see that's it's actually set on performance. I'll change it to on demand and reboot. That should make a difference eh?
[Android Apps and Games] brandall:
Something is amiss there too then - Performance should max out your CPU at ALL times, but you can see from your scaling frequency information, that isn't the case...
[Android Apps and Games] nobnut:
There is often some 'leakage' in SetCPU (and other CPU controllers) outside of the specified frequency ranges. It is also better at controlling certain devices/ROMs than others. Performance would certainly explain the lack of sleep however.
[Android Apps and Games] pulser_g2:
Yes, on the SGS2 the stock kernel isn't too hot on holding the speeds you want, though on the custom version I am running, it is better.
[Android Apps and Games] brandall:
As far as I'm aware, the default behaviour of Performance isn't to permanently hold a PWL - I'm pretty sure the frequency isn't considered when the device decides it's time for a nap... That's certainly the kernel behaviour for my device anyway.

Any errors to report nobut[/anyone]? I've been doing some investigation work for you to help you discover your dark secret. :eek:
[Android Apps and Games] nobnut:
I've nothing more to add from yesterday. It's all working well. I added in the 'fix' for v10 but haven't noticed a difference in the overall functionality. Adhoc obviously reports differently now but that much was to be expected.
[Android Apps and Games] brandall:
In what way.....?
[Android Apps and Games] nobnut:
Sorry was typing without engaging my brain.

What I meant to say is that following the changes (to whichever way that Adhoc now works), I didn't notice a change in the appearance or functionality of DSD or Adhoc reporting.

My apologies for using ambiguous language.
[Android Apps and Games] brandall:
Chuckle... I should think so too!! ;) The changes made were a precaution in case a user has no sleep time at the time of running the tasks. So, nothing noticeable..
[Android Apps and Games] brandall:
If you have a moment can you run a couple of tests for me please...? In the terminal can you let me know the output of:

fuser /dev/msm*

Then can you run the same test with your media player running.

Then can you run the same test when your media player has reached the end of a track and has stopped (it's not running a playlist etc, just one track and then nothing more)

Thanks in advance!

EDIT: Running the test using the FM Radio, it appears as though this operates independently and the device can sleep. Can you confirm that is the case for you too please.... You'll get deep-sleep when the screen is off with your headset in and the radio playing... Thanks in advance!
[Android Apps and Games] nobnut:
That's a no go unfortunately...

$ export PATH=/data/local/bin:$PATH
$su
# fuser /dev/msm*
fuser: can't stat '/dev/msm*': No such file or directory
#

EDIT: I have no wired headphones to test FM radio with. I appear to have lost them.
[Android Apps and Games] brandall:
Can you have a look in your file explorer - do you not have any msm* files in /dev/ ???

Thanks in advance!
[Android Apps and Games] nobnut:
Hi,

No, I have checked every folder and sub folder of dev manually and there was no sign...

I have also just searched the entire phone using Root Explorer search function and nothing comes up there either.
[Android Apps and Games] nobnut:
I have to pop out in a short while. If you need me to do anything, post it here and I will do it either before I go, or as soon as I come back.

I should only be gone for about 30 minutes when I go.
[Android Apps and Games] brandall:
Thank you kind Sir... I would only be an output of

ls dev

to put my mind at ease... Thanks in advance!
[Android Apps and Games] brandall:
Thank you and congratulations on your 500 thanks! :D

Once last one before I give up eternal hope...

find / -name msm*

Thanks in advance!
[Android Apps and Games] nobnut:
Thank you for the congratulations and your contribution to the tally! You are not far behind ;)

No joy with the last command :(

The cursor just popped down on to the next line with no report whatsoever.
[Android Apps and Games] brandall:
Pleasure - all well deserved!

Right, erm, DAMN IT!!! :mad:

Ok, next up - can you play some music and then do

ps | grep media

Thanks in advance!
[Android Apps and Games] nobnut:
It only worked when the Media player had focus. I.e. when I started media from a widget, the command produced 'no media found'...

export PATH=/data/local/bin:$PATH
$ export PATH=/data/local/bin:$PATH
$ su
# ps | grep media
media 2590 1 50148 10028 ffffffff afd0b74c S /system/bin/mediaserver
app_47 2865 2589 146744 24748 ffffffff afd0c59c S android.process.media
app_61 5017 2589 173492 23236 ffffffff afd0c59c S com.cooliris.media
#
[Android Apps and Games] brandall:
Thank you... Last attempt before I go back the drawing-board...

fuser /dev/snd*

Can you have the media playing please - once with, once without I mean,,,

Thanks in advance!
[Android Apps and Games] nobnut:
Nothing :(

I tried three tests. One without music, the second with music but without the music app open in the foreground and the third with music playing and the app in the foreground.

Each time the cursor just moved down one line... no text appeared.