Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,784,161 Members 41,493 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
tronmech
Old
(Last edited by tronmech; 5th March 2011 at 01:54 AM.)
#1  
Senior Member - OP
Thanks Meter 77
Posts: 548
Join Date: Nov 2010
Default "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
The Following 19 Users Say Thank You to tronmech For This Useful Post: [ Click to Expand ]
 
geniekid
Old
#2  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Mar 2011
Very useful post. Thanks!
 
dustrho
Old
#3  
dustrho's Avatar
Senior Member
Thanks Meter 57
Posts: 876
Join Date: Sep 2009
Location: Oswego, IL
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!
T-Mobile Samsung Galaxy Note 3 (N900T / Gummy M2.0-04-20-14-NIGHTLY)
Follow me on Google+ and Twitter
 
Neo-Nemesis
Old
#4  
Neo-Nemesis's Avatar
Junior Member
Thanks Meter 0
Posts: 24
Join Date: May 2010
Location: Lyon
I've noticed this issue with mediaserver too but never managed to find what's causing this.

Thanks for the tips
 
lil-devil
Old
#5  
Senior Member
Thanks Meter 58
Posts: 440
Join Date: Jun 2010
Location: Markham
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
Samsung Note II (GT-N7105)
Rom: some 4.4 ROM

Transformer Prime TF201 [Sold]
HTC Desire Z [Retired for music player/GPS ROM: Sense Revolution R4]
HP Touch Pad 16gb [Somewhere........]
SE x10 Mini [RIP - New paper weight]
Transformer TF101 [Sold]
HTC Dream: G1 [Sold]
 
infamousjax
Old
#6  
infamousjax's Avatar
Senior Member
Thanks Meter 26
Posts: 816
Join Date: Mar 2010
Location: Atlanta
Quote:
Originally Posted by lil-devil View Post
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
actually the stock music player is /system/app/music.apk on all vanilla android phones.
I'm your right-hand man but my schemes are left handed. I've got the world on my shoulders, a monkey on my back, my head in the clouds, and my ear to the ground. I've got stars in my eyes, my eyes on the prize, and my nose to the grindstone. A baby face, a glass jaw, a dirty mouth, a harelip, a silver tongue, and a deep throat. I'm long in the tooth and my hairline is receding. I gotta get this off my chest. I can't stomach it when my gut feeling is wrong.
 
Neo-Nemesis
Old
#7  
Neo-Nemesis's Avatar
Junior Member
Thanks Meter 0
Posts: 24
Join Date: May 2010
Location: Lyon
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.
 
itsforsab7
Old
#8  
Junior Member
Thanks Meter 2
Posts: 1
Join Date: Aug 2011
Location: Chennai
Default 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.
The Following 2 Users Say Thank You to itsforsab7 For This Useful Post: [ Click to Expand ]
 
tronmech
Old
#9  
Senior Member - OP
Thanks Meter 77
Posts: 548
Join Date: Nov 2010
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
 
Mr. Turbofan
Old
#10  
Senior Member
Thanks Meter 17
Posts: 111
Join Date: Jan 2011
Location: Orem, Utah
could this mediaserver also be caused by lots of Pandora listening?
EVO LTE (will likely be traded for a GS3 or sold soon)
GS2 Epic touch
Nexus S 4G (wife's)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes