I was checking my battery status in settings and noticed Media Server has taken 56% of my battery, and has caused my phone to stay awake for over 18 hours and has almost 5 hours of CPU time. I have been getting over a days worth of battery with 4-5 hours of screen on time, I am currently at 22 hours with only 1.5 hours of screen on time. I don't see a way to stop it from running in Application Manager.
Is there a way to stop this process from keeping my phone awake? Is this connected with any particular application, or called something else in Application Manager?
I'm having the same issue as well.
I've seen it take a decent chunk more than once. Only like 15% at max so I'm not doing nearly as bad though. I'm curious about what it is exactly as well.
flaring afro said:
I've seen it take a decent chunk more than once. Only like 15% at max so I'm not doing nearly as bad though. I'm curious about what it is exactly as well.
Click to expand...
Click to collapse
Yeah I have always noticed it on my list, but it was never a huge drain on the battery. Like you said in the 15% range, all of the sudden though it just jumped up to over 50%. I can't think of an application I have used to make it use such a huge chunk of my battery.
So I went back into Application Manager and noticed under the Running tab that there was a "Show cached processes" option in the top right corner. Under that there was a Media application listed that uses the "android.process.media" process. Any chance that this could be related to the Media Server, or am I heading in the wrong direction?
I have recharged and restarted my phone, and Media Server is back down to 6% after discharging for 5 hours. I would just like to know what I possibly did to make my battery drain so quickly. I haven't watched any movies or videos and Pandora is the only time I listen to music on my phone.
According to my research, the media service covers scanning your internal and external sdcards for media files, including music, pictures and videos. If one file is corrupted in some way, it can cause the service to hang. That said, mine was doing the same thing. There's an app on the play store called Media Rescan Root that blocks the service at boot. The stock media player, player pro, and probably others use the media service to find new songs added to the sdcard. I switched over to PowerAmp which does its own search which doesn't hang like that. That's what I reccomend.
Sent from my GN2 using XDA Premium HD app
Do you have Drive installed?
I had the same issue with media server eating up about 60% battery. I have Google Drive installed and have around 1gb data in it. In accounts my sync settings were set to always sync Drive. I unchecked this and the media server issue seemed to have been resolved.See if this helps you.
_paradox said:
I had the same issue with media server eating up about 60% battery. I have Google Drive installed and have around 1gb data in it. In accounts my sync settings were set to always sync Drive. I unchecked this and the media server issue seemed to have been resolved.See if this helps you.
Click to expand...
Click to collapse
I unchecked media sync, and put back in my SD card, which has about 12 gb of music on it. Within 10 minutes, the media scanner jumped from .02% to 12%, so this didn't seem to make a difference for me.
TallgeeseIV said:
According to my research, the media service covers scanning your internal and external sdcards for media files, including music, pictures and videos. If one file is corrupted in some way, it can cause the service to hang. That said, mine was doing the same thing. There's an app on the play store called Media Rescan Root that blocks the service at boot. The stock media player, player pro, and probably others use the media service to find new songs added to the sdcard. I switched over to PowerAmp which does its own search which doesn't hang like that. That's what I reccomend.
Sent from my GN2 using XDA Premium HD app
Click to expand...
Click to collapse
Same thing happened to me. Mine turned out to be m4a files that were causing. I removed them and no longer see mediaserver power drain.
I read a forum a few days ago that talked about wifi causing the media service drain. They said to set a static IP address instead of dynamic and that would solve the problem. I spend most of my time on wifi so this makes a little bit of sense to me. I have set a static address and so far today my media service has remained at 3%. I don't have the link to the forum right now but I'll try to find it again and link to it later.
Sent from my SCH-I605 using xda app-developers app
Edit: Apparently that did not last long. My Media Server stayed down at 2% for several hours but then for no aparent reason it spiked up to its current usage of 31% (2hr CPU time and 7hr of Stay Awake). I would really like to know what is causing this.
Related
Right, im on 2.3.3 with my X10, and ive noticed in the battery usage section in the menu that something called media has 21% so far, even though ive not used any media at all, and in 38 mins from being fully charged im down to 85% battery lol.
Anyway this media thing says when i click on it
Cpu total 11mins
Cpu Foreground 6mins
Keep awake 7 mins 54secs
included packages, DRM protected content storage
Downloads,
Download manager
Media Storage..
So out of all that anything i can do to stop this?
Do you have many media files (music, photos etc?) on your card ?
It might be that the media scanner kicked in to index / search around. If this is the case, maybe this post could help: http://forum.xda-developers.com/showpost.php?p=15037379&postcount=35
viulian said:
Do you have many media files (music, photos etc?) on your card ?
It might be that the media scanner kicked in to index / search around. If this is the case, maybe this post could help: http://forum.xda-developers.com/showpost.php?p=15037379&postcount=35
Click to expand...
Click to collapse
aye i do, quite a few pictures and alot of music on there, But nothing changed so im not sure why it scanned again, plus it ate the battery like mad from a fully charged battery to 85%
No software is perfect...
In my case, the scanner hogged the CPU the first time I booted the phone after update, gallery worked very very poorly, freezes, etc. Eventually it finished and now it seems ok.
If it keeps doing it, just reset, and if it insists - just add a '.nomedia' file and it should not scan the big folders anymore. Please read more about .nomedia file limitations here: http://forum.xda-developers.com/showthread.php?t=626997
Right cheers for that, ill give that a shot and see what happens, was just annoying to see my freshly charged battery disapear lol
Hi there,
As many folks around i am experiencing massive battery drain from *wakelock*/mediaplayer while music playback.
For now, i have tried everything:
- full wipe
- music playback on fresh wiped rom
- formatting sdcard / internal storage
- disabling media server
- debugging with logcat
- ...
Currently, the mediaserver drains more power then any other process, including screen. The phone gets not hot, but warm while only playing music with screen off. That was not happening before, as i listen music daily.
After all, the problem is most likely caused by a corrupt file, but how can i locate this file ? I have 2300 mp3s on my phone, so testing every single one would be a bit complicated...
Sent from my GT-I9100 using xda premium
Have you tried using another music player?
Sent from my HTC Wildfire using xda premium
Yep, apollo, poweramp, stock..
In case of poweramp i can differ, mediaserver holds a different wakelock as poweramp
Sent from my GT-I9100 using xda premium
Nothing new...
I killed my whole mp3 directory... left only one mp3 file - and guess what? Still mediaserver drain while playback...
Sent from my GT-I9100 using xda premium
Yeah I have the same problem too, not very fun seeing your battery drop!
News about that ? Same problem here.
Envoyé depuis mon Galaxy Nexus avec Tapatalk
Nah... now with cm10 it is even worser for me..
Sent from my GT-I9100 using xda premium
Has anyone found a fix yet?
I've been seeing this behaviour as well on my CM10 GT-I9100
Removing media files helps in shortening the wakelock
I don't see much impact from video files or pictures, I do however see it with music.
Once I start adding mp3's mediascanner service takes longer and longer.
Eventually it drains about 10% of my battery at startup with a wakelock of about 10 minutes (more or less)
At one point, I found Google+ had been installing a 'hangout_ding.mp4' file to my sdcard which was corrupt. This was only on my phone, my tablet was unaffected. A scan of my system log (watching through ddms the boot process) showed when it couldn't read the file information properly. Removing the file would get it working again, but it kept replacing it, I ended up disabling the app and almost forgetting about it. Suffice to say, I remember seeing that this was most common with mp4s, have you also isolated your ringtones and such? If a newer phone, does it have an internal storage (besides /data)? If so, have you tried looking for the culprit there as well?
daveid said:
At one point, I found Google+ had been installing a 'hangout_ding.mp4' file to my sdcard which was corrupt.
Click to expand...
Click to collapse
This is the main problem - finding the file(s) responsible for the misbehaviour.
Or is it the sheer number of files involved? (with pics + music it goes in the thousands)
I used a media checker on the sdcard offline to see which of my music files were bad, but there were many and so many different errors.
There are no easy to use apps afaik that we can use to find them.
It's hard to figure out what trips mediascanner.
You mentioned ddms.
I'll try and use that first to debug mediascannerservice.
thanks, and I'll report my findings
1ist ndayedro
I used ddms to monitor the messages of the mediastorage app while it scans.
At first it found some corrupt media files which I consequently removed.
After that no more useful warnings or erros popped up.
Removing the few corrupt media files changed nothing in the wakelock time...
MediaScannerService still uses full cpu at boot for about 5 minutes...
Any other ideas?
So a bit of background. I'm running:
ROM: [ROM][AOSP][JB][4.1.2][JZO54K] SuperNexus - I777 - BUILD 5
Kernel: Siyah - JELLYBEAN - ICS [v4.3.3]
Currently phone is telling me media is 82% of my usage and I have absolutely no clue what that could be. I'm not downloading anything.
I've had the battery for over 1+ year so I know I'm due for a replacement but this usage rate seems ridiculous.
Any thoughts? Thanks friends.
Media scanner going crazy. Download an app from the play store to stop it from acting wonky. Yes u can find the name of the app. I believe in u.
Yeah one night my media scanner went crazy and made my phone feel like it was about to melt. It was draining the battery on the charger. I didn't download an app to stop the media scanner but I don't see it scan anymore. Now I just use an app/widget that scans when you press it.
Sent from my SGH-I777
Had this problem a long time ago..
Try adding a blank file named .nomedia on the internal and sd card root...
That fix it for me. Good luck there hope this helps
Sent from my SGH-I777
I had that issue, media scanner would not stop. I took my 32 GB SD card out, moved the files I needed, reformatted it (didn't use quick format, did it the long way), stuck the files back, and put it back in the phone. Now no more media scanner running always. I had read somewhere that the file structure on the external media card could get messed up causing that issue.
Is it normal to have a steady 10% battery usage by Media Server?
Re: Media Server battery usage
Do you listen to a lot of music, or listen regularly, more to the point? 10% usage indicates to me you are just listening to music, if it jumps right up then you might have the media bug, but doesn't sound like it to me, from that stat
slaphead20 said:
Do you listen to a lot of music, or listen regularly, more to the point? 10% usage indicates to me you are just listening to music, if it jumps right up then you might have the media bug, but doesn't sound like it to me, from that stat
Click to expand...
Click to collapse
Actually I don't listen to music at all (with the phone), that's why I don't understand the media server running constantly.
I have the latest BTU EMB1 firmware. Installed wiping all data.
Re: Media Server battery usage
jurijvi said:
Actually I don't listen to music at all (with the phone), that's why I don't understand the media server running constantly.
I have the latest BTU EMB1 firmware. Installed wiping all data.
Click to expand...
Click to collapse
Hmm, well you can disable the media scanner with rescan media root from Play, do you have a lot of pictures or other media?
It can also run a lot if your sd card is corrupt, if you ever get messages that your card has been ejected then the media scanner will run again after each mount.
Another problem can be nandroid backups, if you use the wrong format you end up with thousands of tiny files which makes the scanner run for ages.
Re: Media Server battery usage
Just to share, yesterday I changed my stock battery for an extended Hyperion 4400, media scanner drain 5% of it in 15 min, the device was also hot, I had to force close the media scanner several times until I reboot twice and it stopped, got annoyed by it, and it's also first time it happens, nothing abnormal in my sd or internal.
Sent from my GT-I9300 using Tapatalk 2
boomboomer said:
It can also run a lot if your sd card is corrupt, if you ever get messages that your card has been ejected then the media scanner will run again after each mount.
Another problem can be nandroid backups, if you use the wrong format you end up with thousands of tiny files which makes the scanner run for ages.
Click to expand...
Click to collapse
I don't have problem with the card being ejected. However I have titanium backup running twice a week. It does create a fair amount of files.
Could that be the issue?
slaphead20 said:
Hmm, well you can disable the media scanner with rescan media root from Play, do you have a lot of pictures or other media?
Click to expand...
Click to collapse
I have a "normal" amount of pix, like less than a hundred. Few videos and that's about it.
jurijvi said:
I have a "normal" amount of pix, like less than a hundred. Few videos and that's about it.
Click to expand...
Click to collapse
I turned off Google+ while having the same issue and it fixed the problems. Turn off all the settings for it.
wga22 said:
I turned off Google+ while having the same issue and it fixed the problems. Turn off all the settings for it.
Click to expand...
Click to collapse
I have all the settings deselected for Google +. No notification, no instant upload etc..
I just re-flashed the latest BTU rom. No more media server draining the battery. However after rooting with CF-root, the media server started to show up with a steady 10% rate!
I've seen this problem discussed before, but not specifically in the context of using BitTorrent Sync. Since I've started using BitTorrent Sync as a Dropbox replacement to sync about 16GB and 24,000 files, every 1-3 days (sometimes more frequently) my S4 goes into a period of high CPU usage (30-40% capacity, all cores pinned at 1.6GHz) that lasts 2-4 hours, while it consumes battery at about 20% per hour. Using performance analyzers such as Android Tuner, I've ruled out any single app hogging CPU, and the culprit is the Android system itself. I've tried many things to try to stave off or reduce the battery drain if it happens at a bad time, but there seems to be no way to exert any kind of control at this level. I figure that putting governors on the cores won't help because it will reduce my phone's performance while merely extending the time the maintenance requires before it will let my people go, saving no power in the end. Yes, I shut as much stuff down as possible--even going into airplane mode--but once this annoyance begins, it overwhelms any energy conservation efforts. My only viable strategy is then to find an AC outlet and weather the storm there, or plan to finish using my phone within a couple of hours.
I gather from comments people have made in other contexts that if a lot of files change status, then the system needs to do a bunch of stuff, but I'm really not changing that many files, or moving folders around, etc. But it could be that BitTorrent Sync changes a lot if its own system files (while checking in with peers, maintaining its db, and whatever it does), so in response Android then has to do a lot of work maintaining files that the user never directly sees or uses. I do use BitTorrent Sync's auto sleep function, but still.
So I'm wondering if the scenario I'm describing sounds plausible. I'd have to shutdown data sync completely for several days just to do one trial, and it would take several trials to confirm more positively that using BitTorrent Sync is the root of the problem. But I need my data to sync more than I need my battery, so I'm willing to live with short battery times. But it's still a pain in the a$$--and the instances of 2-3 hours battery time are really crippling--so I'm wondering if anyone has any suggestions how to analyze or improve this situation because I don't really know enough. Then maybe I'll be able to suggest something to the BitTorrent Sync devs. I don't want to raise the problem in the BitTorrent Sync forums because very few of the active people there are well-versed in Android, the Windows/Linux/OSX crowd being much more numerous. Any comments are welcome: I want to start collecting info on this issue so that it can be discussed more profitably at the BT forums.
Jimmy34742 said:
I've seen this problem discussed before, but not specifically in the context of using BitTorrent Sync. Since I've started using BitTorrent Sync as a Dropbox replacement to sync about 16GB and 24,000 files, every 1-3 days (sometimes more frequently) my S4 goes into a period of high CPU usage (30-40% capacity, all cores pinned at 1.6GHz) that lasts 2-4 hours, while it consumes battery at about 20% per hour. Using performance analyzers such as Android Tuner, I've ruled out any single app hogging CPU, and the culprit is the Android system itself. I've tried many things to try to stave off or reduce the battery drain if it happens at a bad time, but there seems to be no way to exert any kind of control at this level. I figure that putting governors on the cores won't help because it will reduce my phone's performance while merely extending the time the maintenance requires before it will let my people go, saving no power in the end. Yes, I shut as much stuff down as possible--even going into airplane mode--but once this annoyance begins, it overwhelms any energy conservation efforts. My only viable strategy is then to find an AC outlet and weather the storm there, or plan to finish using my phone within a couple of hours.
I gather from comments people have made in other contexts that if a lot of files change status, then the system needs to do a bunch of stuff, but I'm really not changing that many files, or moving folders around, etc. But it could be that BitTorrent Sync changes a lot if its own system files (while checking in with peers, maintaining its db, and whatever it does), so in response Android then has to do a lot of work maintaining files that the user never directly sees or uses. I do use BitTorrent Sync's auto sleep function, but still.
So I'm wondering if the scenario I'm describing sounds plausible. I'd have to shutdown data sync completely for several days just to do one trial, and it would take several trials to confirm more positively that using BitTorrent Sync is the root of the problem. But I need my data to sync more than I need my battery, so I'm willing to live with short battery times. But it's still a pain in the a$$--and the instances of 2-3 hours battery time are really crippling--so I'm wondering if anyone has any suggestions how to analyze or improve this situation because I don't really know enough. Then maybe I'll be able to suggest something to the BitTorrent Sync devs. I don't want to raise the problem in the BitTorrent Sync forums because very few of the active people there are well-versed in Android, the Windows/Linux/OSX crowd being much more numerous. Any comments are welcome: I want to start collecting info on this issue so that it can be discussed more profitably at the BT forums.
Click to expand...
Click to collapse
I imagine most of the file you are syncing are media files, and here probably lies your problem/solution.
Your drain is more than likely Android Mediaserver which analyzes media files (images, sounds, videos).
You should troubleshoot using BetterBatteryStats to confirm this.
You can always "kill" the Mediaserver, however you'll lose functionality (your phone won't find new media, quite annoying).
The alternative and the better solution in my opinion is to create a .nomedia file in the root directory where all your files are synced so mediaserver skips them completely. This might not be possible if you have a strange hierarchy though.
The vast majority of files are not media files (mostly docx, pdf, and txt), but there are a large number of media files scattered about. The media files don't change much, but if a few changes trigger the media server to perform major operations, then that might explain it.
If I put a ".nomedia" file at the top of a highly nested file hierarchy, will that suppress finding new media throughout the entire tree? That behavior would be fine in my case because the media that I actually use with any frequency is all in its own tree. But if I use the .nomedia trick, will file browsing apps still be able to list the files that are in media format? In that case, I don't see why I'd care if Android's media server ever runs or not. I mean, I do take some photos, but very few. And I always have to use PowerAmp's media scanning function to listen to my mp3's, which are all in their own file hierarchy.
EDIT: I should that I never use any of the stock Android media apps. In that case, do I even need Android's Mediaserver at all?
I put .nomedia files at the top of all my file trees, but I'm still getting, periodically, massive batter drain from the Media Storage process. It will run for hours constantly using more than 25-30% CPU, thus running down my battery entire in a few hours. I don't know how to check for sure, but this seems to indicate that Media Storage does a lot of work involving the trees where the .nomedia files are. I mean, there's no way my phone could be running at a constant 30% without me being able to account for it. Do I need to put .nomedia files in every folder under the same hierarchy? Is Media Server known to sometimes just ignore the .nomedia directive?
Since Android 4.0/1 the media server now references every files on your SD cards. So even those are not actual media files, that might still be the issue.
Not sure BBS or Android Tuner battery stats will reveal anything particular in this situation, but might be worth adding a .nomedia file at the root of your sync folder, at least to confirm.
Since my original post, I've concluded that BitTorrent Sync is the source of Media Storage running so frequently. It's not an error exactly, but because I sync about 16GB in 20,000 files, then each time a file changes on one of the sync peers, then when the phone syncs and changes the file, it causes Media Storage to want to run again. So Media Storage was running 1 or 2 times a day, every day, at the cost of 20-30% battery each time. It looks like bad software design rather than an error. The only thing I could think of was to freeze Media Storage, which turns out not to be as annoying as one might think because apps seems to be able to find the media files, and my file explorer works fine. But I have the annoyance of missing basic things in the Android UI, like ringtones, so my phone never rings for a phone call, only vibrates. I don't care about the other stuff in the OS UI that I'm missing because I have no interest in any kind of theming, but I don't think many people would like freezing their Media Storage process.