Wake lock issues when using phone audio server with aMPD - Android General

I'm trying to set up an old Samsung Infuse 4G (CM10.1 Unofficial) as an audio server, feeding audio into my home audio amplifier. I've got aMPD (android port of Media Player Daemon) running on the phone and have checked the "stay awake" option that's supposed to grab a wakelock and keep the CPU from going to sleep. Yet as soon as the phone display times out, the device become terribly sluggish to remote aMPD commands. If I unlock the phone and get aMPD back on the display, it becomes highly responsive again. Kinda seems like it's failing to get a wakelock, but if I look at battery statistics, I can see that aMPD is responsible for 50% of my battery usage, so it seems like it IS getting a wakelock correctly.
I went ahead and installed the app "Wake Lock" and used it to set PARTIAL_WAKE_LOCK, and I get the same result. Very sluggish unless aMPD is showing on the display.
I've also got "Keep wifi on during sleep" set to "always," so I don't think that the issue is the network.
Any suggestions?

Related

WM6 randomly wakes up?

I'm wondering if this is because of my device (HTC Titan) or because of WM6... all I know is that I never had this happen before!
Basically, I'll pull out my phone sometimes and find that its turned on by itself, and has been sitting with the dim idle backlight on.
I noticed it can be caused by several things but the 2 main ones I've seen is:
1) when the phone switches to/from roaming, it wakes up
2) when using A2DP controls (AVRCP), it wakes up.
I've been using workarounds to keep the backlight off for now (set the phone to roam only, or carrier-only, so it won't be switching in/out of roam, and use core player or just remember to toggle the screen off everytime I use a media AVRCP control), but there has got to be a better way to keep the darned screen off until I press power!
Anyone have any suggestions? This is really an unexpected annoyance as it eats up my battery quickly not knowing its on...
I had a similar issue with whenever I received an email and didnt shut off the device manually. What I eventually ended up doing was setting the device to automagically lock when it was powered off, and this seemed to solve the issue. I'm not sure however if this will fix it in your case because locking it may interfere with AVRCP controls working.

[Q] Screen Timeout + Wi-fi Disconnect

I have my G tablet running with the TnTLite 2.0 (with the overlay) and I'm pretty satisfied with it.
While using Pandora, moments after the screen sleeps, the wi-fi connection seems to drop. In the advanced Wi-fi settings, I have the sleep setting set to never. I have the screen timeout set at 10 minutes.
Is it possible to have the screen off and keep applications running in the background (e.g., music playing)??
JWClauson said:
I have my G tablet running with the TnTLite 2.0 (with the overlay) and I'm pretty satisfied with it.
While using Pandora, moments after the screen sleeps, the wi-fi connection seems to drop. In the advanced Wi-fi settings, I have the sleep setting set to never. I have the screen timeout set at 10 minutes.
Is it possible to have the screen off and keep applications running in the background (e.g., music playing)??
Click to expand...
Click to collapse
This is a known issue and so far I havent seen any of the ROMS that seem to stop it. There is also a hugh 'lag' after it's been asleep for a while, almost as if it takes a minute or so t 'wake up and get going'.
It almost seems to me that it is better to turn the thing off of your not gonna use it for a bit.
HOWEVER, the battery life on this thing in unbelievable so it would hurt to leave it on for a few hours if your listening to Pandora. Ive easily gotten 8 - 10 hours of use with movies and angry birds.
Food for thought.

[Q] Trying to get utility to auto-disable Wifi without wakelock on CM7

Okay, I've been trying to diagnose a somewhat annoying issue. I've been using a fairly simple set of conditions in the Llama utility to automatically disable Wifi when the screen turns off in CM7 to prevent a wakelock condition and reduce battery drain.
So I activate wifi, I reset the log in CPU Spy, and I lock the phone disabling the screen. When I reactivate the phone and check CPU Spy, wifi was definately off but the phone was never in Deep Sleep, so something was holding the wakelock I guess. I repeat the experiment with no changes and Llama still running, but this time I manually disable wifi before locking the screen. This time the phone immediately goes into Deep Sleep according to CPU Spy-- it works perfectly.
So what is the difference between Llama autodisabling and manually disabling wifi that leaves a wakelock active? I've repeated this experiment like ten times last night, and it isn't making much sense to me.
Thanks,
Gnat
I would love an answer to this as well. I can add that with juice defender ultimate the same thing happens. It will disable the wifi but the wakelock stays active. I have tried several settings and reboots and tests and the only thing that would get my phone to deep sleep was disabling JD.
mikel81 said:
I would love an answer to this as well. I can add that with juice defender ultimate the same thing happens. It will disable the wifi but the wakelock stays active. I have tried several settings and reboots and tests and the only thing that would get my phone to deep sleep was disabling JD.
Click to expand...
Click to collapse
I can't tell whether this is the exact same, because you make it sound like JD has the wakelock. In my case, Llama is running in both tests, the only difference is whether Llama turns off Wifi or I manually toggle it-- manual toggling puts it into deep sleep even with Llama running.
On the general battery issues on Triumph, one of the more helpful discussions I've seen is this one here-- http://androidforums.com/triumph-all-things-root/456795-cm7-triumph-battery-life-improvement.html. In it a quote from Tickerguy blesses the JuiceDefender approach to throttling data use for battery savings, but I don't think he had done any analysis regarding wakelocks. BTW, I reverted to stock today, and I am finding the exact same problems as CM7-- wifi imposes a wakelock, and Llama can't shut down wifi automatically without the wakelock persisting. I have to manually toggle wifi off before screen off before the wakelock is gone.
Regards,
Gnat
gnatd said:
I can't tell whether this is the exact same, because you make it sound like JD has the wakelock. In my case, Llama is running in both tests, the only difference is whether Llama turns off Wifi or I manually toggle it-- manual toggling puts it into deep sleep even with Llama running.
Click to expand...
Click to collapse
Sorry; the wakelock is WLAN. It is almost always active if JD is toggling wifi. I hadn't tried disabling wifi manually but leaving JD active yet. I just tested that and got deep sleep immediately. So it must have something to do with how it disables wifi isn't releasing the wakelock.
You know, after switching back to stock from CM7 I'm really not sure I'm not happier. With CM7 I was getting worse battery performance, which led me to start obsessing about wakelocks and deep sleep. Now that I am back on stock, I do the same analysis and see that I have the same problems with wakelocks and deep sleep-- but the battery performance is better so it's not that big a deal. I'm sure that there are things I could do to make CM7 have better battery performance-- but I wasn't enjoying the process and wasn't finding answers, so why bother?
It's like power management programs. I ran Green Power for a long time, and had some glitchy problems with being unable to get wifi to turn on even though it wasn't supposed to be managed while the screen was on. Then I disabled it, and you know what... my battery life was good enough to get me through the day. Froyo is good enough to get me through the day.
The wakelock was put in there on purpose to prevent the phone from hanging when WiFi was on and the phone went to sleep. I use my power widget to turn off WiFi before I turned off the screen unless I'm actually using it.
You could try and build it to see if removing the wakelock is still necessary. If you need help on that side, just post and I'll help. It's not hard, really.

TF700 very sluggish after waking up

Disclaimer: I searched the forums but couldn't find anything relevant.
Am I the only one whose tf700 acts really sluggish after it wakes up for a minute or two?
Is there any solution to this? It kills my main use case of the tablet (pick it up when I want to look at something in a pinch, and put it away when I'm done).
I'm on official ROM, rooter but not unlocked. This has been happening with the previous firmware versions as well.
I had the same problem for a while... most of the time I woke the tablet from sleep it'd be very sluggish.
I noticed that this happens when the wifi disconnected during sleep... it would have to reconnect and therefore all the services that required wifi would all start at the same time, throttling the system.
Turns out its the special setting in ASUS Customized Settings, "Disconnects network during sleep" that was causing this. It does exactly what it says, suspends network-related tasks when the screen goes off and resumes on screen on.
I initially turned this on because i was worried network tasks would drain my battery on sleep, but there doesn't really seem to be much of a performance difference with it on or off. So I'm leaving it off for now.
originalnabisco said:
I had the same problem for a while... most of the time I woke the tablet from sleep it'd be very sluggish.
I noticed that this happens when the wifi disconnected during sleep... it would have to reconnect and therefore all the services that required wifi would all start at the same time, throttling the system.
Turns out its the special setting in ASUS Customized Settings, "Disconnects network during sleep" that was causing this. It does exactly what it says, suspends network-related tasks when the screen goes off and resumes on screen on.
I initially turned this on because i was worried network tasks would drain my battery on sleep, but there doesn't really seem to be much of a performance difference with it on or off. So I'm leaving it off for now.
Click to expand...
Click to collapse
Hmm, I disabled that with the same battery concerns, but I'll give it a shot, thanks!
fincan said:
Hmm, I disabled that with the same battery concerns, but I'll give it a shot, thanks!
Click to expand...
Click to collapse
Also try a clean boot.
Hold down the volume down and power button when you power it on from cold. Let it go through the next screen without touching and it will clear cache automatically.
This does help as well anyway.
It's probably still quicker than most of us after we wake up..... Have you tried coffee?
Try turning off all bloatware. Mine used to be incredibly sluggish when waking up, and when I checked it turned on about 25-ish apps everytime i woke it up. Rubbish like Google Now, Talk, Gallery, etc. This slows the poor thing down to an insane level. Turned off all the random crap I would never use anyway, did a coldboot (sbdags describes the process up one post ^) and now it's instantly awake.

[Q] In need of app for keeping CPU active despite sleep

hi, guys.
"wake my android pro" is an app that turns on the screen for 500ms every T period, where T is user defined. Problem is i am worried about screen wearing too soon, with all those fire ups.
Next choice is never turning the screen off. That's another component spending its life. I would rather avoid it.
"Regpon" is another app. It keeps wifi working with a wifi wakelock, less than a partial wakelock it seems. Then, anything not concerning wifi is beyond it. I have tried it but it doesn't satisfy my need [EDIT: keeps cpu active and wifi active while WLAN is connected, only. Despite its "link to wifi status" option, it always ends when wlan disconnects]
There is another app, whose name isn't coming to me right now. wakelockcontrol, maybe [EDIT: the correct name is "Wake Lock - PowerManager"]. It supposedly employs a wake lock. The user would be able to pick the depth of the wakelock. Unfotunately, it achieves even less than regpon in my device.
Finally, if you can point me to a standalone screen on switch, I'll work with that. In other words, a simple app that I can execute programatically with llama or automateit and which only turns the screen on with one tap [EDIT: Llama has this feature built in. It would be nice to get a stand alone app, though]
ty.
I found another [incomplete] solution: Settings>Developer options>Stay awake
If you think that serves the sole purpose of keeping the screen on, you are misinformed. "Stay awake" has a wakelock, probably less than partial too. I have found it as effective as Regpon, only more stable.
I am still seeking for help.
PS: It amazes me I can`t find any simple "turn device on" application. Heck, I wouldn`t know how to do it in tasker without locale, either. Llama does it pretty well, tough.
PARTIAL SOLUTION reached
I arrived at a partial solution:
0) WiFi module is always on (as in turned on, not active)
1) keepconnonapp keeps llamaapp active
2) Llama is able to detect wlan connection and turn screen on accordingly
3) Whenever wifi is connected, regponapp keeps CPU active for Skype and Csipsimple
4) If kept active both Skype and Csipsimple are able to reconnect automatically.
I consider this solution as partial because it requires interaction between many applications, which might deem it unstable.
DESCRIPTION:
keepconnon: app. Sends "packets" /) to a user defined server. Keeps wifi on when screen is off, but CPU can't be kept alive for neither Skype nor Csipsimple. CPU stays active enough for Llama to run.
regpon: app. Keeps the wifi and cpu ON (as in active, cpu is active) even when the screen is off. Details are unknown. Its wakelock is only effective when there is an active connection, as in: [if left alone] after you disconnect from wlan the device can't reconnect automatically.
Llama: app. Automation application with built in screen turn on (otherwise you should use tasker with a locale plugin)
PURPOSE
To use a tablet as a base phone. Must handle incoming calls even if screen is off. Must be able to recover from modem resets. Having in mind that screen will remain turned off most of the time. Must work in a non-rooted device.
EXPECTED SOLUTION
Run a service that keeps CPU and WiFi active under all circumstances.
I expected this to have been a lot easier, eh he. Still waiting for opinions, haha.

Categories

Resources