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

Search This thread

kbeezie

Senior Member
Feb 23, 2010
1,935
395
Grand Rapids, Mi
karlblessing.com
the .nomedia method is an ancient method to keep media scanners and such from cataloging contents of a folder in regards to music/picture/NES-SNES roms/etc.

Though instead of actually creating the file, you can simply go into adb shell:

Code:
touch /location/to/place/.nomedia

It'll simply create an empty file of that name there.

you can always check the content of a folder with ls -a (-a is for 'all')

Just be weary of where you put it, and often the media server doesn't suck down your battery unless you're constantly mounting/unmounting the SD card and adding new stuff.

ALSO you do not have to put it in every subfolder, if you place it at one level, it applies to all subfolders under it.

Furthermore it helps to actually configure your applications, QuickPic for example lets you include/exclude folders from being queried.
 

HTC=Hero

Member
Aug 7, 2012
43
27
I still have this problem on my HTC Hero running CM7.2, my friend has it on his SGS running CM9. The HTC Legend with CM7.1 my brothers uses doesn't have the problem.
This is what I've tried so far:
  • cleared mediaserver Data/Cache
  • Remove all media I don't need
  • Added .nomedia files everywhere I could
  • cleared cache
  • cleared dalvik cache
  • Cleared SD-Card through Android but restored all data.
  • Tried a completely clean SD-card with only 1 .mp3 file

Nothing helped at all. The only thing that seemed to make the battery drain less severe was the SD-card trick, but this doesn't solve anything it was merely a test. And the result of the test is that it still used to much cpu.

Anybody made any progress on the problem? The only thing I could try is completely reset/wipe and reflash the ROM. Though changing ROM didn't work for my friend and his SGS.

The reason I posted here is because so far this problem seems to be device independent, and this was most recently used.
 
Last edited:

bindi

Senior Member
Aug 5, 2010
88
2
I was ok so far with no major issues with battery drain. From last week or 10 days, I started loosing 35% or more of my battery due to media server. Only recent changes in the usage habit is playing nfs.

I am on Sony Xperia with ICS .587.
 

aVirginGirl

Member
Oct 2, 2012
25
0
Hi everyone.
I use Samsung Captivate. Rom is Paranoid 1.6. (Jelly Bean)
Mediaserver uses 40% of my battery.

I used to fix it:
putted .nomedia to main folder on sdcard abd external card
checked by mp3 Checker all the mp3 and deleted bad files
deleted media storage app by Titanium and then Gallery, picassa upload and all apps I could find around.
Installed apps which use thei own libs. Poweramp, quickPic, mx player.
Tried to use a special app to kill the mediaserver which found in google.

Nothing help!!!!! Who knows any solutions? What I have to try else?
 

patt2k

Senior Member
Mar 22, 2009
3,390
546
mediaserver on Android 4.1.2 right here is using about 4% sometimes up to 10% when I listen to a lot of music so its still not fixed...

Galaxy S3
 

tronmech

Senior Member
mediaserver on Android 4.1.2 right here is using about 4% sometimes up to 10% when I listen to a lot of music so its still not fixed...

Galaxy S3

Well, if it only happens when you are playing audio, then it's not that big a deal because I think that the media server has something to do with playback. In my original case, it took over every idle CPU second because of some media file or files it didn't like.

Sent from my Polaroid Tablet using Tapatalk HD
 

Nastybutler

Senior Member
Nov 18, 2012
500
216
Anchorage
Last night I formatted a 64GB SD card in Fat32 (so TWRP would use it) then reloaded all my music and pictures back onto it as well as moving my TiBu backups and some other stuff to free up my internal storage on my LG Optimus G E970. After that I made a nandroid backup then rebooted and went to bed, leaving the phone on, but plugged into the wall charger. This morning I unplug it, check my email on it (shows 100% charged), lock the screen and go about my business. I check my phone about an hour and a half later and I'm down to 90% battery. I check my battery stats and Mediaserver shows to have used 65% of that discharge. I'm running 4.0.4 with a custom kernel and ROM, but I've been using that particular kernel and ROM for about a week with no issues.

My question is: did formatting my SD card to Fat32 cause Mediaserver to go haywire? Or is it something else? I should mention I did just start using PlayerPro about a day before this, so not sure if that's the culprit or my SD card. I know that's where I'll start is by freezing PlayerPro, but is anyone else having this issue after reformatting an SD card to Fat32?
 

radmin69

New member
Feb 11, 2011
3
2
I too had a problem with media server running and killing my battery. I found that I had left USB Debugging enabled after rooting both my tablets, Motorola Xoom and Nexus 7. I disabled USB Debugging and rebooted the tablets. I haven't seen the media server run until I re-enabled USB Debugging.

Hope this helps.
 

Spartan199

Senior Member
Nov 20, 2012
256
89
Durban
Well i have the media server bug except it only becomes active when i press a button and the key tone plays. when it is on silent and button presses dont produce key tones its not active. Anyone else ?
 

hey_malik

Senior Member
AW: "Who is this 'Mediaserver' and why is he sucking my battery dry?"

What is wrong with this media server thing? I started listening music like 10 minutes ago. And this is what the media server does.
very7yqe.jpg



Gesendet von meinem Nexus 4 mit Tapatalk 2
 
  • Like
Reactions: EBI_LANCER

Hai23fke

Member
Feb 17, 2013
10
1
It's weird seing so many people with this mediaserver problem. I've had my phone for nearly two years and I've never had this problem.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    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
    5
    A temporary solution to the devious mediaserver!

    I couldn't find the cause either. I was on AOKP Build 25. First I noticed the Gallery and Music weren't showing any existing files on the sdcard. Then the phone was always warm, a couple media processes were sucking up all the CPU causing my battery to go down quickly.. What I did which solved the issue was backed up all the important files (pictures, music, titanium backups, etc...) to my PC, reformatted the sdcard, wiped, reflashed the ROM, problem solved.

    As much as I know reformatting usually solves all problems what prevents the problem from reoccurring if we do not know what caused it to begin with? If the problem happened before it will most likely happen again and when It does I want to be ready for it.

    Anyways no luck from GAMEVIL or Watchdog dev. I did however find an app called "System Tuner Pro" that actually sees and identifies mediaserver as a kernel based process and is located in /system/bin/mediaserver. And get this...DUN DUN DUNNNN!!! System Tuner Pro also allows me to kill the stupid process!!! WHOOHOO! Funny thing...when I am playing Arel Wars, which is the culprit behind my mediaserver taking up all my memory, and then switch over to System Tuner Pro and kill mediaserver I can then switch back over to Arel Wars continuing where I left off. So in other words mediaserver does not seem to have a direct impact on the game otherwise the game would error out or close if Arel Wars depended on mediaserver.

    Is this a permanent fix? Nope. But it allows me to kill mediaserver and clean my memory without having to perform a reboot every 5 minutes while playing Arel Wars. I have tried contacting the dev of System Tuner Pro about the problem in hopes I will get a solution, information or somehow to tweak System Tuner Pro to auto kill mediaserver at a certain point. Since it is considered a kernel base process System Tuner Pro will not allow me to put it on auto kill. I will let you know If I get a response.

    Also I have been able to get in contact with the dev of a task killer app called "Auto Memory Manager" which seems to be interested in the problem since the app cannot detect mediaserver. I will you keep you all informed.

    Bottom line this is just a temporary solution but its a lot more then what I have been able to find on other forums. Also consider using an app called "Resource Monitor." It's free and it puts a little monitoring window with the available memory and used CPU in front of all windows so when you are playing a game or listening to music you will always know your memory and cpu so you can take action.

    -peace

    <EDIT>

    By the way I am using stock 2.3.5 Gingerbread which is probably important that I mention. ;P
    3
    "mediaserver" and "Android media process" (media scanner) mixed up!

    Hi!

    I have been experimenting a week or so with this problem and here is what I have found so far:

    I have read many threads about and a common problem seems to be that people mix "mediaserver" and "Android media process" (media scanner) processes. I replied here because JDubbed seems to have analyzed the correct mediaserver problem.

    First I tried all the suggested tricks (putting .nomedia files everywhere, removing sd card, checking mp3s for corruption etc.) but I found that the problem is not the media scanner that people mistakenly think as a mediaserver. I used Watchdog to figure this out. When you unplug USB, the "Android media process" starts and it will use over 50% CPU time for a minute or two, depending how much stuff you have in your phone. It is true that corrupted files might slow this process down, but after a minute or two, the process is gone. It is not the source of the major battery drain and will not show as Media Server in the Android battery stats (it will show as Android system).

    Android media process
    Screenshot_2013-03-02-14-25-59.png


    However, the significant problem seems to be the background process called "mediaserver". This is an Android background process that is used on media streaming and playback. It will not show in Watchdog stats unless you you include phone processes in preferences. This is the Media Server you see in battery stats.

    mediaserver
    Screenshot_2013-03-02-14-19-58.png


    Once triggered, this process seems to stay running forever using same CPU time. I can only get rid of it by rebooting or killing it with System Tuner. I have found a lot of stuff that triggers mediaserver staying in the background. In the list of apps and games I use at least: Dungeon Hunter 3, Soundcloud and Mixcloud. So it is related to streaming media and/or playing audio. It also seems to eat more and more CPU time and RAM the longer you use these apps, like JDubbed found out. The problem is that even the 1,6% CPU time in the above screenshot is preventing my phone to go to deep sleep. It will cause 7-8% battery drain in an hour instead of 2-3% in deep sleep. Constantly raising CPU and RAM amount seems like a possible memory leak to me (it might be just a bugged app instead of bugged mediaserver process), but there might other reasons too. I am now starting to test different I/O schedulers. Maybe some schedulers just don't give media server any CPU cycles when CPU intensive app is running and it crashes while waiting. Anyways, I am running out of ideas and wanted to share this :) Maybe this will spark a new idea from someone.
    3
    the .nomedia method is an ancient method to keep media scanners and such from cataloging contents of a folder in regards to music/picture/NES-SNES roms/etc.

    Though instead of actually creating the file, you can simply go into adb shell:

    Code:
    touch /location/to/place/.nomedia

    It'll simply create an empty file of that name there.

    you can always check the content of a folder with ls -a (-a is for 'all')

    Just be weary of where you put it, and often the media server doesn't suck down your battery unless you're constantly mounting/unmounting the SD card and adding new stuff.

    ALSO you do not have to put it in every subfolder, if you place it at one level, it applies to all subfolders under it.

    Furthermore it helps to actually configure your applications, QuickPic for example lets you include/exclude folders from being queried.
    3
    Probably you have corrupted music/picture file(s) on your sdcard. Search for them and delete - should help.