[Q] Mediaserver keeping the phone awake? - Samsung Galaxy Nexus

Today I was confronted with some battery stats I was dissapointed in so I decided to look if I could find out what might have caused it.
I noticed within that media server had kept my phone awake for almost 2 hrs (with the famous AudioOut_1 wakelock) although I have all system sounds (exept off course the ringtones and notifications) disabeled, did not listen to music, played my games without music and sounds...
Anybody have an idea what could have caused the mediaserver to wake up and keep my phone awake?
Is it possible that a game/app might keep it awake even if sounds are off and how could I find out which app?

Related

"Who is this 'Mediaserver' and why is he sucking my battery dry?"

Just solved a really annoying battery drain issue. Figured I'd post the results...
I noticed last week that my phone was going through the battery MUCH faster than normal. A check of Settings/About Phone/battery use told me that the "Mediaserver" was using over 35% of my battery, surpassing the phone standby -- which is saying a LOT given what my T-Mo reception is like.
Now, I'm still learning, so when the description says is does something with running apps, I assume that the issue is an app I recently installed, so I remove apps I recently installed or updated. Nope.
I saw another post about a laggy G2 that seemed to also have battery issues. It recommended using Watchdog Lite to see what was happening. So, off to the Android Market.
After installing Watchdog Lite, I saw that the CPU was 0% idle with 75-95% "nice." Well, no idle = battery suckage, so off to see what tasks are using CPU. The initial check didn't show anything -- until I enabled monitoring "Phone Processes." The alerts for the "mediaserver" "linux task" showed that this process was taking every cpu cycle it could. Off to Google.
Did a search on "android mediaserver loop" and found a couple of bugzillas that essentially said that a corrupt media file (pic, movie or sound) could send mediaserverover the edge. So, I started to move *every* picture off the sd card onto my computer's HD.
Knew I was on to something when mediaserver stopped going crazy once usb storage was turned on. So, I moved all the image and movie files off and turned off usb storage. The CPU spun back to100% busy, but slowed back down to about 9o% or more idle.
Now all I have to do is find the bad file or files, and I can add it to the bugzilla.
EDIT: It seems that this has also made the cooliris gallery wake up and start updating again. So anyone seeing that the gallery isn't updating may need to see if their mediaserver linux task is unusually busy. If so, offload as many media files as possible and see whap happens...
Sent from my T-Mobile G2 using Tapatalk
Very useful post. Thanks!
I saw this sucking down battery for me as well while playing around with CM7 nightlies, but never thought too much about it. Good find!
I've noticed this issue with mediaserver too but never managed to find what's causing this.
Thanks for the tips
there might be a difference here but media server from G1 (htc dream) was the music stock music player. it might be different here but thats what it was in the G1
lil-devil said:
there might be a difference here but media server from G1 (htc dream) was the music stock music player. it might be different here but thats what it was in the G1
Click to expand...
Click to collapse
actually the stock music player is /system/app/music.apk on all vanilla android phones.
I believe that music player depend of mediaserver.
I have installed system panel and noticed a 30% cpu usage when I play some music with Cyanogen 7 RC2.
I will try with another Rom to compare the result.
I found my cause for the problem
I got really frustrated with the Galaxy S2 because of this mediaserver issue...
From wat i have researched, I found that once the 'gallery' is opened and closed,
Phone keeps using the cpu 100%.
Phone's back becomes red hot.
The battery drains rapidly in 2-3 hours.
I plug it on to a charger it doesn't charge up
the mediaserver process comes up in the 'battery usage' with 60% usage
Now, I switch off the phone. Boot it up. Charge the phone to 100%. Its all perfect and no heating up too. After 7 hours of usage, no mediaserver process in 'battery usage'.
I went into the gallery once. Browsed some photos. And Closed it.
Now it all started again. I've tried this 3 times now.
And I have no idea wats wrong with the gallery.
Do what I did and either move all the media files off the sd card or drop ". nomedia" files in strategic locations. (Don't forget to look all over the card because they could be in unexpected places.
Sent from my T-Mobile G2 using Tapatalk
could this mediaserver also be caused by lots of Pandora listening?
Mr. Turbofan said:
could this mediaserver also be caused by lots of Pandora listening?
Click to expand...
Click to collapse
It seems to be related to streaming audio also. I'm trying to figure out why since moving to GB my battery is being drained by media server when I never had this issue on Froyo. It only seems to take up the majority of the battery time when I'm listeing to Pandora over Bluetooth during the day.
Very interesting and usefull find, indeed.
Solving the problem lies in the options build.prop
must be changed:
---
media.stagefright.enable-player = true
---
to:
---
media.stagefright.enable-player = false
---
If this option is not in the file, it is necessary to add.
stopservice said:
Solving the problem lies in the options build.prop
must be changed:
---
media.stagefright.enable-player = true
---
to:
---
media.stagefright.enable-player = false
---
If this option is not in the file, it is necessary to add.
Click to expand...
Click to collapse
Don't think that is the cause. Mine is already set to false and still have the problem.
Is there a process we can freeze to stop this.
You really *don't* want to kill this process as it is the cataloger for *both* the music player and the picture gallery. Your best bet is to do something like I did to work around the issue.
Sent from my HTC Desire Z using Tapatalk
I started having the same issue (on Galaxy Note) today. Glad I found this thread in any case.
Once thing I noticed is PowerAmp plays sound files from games if you don't give it a media folder to stick to. I can only assume that it's using the media server to find these based on what someone in this thread said.
So it would seem that the .nomedia file method is definitely the best (to stop game sound files being found).
[Edit:] Oddly the behaviour stopped now. Mediaserver is no longer raping my battery. What do you think of the idea of putting .nomedia in every folder and then removing it from only folders you need (images, video and audio folders)?
You can easily do this by running:
Code:
for i in *; do cp file $i; done
from cli in Android (I think). "file" = <path to .nomedia>
No inherent reason you can't do that...
Sent from my HTC Desire Z using Tapatalk
mediaserver was not a notable issue for me untill 2 days before i installed "sprit fm".... then boom ...... mediaserver just gone mad and taking upto 65% of my battery..... now uninstalling "spirit fm" and will see what happens.
Mediaserver and Arel WARS
Hey all! Glad I found this thread. Got a Samsung Galaxy SII Skyrocket I727 from AT&T. From what I researched mediaserver is part of a standard for DLNA. I am a newb on xda so I cannot post links however search on youtube "Android DLNA MediaServer" and you can get a downlow as to what it is meant for.
Anyways mediaserver gets to be 400+ and sometimes even 500+mb according to Watchdog when playing a GAMEVIL game called Arel WARS. This is the first time I have ever had a problem with mediaserver and ONLY happens when I play Arel WARS. I reboot my phone and see mediaserver at 2.7mb. I start Arel WARS and BAM 100+mb already. After playing for about 20 minutes my phone becomes laggy and the game freezes up. I check Watchdog and it shows 400+mb being used by mediaserver. I then kill Arel WARS and mediaserver is still sucking 400+mb. I try several types of app killers but none can even see the process in order to kill it. I try an app called "reboot" that is supposed to simulate a reboot by killing apps and processes but mediaserver is still sucking the life out of my phone. Bottom line the only way I can kill mediaserver is by rebooting the phone and then its back to 2.7mb and it stays that way ONLY until I start playing Arel WARS. I can launch gallery all day long and media player and mediaserver is good.
Just giving my two cents. I emailed Watchdog dev to see if he can help me out since Watchdog seems to be the only app that can actually see mediaserver and also emailed GAMEVIL to see if they might have a memory leak problem somewhere. I will update when I get word from either.
UPDATE:
I recorded my phones screen to show you mediaserver and it sucking the life out of my phone. There is no way to kill it to my knowledge and the more I play Arel Wars the more it consumes precious ram. Copy this link into your browser to download the video. Its about 10 minutes long and about 18mb.
dl.dropbox.com/u/6778642/Android/Mediaserver_ArelWars.mp4.
You should be able to play it in your browser.
BTW I am still waiting on either GAMEVIL or the dev of Watchdog to hit me up with an email so I'll update if and when I get word.

Q: Mediaserver - consuming battery?

When I look at the battery usage, I can see Mediaserver is below screen in terms of battery usage.
Any idea what it is?
Sent from my HTC One X using xda premium
Same here man
Sent from my HTC One X using xda premium
I recall it has something to do with corrupted media file (picture, music file etc) or failing to play streamed video. Reboot your phone and DO NOT start gallery, camera or anything that reads media files from phone. Use the phone and report back.
EDIT: I also recall this is an android issue, not spesifically HOX issue..
I did not have that on Galaxy Nexus, now it's there on One X, despite using it in the same manner, same apps. Hopefully it's simply some software bug.
I'll try restarting later today...
It seems to start on my HOX when I plug it into my monitor through the HDMI.
Unfortunately, even with the power adapter plugged into the HDMI adapter, it still uses more power than it can get through charging, which is really rather annoying and makes it pretty pointless in having HDMI out. How can they have designed it this way?
mediaserver system wakelock
Hi, i am having a nightmare with the system (*wakelock*) mediaserver process. Everytime i start listening to music either through stock music player, poweramp, winamp or realplayer, I can see it burning my battery.
I am using Badass battery monitor app. I tried soft resets multiple times but the problem appears again everytime i play music. It is using far more battery % than the music app itself.
I have deleted all music and pictures on my phone, leaving only the ones that came with phone, but the problem still crops up when i play the music.
On my first day of use I managed to get good battery hours.
i980.photobucket.com/albums/ae289/golo83/mob/bad7989c.jpg
then went downhill with mediaserver...
i980.photobucket.com/albums/ae289/golo83/mob/a02203a2.jpg
any ideas?
bump. anyone?
today i got
18.4% system (*wakelock*) -- it had CPU usage 1h 23m, keep awake 1h 35m, number of wakelocks 31
6.2% Music.
40% screen.
I've been having the same problem on my Galaxy Nexus. It has been very frustrating because my battery will last only about 4/5 hours with light - moderate usage. For the life of me I cannot figure out what is causing this wakelock all of a sudden. My phone was completely fine on 4.03
Hello,
I have the same problem. I have just charged my phone. And one hour later the Mediaserver has used 3% of the battery.
I have make one "normal" phone calls, sent 3 text messages and send 2 messages with Viber.
I haven't actively used "anything" (as far as I know) that uses a mediaserver?!

[Q] Mediaserver battery drain

I've got the One X for about a month now, but I keep getting this issue now and then, and it's really really annoying.
It always happens in morning, and I only notice it when my low-battery signal goes off (this morning at 10:00 already). The phone feels very warm, and it's already depleted to 10%. When checking battery usage, it says "Mediaserver" used 85% of the energy!
Now this morning, I didn't play any music or watch any photo or video. On the tram to work, I only used a coupe apps (Engadget, Tweakers, Nu.nl (news site), "volvo ocean race game", autoblog.nl and a soccer app (voetbal international)). But I've used these same sites on my Desire and never had a problem with them.
It's a really annoying problem, and I don't seem to be able to turn of "mediaserver" untill my battery dies before lunch! I don't have a desk job (doctor in hospital) so I don't have any means to recharge during the day...
Now this doesn't happen every day, but 4 times already (that's once every week!).
Please help!
i have had it once, seems it gets locked in with you play sounds. have you tried a factory reset might help.
Try clearing data of all media applications (gallery, music etc...).
I guess your media index got corrupted, this happened to me before and this is how I solved it. I actually saw the reason in logs.
Install OS Monitor from the market and take a look at the logs of mediaserver
No haven't tried a factory reset, wish it wouldn't have to come to that. But a normal reset did solve the problem sometimes. And I haven't played any sounds this morning, however only when muting the phone with the volume rockers i do get a sounds...

[Q] Media server

When I check my battery status from "settings->battery->*press battery graph*" I notice something called "mediaserver, consuming 80% of my battery. the stats show it keeping the phone awake almost right throughout. I googled this up but couldnt find anything meaningful apart from some forums calling it an android bug.
one of the forums said it is to do with Music player (any music player not just the stock player) that continuously looks for details of tracks and gets stuck with a bad mp3 . I deleted all songs from my phone and also uninstalled "tunein radio". The media server is still not going away and keeping the device awake.
Anyone else experiencing this? If this is an android bug then this is extremely frustrating.

AudioOut_2 Wakelock

After using Betterbatterystats on my Note 2 there is only one thing that is killing my battery from going into deep sleep. I did a lot of research on this wakelock and all I could find was to make sure you have it set to sound, then reboot then you could change it to vibrate or silent. I never have on sound for buttons so I know this isn't the problem. Has anyone found the solution to this wakelock or am I the only one. Thanks.
Sent from my SGH-I317 using xda app-developers app
Holy moly. Mine is never that high.
______________________________________
Phones: iPhone 4 - > iPhone 5 - > Note 2 (Always on AT&T)
ROM: International N7105XXDLL4 by miscom
Kernal: Perseus alpha30.1
A lot of bloatware removed.
Screen on time after normal charge: 7-8 hours always.
Kmanblazzer said:
After using Betterbatterystats on my Note 2 there is only one thing that is killing my battery from going into deep sleep. I did a lot of research on this wakelock and all I could find was to make sure you have it set to sound, then reboot then you could change it to vibrate or silent. I never have on sound for buttons so I know this isn't the problem. Has anyone found the solution to this wakelock or am I the only one. Thanks.
Sent from my SGH-I317 using xda app-developers app
Click to expand...
Click to collapse
Were you listening to music or watching a video?
You will get "AudioOut_2" partial wakelocks not just with music/video players... but also if you play games (even if you select mute in that game). You show nearly 2 hrs of this wakelock in 3hrs since unplug (cannot see your "deep sleep" or "awake" times). Either you were playing a game OR that game was left open in the background. Check your open processes... kill any games and like... then reset your BBS stats (Menu... Set Custom Ref). Open one of your games (if you have one)... play for 30sec.. then EXIT that game. Check your BBS stats and you'll probably show 30sec of AudioOut_2 partial wakelock. your phone should be deep-sleeping however when sceen is off.. if not, that's a problem.
DoctorQMM said:
You will get "AudioOut_2" partial wakelocks not just with music/video players... but also if you play games (even if you select mute in that game). You show nearly 2 hrs of this wakelock in 3hrs since unplug (cannot see your "deep sleep" or "awake" times). Either you were playing a game OR that game was left open in the background. Check your open processes... kill any games and like... then reset your BBS stats (Menu... Set Custom Ref). Open one of your games (if you have one)... play for 30sec.. then EXIT that game. Check your BBS stats and you'll probably show 30sec of AudioOut_2 partial wakelock. your phone should be deep-sleeping however when sceen is off.. if not, that's a problem.
Click to expand...
Click to collapse
Same problem here on my note 2... last night before sleep time i killed all apps by holding down the home button.BBS clearly showed audio_out2 as the one which has the partial wakelocks... sigh... no solution yet?
on a side note in sound settings im not using sound and vibration. just keyones. screen lock sound and haptic fb.
Me as well kinda getting outta control
Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
norea said:
Same problem here on my note 2... last night before sleep time i killed all apps by holding down the home button.BBS clearly showed audio_out2 as the one which has the partial wakelocks... sigh... no solution yet?
on a side note in sound settings im not using sound and vibration. just keyones. screen lock sound and haptic fb.
Click to expand...
Click to collapse
uncheck keytones and screen lock sounds.
I've also found this to be due to the touch sounds enabled. It's also responsible for the 'keep awake' time in mediaserver. I don't think this is supposed to be intended function. I'm inclined to think AudioOut_2 should only show up when sounds are being produced
I've been looking for a way to have the process killed whenever it isn't in the foreground. Anyone know of an app that will do that?
Apperently Viber can cause that wakelock. I installed it yesterday and today I had the same audioout2 wakelock problem for 2½ hours in 4 hours uptime. I have tried a fix that should work and I will see if it is Viber that caused it. The fix is to go to settings in Viber and enable "use system sounds" instead of the apps own sounds.
R: AudioOut_2 Wakelock
I haved same problem of audioout_2 and i have found that google play music was causing the problem, if i play a song, stop and exit, my phone don't go anymore in deep sleep, and audioout_2 remain active until i set the media volume to 0.
I think it's a bug of google play music.
Inviato dal mio GT-N7000 con Tapatalk 2
I get the same wakelock regardless of which music player I use. I've tried Shuttle, Google Music, PowerAmp, and PlayerPro.

Categories

Resources