mdnsd - Firefox Android excessive battery usage

VERIFIED FIXED in Firefox 42

Status

()

Firefox for Android
General
VERIFIED FIXED
3 years ago
a year ago

People

(Reporter: Nad A, Assigned: xeonchen)

Tracking

(Blocks: 1 bug)

42 Branch
Firefox 45
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42+ verified, firefox43+ verified, firefox44+ fixed, firefox45+ fixed, relnote-firefox 42+, fennec43+)

Details

Attachments

(5 attachments)

(Reporter)

Description

3 years ago
Created attachment 8674079 [details]
screenshot of battery stats

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:40.0) Gecko/20100101 Firefox/40.0.2 Waterfox/40.0.2
Build ID: 20150821143155

Steps to reproduce:

Open and use firefox beta as general, 
After some usuage time, 15 - 30 mins, Check Settings - Power management - App usage
There is a process? MSNSD which I believe is occuring when using Firefox Beta.

Phone is Sony Z3, lollipop 5.1.1, latest Firefox beta Android update, Google Play version 42.0, updated 13 october 2015.




Actual results:

Excessive battery usage when using Firefox beta.
Phone Power setting shows MSNSD with increasing usage.




Expected results:

Have only seen this when using firefox since last 3? updates.
If I dont use firefox beta I dont see the MSNSD in battery usuage, and screen usage is usually the first on the usage list.
(Reporter)

Updated

3 years ago
OS: Unspecified → Android
(Reporter)

Comment 1

3 years ago
I have just installed Firefox official version from google play store (release Version 41.0, 22 sept 2015)and can confirmed MSNSD network (mobile data) packets DO not increase as Firefox is used. 
Therefore it is related to Firefox Beta.

I have also wiped fresh data on Firefox beta installation and MSNSD still occurs in the battery usage list and increases as Firefox Beta is used.

Comment 2

3 years ago
Also encountered this on a Moto X 2014

Android version: Android 5.1
System version: 23.16.5.victara_verizon.verizon.en.US vzw
(Reporter)

Comment 3

3 years ago
Still seeing this in the latest update from 20 OCT 2015.
Stock firefox does not have this issue.
(Reporter)

Comment 4

3 years ago
Applied update Oct 23rd, will see how I get on through out the day, although someone has reported new bug few hours ago, https://bugzilla.mozilla.org/show_bug.cgi?id=1217707.
(Reporter)

Comment 5

3 years ago
Created attachment 8679402 [details]
Screen shot of mdnsd background use.

Same issue, process running in background with high battery usage.
(Reporter)

Comment 6

3 years ago
Updated Firefox Android (Stable?) to latest 42 release and the same process, MDNSD is now sitting in battery usage with mobile radio active.
(Reporter)

Comment 7

3 years ago
Fresh rom install, and MDNSD is creaping, running in the background, above screen to.
Any body know how to disable it?
Be appreciated to have a solution if there is no fix as such.

Comment 8

3 years ago
Updated to stable version 42 on T-Mobile Moto X 2014 and MDNSD is showing up as the top battery eating process, vying with Screen.
(Reporter)

Comment 9

3 years ago
Found this on google serach, https://bugzilla.mozilla.org/show_bug.cgi?id=1011340
Seem its something to do with peer discovery / multi cast, but I dont want to be a discovered device or other devices, should be a switch to disable if related to network finding?

Comment 10

3 years ago
I updated to version 42 on a Samsung Galaxy S6 (Verizon) and mdnsd is now showing up on my battery screen as the top process -- I've never seen it before.
Please try using Firefox Beta from the Play store it has a fix involving mdnsd. bug 1194049
Depends on: 1194049
(Reporter)

Comment 12

3 years ago
(In reply to Kevin Brosnan [:kbrosnan] from comment #11)
> Please try using Firefox Beta from the Play store it has a fix involving
> mdnsd. bug 1194049

Intrestring, I have just updated Beta from Play store (glad I left it installed on the phone) and will try it over the next few hours.

Comment 13

3 years ago
I'm able to confirm this behavior with Firefox 42 on Android on an up-to-date Verizon Galaxy S5 and S6.  It's been happening since I updated to Firefox 42.  

mdnsd process drains the battery with Firefox installed, it works fine with Firefox Beta installed.  This seems worthy of fixing fairly quickly as users are surely impacted by this negatively.

Comment 14

3 years ago
My Samsung Galaxy S5 is showing the same behavior with both 42 and the Beta. I'm going to be forced for at least the moment to uninstall Firefox until a fix is created. Battery life on the phone has been cut in half.
(Reporter)

Comment 15

3 years ago
(In reply to Kevin Brosnan [:kbrosnan] from comment #11)
> Please try using Firefox Beta from the Play store it has a fix involving
> mdnsd. bug 1194049

Hi Kevin,
Nope still have the MDNSD service / process? running to the top of the battery list.
(Reporter)

Comment 16

3 years ago
Created attachment 8687679 [details]
tmp_12176-Screenshot_2015-11-14-11-48-11254186021.png

I think we can agree 9 hours is abnormal usage from this process.
tracking-fennec: --- → ?

Comment 17

3 years ago
I've noticed mdnsd on top of apps using my battery as well. It wasn't there prior I've installed v.42. Moto G 2nd gen.

Comment 18

3 years ago
I've noticed mdnsd on top of apps using my battery too. Xperia Z5.
I've uninstalled ver 42, so the battery works normally.

Comment 19

3 years ago
It seems to occur both when a WiFi signal cannot be found and when WiFi is turned off on the phone.

I don't know if it's significant but I tried OS Monitor (http://eolwral.github.io/OSMonitor/) and /system/bin/mdnsd opens four connections: two UDP4 and two UDP6 all with status Listen.
(Reporter)

Comment 20

3 years ago
(In reply to Dave P from comment #19)
> It seems to occur both when a WiFi signal cannot be found and when WiFi is
> turned off on the phone.
> 
> I don't know if it's significant but I tried OS Monitor
> (http://eolwral.github.io/OSMonitor/) and /system/bin/mdnsd opens four
> connections: two UDP4 and two UDP6 all with status Listen.

See attached screen shots, I never switch my wifi off, and still see activity on both Mobile and Wifi.
What is it downloading and where is it going? I guess its local activity but still worrying and riding to top for battery usage.
(Reporter)

Comment 21

3 years ago
(In reply to Dave P from comment #19)
> It seems to occur both when a WiFi signal cannot be found and when WiFi is
> turned off on the phone.
> 
> I don't know if it's significant but I tried OS Monitor
> (http://eolwral.github.io/OSMonitor/) and /system/bin/mdnsd opens four
> connections: two UDP4 and two UDP6 all with status Listen.

Sorry, misread what you wrote, I will check tonight when im on wifi to see if the packet sent / received counter increases.
Assignee: nobody → xeonchen
Status: UNCONFIRMED → NEW
tracking-fennec: ? → 43+
Ever confirmed: true
Blocks: 979119
Status: NEW → ASSIGNED
Summary: mdnsd - firefox beta android excessive battery usuage → mdnsd - Firefox Beta Android excessive battery usage

Comment 22

3 years ago
Android 5.1, Firefox 42.0 (stable release cycle), Moto X 2nd gen, not rooted, Google ROM

I did a bit more poking around. Charged to 100% to clear battery stats, powered off and on to clear processes.

Initial power on - mdnsd does not show up in processes (using OSMonitor, eolwral.github.io/OSMonitor)

Opened Firefox - mdnsd appears in processes and opens 2 UDP4 and 2 UDP6 connections with a status of listen (presumably one for WiFi and one for cellular)

Went to amazon.com and waited for an hour (WiFi on, cellular at 2G) - mdnsd showed minimal CPU usage, did not appear in battery stat screen

Turned off WiFi - mdnsd continues to show minimal CPU usage but it appears in the battery stat screen at 1% after less than an hour and has been climbing at more than 1% per hour

I suspect that the battery drain is related to its radio usage. The battery detail shows that between 7:14 and 7:19 (5 minutes) it sent and received 108 mobile packets

Comment 23

3 years ago
I turned WiFi back on and waited a half hour. Then, looking at another 5 minute sample, no mobile packets were sent or received but 341 WiFi packets were sent and 326 were received. The mismatch between sent and received may have something to do with it.
I shouldn't let MDNS be turned on out side of nightly channel and aurora channel. It's still an experimental feature under development.

For Firefox 42/43 user, a quick fix is to turn off "dom.presentation.discovery.enabled" via about:config.

According to the comment above, mdnsd service is not designed for power saving and it drains the battery while using mobile connection. We should only turn on MDNS service while using WiFi/Ethernet.

Comment 25

3 years ago
My phone (Samsung Galaxy S6) runs on WiFi almost all the time but shows mdnsd as a battery eater with Firefox 42. I had to revert to using 41 to avoid rather severe battery drain.

My tablet (Samsung Galaxy Tab S2) shows no battery problems from Firefox 42 -- but it lacks a mobile radio.  

I'll try updating to 42 again on the phone, turning off dom.presentation.discovery.enabled.
(Reporter)

Comment 26

3 years ago
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #24)
> I shouldn't let MDNS be turned on out side of nightly channel and aurora
> channel. It's still an experimental feature under development.
> 
> For Firefox 42/43 user, a quick fix is to turn off
> "dom.presentation.discovery.enabled" via about:config.
> 
> According to the comment above, mdnsd service is not designed for power
> saving and it drains the battery while using mobile connection. We should
> only turn on MDNS service while using WiFi/Ethernet.

Ah! just toggled this switch, will test as battery is near 2% and will be on charge shortly.
Hopefully this cures it, apart from MDNS I have no issues with using Firefox Beta.

Can someone clarify what MDNS/D is suppose to do?

Thanks.
(In reply to Nad A from comment #15)
> (In reply to Kevin Brosnan [:kbrosnan] from comment #11)
> > Please try using Firefox Beta from the Play store it has a fix involving
> > mdnsd. bug 1194049
> 
> Hi Kevin,
> Nope still have the MDNSD service / process? running to the top of the
> battery list.

Hi Nad, do you mean MDNSD still consume your battery when you use Firefox 43?
Did you kill/uninstall Firefox 42 on the phone?

Comment 28

3 years ago
(In reply to Bill Waldron from comment #25)
 
> I'll try updating to 42 again on the phone, turning off
> dom.presentation.discovery.enabled.

No good. I updated from 41 to 42.0.1, turned off dom.presentation.discovery.enabled, but battery has run down 13% in two hours (mdnsd top user at 7%), with phone just sitting on my desk after opening Firefox 42.0.1 once. Running on WiFi.

Back to 41 for me -- or I'll just use Chrome until this is fixed.

Comment 29

3 years ago
After updating to Firefox 42 on my Galaxy S5 I began experiencing battery drain from mDNSd. The problem (and mDNSd) went away when I uninstalled 42 and downloaded Firefox Beta 43 ... until this morning when Firefox Beta was updated and mDNSd reappeared in my battery usage list. The drainage doesn't seem to be as severe but mDNSd is still using the battery. Why?
I suggest we turn off this feature (effectively turn off Bug 1158029) on all branches until Gary can get this in a known good state.

Finkle, concur?
Flags: needinfo?(mark.finkle)
status-firefox42: --- → affected
status-firefox43: --- → affected
status-firefox44: --- → ?
status-firefox45: --- → ?
Hardware: Unspecified → All
I don't think "dom.presentation.discovery.enabled" even controls the MulticastDNS.jsm in Firefox for Android. It's disabled by default, but I still see this logging appear:

http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/mdns/libmdns/nsDNSServiceDiscovery.js#117

I also see logcat stuff like:
D/MdnsClient(22207): Multicast lock held. Releasing

and 

D/NsdService(  549): New client listening to asynchronous messages
D/NsdService(  549): New client, channel: com.android.internal.util.AsyncChannel@28dd643e messenger: android.os.Messenger@20c2c29f

I'll try to add some logging to see what code is executing. None of it should be, but something is running.
(In reply to Richard Newman [:rnewman] from comment #30)
> I suggest we turn off this feature (effectively turn off Bug 1158029) on all
> branches until Gary can get this in a known good state.
> 
> Finkle, concur?

Yes, but we need to figure out "how" to turn it off. The Gecko preference is not enough.
Flags: needinfo?(mark.finkle)

Comment 33

3 years ago
Updated to 42.0.1, turned off dom.presentation.discovery.enabled,  still seeing issue. 

Turn off WiFi and mdnsd immediately starts banging out mobile packets, turn WiFi back on and it immediately stops the mobile packets and starts banging out WiFi packets. 

It's as if it's lost a sync point and keeps trying to recover but can't get a match.
(Reporter)

Comment 34

3 years ago
(In reply to Gary Chen [:xeonchen] from comment #27)
> (In reply to Nad A from comment #15)
> > (In reply to Kevin Brosnan [:kbrosnan] from comment #11)
> > > Please try using Firefox Beta from the Play store it has a fix involving
> > > mdnsd. bug 1194049
> > 
> > Hi Kevin,
> > Nope still have the MDNSD service / process? running to the top of the
> > battery list.
> 
> Hi Nad, do you mean MDNSD still consume your battery when you use Firefox 43?
> Did you kill/uninstall Firefox 42 on the phone?


Hey Gary, Yes, firefox 43 (Beta) MDNSD battery consumption runs to the top i.e. the highest.

On another note, I know Adblock browser android is Firefox based, not sure what version but that is not affected by MDNSD runnning in the background. Maybe Dev's can compare sources, but I know last known not affected version was Firefox v.41.

Comment 35

3 years ago
Since this morning's update of Firefox Beta "mdnsd" is at 1% usage after my phone being on almost 12 hours and "battery percentage" is showing "approximately 19 hrs left". This appears to have been a good update of Beta.
(Reporter)

Comment 36

3 years ago
(In reply to Bob Robertson from comment #35)
> Since this morning's update of Firefox Beta "mdnsd" is at 1% usage after my
> phone being on almost 12 hours and "battery percentage" is showing
> "approximately 19 hrs left". This appears to have been a good update of Beta.

Bob, Thanks for the feedback, the latest google play store update I have is the 17th nov, do you have the same as I didnt and havent seen any update today?
Also what is your Mobile radio active time? As I believe that is what records the process running and the time increases? The info will be on battery stats then within MDNSD info.
See the screen shots attached.

Comment 37

3 years ago
I just tried the new Beta today I ran my phone for 10 hours on mostly wifi but some mobile and the MDNSD program was at the top of my battery list at 33% of total usage. The Beta does not fix the issue.
The first thing to do is follow bug 1194049 comment #55 to remove the overhead of unused MDNS service.

The second thing to do is figure out to control the lifecycle of MDNS daemon.
In Android system the lifecycle of the daemon is controlled by NsdService. It'll only stop the daemon if there is no active NsdManager connected [1]. However, the NsdManager created by Context.getSystemService() is cached until application closed [2]. If we can create the NsdManager and manage the object lifetime by Gecko without using Context.getSystemService(). We might get a chance to control MDNS daemon in a fine-grained manner.

[1] https://android.googlesource.com/platform/frameworks/base.git/+/master/services/core/java/com/android/server/NsdService.java#162
[2] https://github.com/android/platform_frameworks_base/blob/master/core/java/android/app/SystemServiceRegistry.java#L357
(Reporter)

Comment 40

3 years ago
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #39)
> The first thing to do is follow bug 1194049 comment #55 to remove the
> overhead of unused MDNS service.
> 
> The second thing to do is figure out to control the lifecycle of MDNS daemon.
> In Android system the lifecycle of the daemon is controlled by NsdService.
> It'll only stop the daemon if there is no active NsdManager connected [1].
> However, the NsdManager created by Context.getSystemService() is cached
> until application closed [2]. If we can create the NsdManager and manage the
> object lifetime by Gecko without using Context.getSystemService(). We might
> get a chance to control MDNS daemon in a fine-grained manner.
> 
> [1]
> https://android.googlesource.com/platform/frameworks/base.git/+/master/
> services/core/java/com/android/server/NsdService.java#162
> [2]
> https://github.com/android/platform_frameworks_base/blob/master/core/java/
> android/app/SystemServiceRegistry.java#L357


I have disabled dom.presentation.discovery.enabled in about:config and the process / deamon still runs for me?

Comment 41

3 years ago
After several days of better battery life with Firefox Beta, yesterday mdnsd again started using most of my battery so, faced with extended travel this week, I uninstalled Beta.
Battery usage is quite normal now, so I guess I'll get by with Chrome until Firefox is fixed. Bummer!

Comment 42

3 years ago
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #39)
> The first thing to do is follow bug 1194049 comment #55 to remove the
> overhead of unused MDNS service.
> 
> The second thing to do is figure out to control the lifecycle of MDNS daemon.
> In Android system the lifecycle of the daemon is controlled by NsdService.
> It'll only stop the daemon if there is no active NsdManager connected [1].
> However, the NsdManager created by Context.getSystemService() is cached
> until application closed [2]. If we can create the NsdManager and manage the
> object lifetime by Gecko without using Context.getSystemService(). We might
> get a chance to control MDNS daemon in a fine-grained manner.
> 
> [1]
> https://android.googlesource.com/platform/frameworks/base.git/+/master/
> services/core/java/com/android/server/NsdService.java#162
> [2]
> https://github.com/android/platform_frameworks_base/blob/master/core/java/
> android/app/SystemServiceRegistry.java#L357

With respect to #2: I made a point with Fx42 and Fx43 Beta of quitting Firefox each and every time I stopped using the program. It did not show up in the list of running apps on S5 Android 5.0.1 in each case. However, mdnsd process kept on incrementing on battery life after the initial run with either of the two FF's.
So: zombie process?
(Be kind - first post here.)

Comment 43

3 years ago
It may depend on what you mean by quit.

If I use the quit option on FF menu - FF is in recent list and (per OSMonitor) is a running process as is mdnsd (and mdnsd maintains 4 listen connections and constantly sends and receives packets).

If after quitting I swipe it right off the recent list it actually shuts down and shuts down mdnsd with it. Note that the may depend on how Android feels at the time (e.g. what else is active, free memory, etc.). Killing the FF process from OSMonitor (or, I assume, force stopping it from Apps) has the same beneficial effect.
Created attachment 8691040 [details] [diff] [review]
lazy-init nsdmanager.patch

Based on comment 39, here's the temp solution that makes the creation of NsdManager being postponed until mDNS requests are received.

I'm currently delegated to another project and couldn't have time to handle this. It would be thankful if anyone can help to work on the issue.
Attachment #8691040 - Flags: feedback?(rnewman)
Created attachment 8691049 [details] [diff] [review]
usedummy-mdns v0.1

How about we disable it altogether on beta and release?
Attachment #8691049 - Flags: review?(xeonchen)
Comment on attachment 8691049 [details] [diff] [review]
usedummy-mdns v0.1

Review of attachment 8691049 [details] [diff] [review]:
-----------------------------------------------------------------

This will remove the mDNS feature on Fennec and will not be able to quickly switch on by preference setting.
I'm not sure if anyone would be concerned, but I'm totally okay with this.
Attachment #8691049 - Flags: review?(xeonchen) → review+
Comment on attachment 8691049 [details] [diff] [review]
usedummy-mdns v0.1

Approval Request Comment
[Feature/regressing bug #]:
[User impact if declined]: Noticeable battery usage
[Describe test coverage new/current, TreeHerder]: none
[Risks and why]: Low - The feature this code is supposed to support is not even enabled
[String/UUID change made/needed]: none

Given that this is causing noticeable battery usage, and we have three weeks until shipping Fx43, I want to consider this patch for a Fx42 point release. Before we make that decision, this patch should be uplifted to Aurora and Beta so we can get confirmation that the change stops the battery usage.

I'd also be happy to know if anyone can confirm Nightly is affected before the patch and fixed after the patch.
Attachment #8691049 - Flags: approval-mozilla-release?
Attachment #8691049 - Flags: approval-mozilla-beta?
Attachment #8691049 - Flags: approval-mozilla-aurora?

Comment 49

3 years ago
Hi All!
Sorry for my bad English, I'm from Ukraine.

For several years I use Firefox, but now forced to abandon. The trouble is that I have not only the process mdnsd drains the battery, but also constantly (even when the WiFi enabled) interrogates the mobile data. At intervals of 2-3 seconds. My operator is charged by rounding the data to 200kb. So a few hours run over hundreds of Mb ...

My Phone is - Sony Xperia Z1 (android 5.1.1)/ Firefox 43.0b4
When I uninstall Firefox - no mdnsd and no periodic connections to mobile data.

Comment 50

3 years ago
Also it´s happening to me.

I´m using firefox beta 43.0 from playstore in a Oneplus One mobile with custom rom, mdnsd is running almost all the time.

Hope you find a solution.

Comment 51

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c90ac54a37d3
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox45: ? → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Tracking for 43 as this sounds like a recent and fairly severe regression. Also suggesting we track for 42 and 44. 
Let's verify this on Nightly and then uplift to at least beta. Ioana or maybe Kevin, can you verify the fix?
tracking-firefox42: --- → ?
tracking-firefox43: --- → +
tracking-firefox44: --- → ?
tracking-firefox45: --- → +
Flags: needinfo?(ioana.chiorean)
Editing the bug summary to reflect that this isn't just a problem on beta.
Summary: mdnsd - Firefox Beta Android excessive battery usage → mdnsd - Firefox Android excessive battery usage
Assuming that it is a problem for 44 as well + tracked for 44.
status-firefox44: ? → affected
tracking-firefox44: ? → +
Anyone who can reproduce this bug should try to install Fennec Nightly, where the proposed fix has landed. See if the battery usage has returned to normal.

For those that have not installed Nightly before, you can have it installed side-by-side with Beta or Release. Just make sure that Beta or Release are not running while you test Nightly.

https://nightly.mozilla.org

Comment 56

3 years ago
Latest nightly build seems to solve the issue for me. After four hours of use mdnsd doesn´t appear as used in battery statistics.

Comment 57

3 years ago
Nightly seems to work. No background packets being sent. Turning WiFi on and off doesn't affect it. 

One thing I noticed is that Nightly created it's own listener connections (previously they showed up as mdnsd) but whereas mdnsd maintained two UDP4 and two UDP6 listeners,  Nightly only maintained two UDP4 and no UDP6 listeners.
Sounds good. Thanks Joaquín and Dave P!f
Comment on attachment 8691049 [details] [diff] [review]
usedummy-mdns v0.1

Removes code for unused feature, prevent bad battery drain. 
Verified by commenters.  Please uplift to aurora and beta for a beta 7 mobile build this Thursday.
Attachment #8691049 - Flags: approval-mozilla-beta?
Attachment #8691049 - Flags: approval-mozilla-beta+
Attachment #8691049 - Flags: approval-mozilla-aurora?
Attachment #8691049 - Flags: approval-mozilla-aurora+
Comment on attachment 8691040 [details] [diff] [review]
lazy-init nsdmanager.patch

Looks like we just turned this off.
Attachment #8691040 - Flags: feedback?(rnewman)

Comment 61

3 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/23f7d90263fb
status-firefox44: affected → fixed

Comment 62

3 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/36bac9aa9b83
status-firefox43: affected → fixed

Comment 63

3 years ago
(In reply to Mark Finkle (:mfinkle) from comment #55)
> Anyone who can reproduce this bug should try to install Fennec Nightly,
> where the proposed fix has landed. See if the battery usage has returned to
> normal.
> 
> https://nightly.mozilla.org

Liz, Mihai is trying now to reproduce it and we will prepare to verify it if we will have a new build on release.
Flags: needinfo?(ioana.chiorean) → needinfo?(mihai.g.pop)

Comment 64

3 years ago
(In reply to Ioana Chiorean from comment #63)
> (In reply to Mark Finkle (:mfinkle) from comment #55)
> > Anyone who can reproduce this bug should try to install Fennec Nightly,
> > where the proposed fix has landed. See if the battery usage has returned to
> > normal.
> > 
> > https://nightly.mozilla.org
I want to say this very carefully. I installed the nightly, put on my normal add-on (ghostery), added the usual bookmarks, and started using the program.
Correct: No mdnsd processes appear in the battery life.
However.. And this is where I wish I had a way to stick an ammeter on the battery so I could measure what was happening doing comparable things with the nightly. Basically, it appears that the nightly impacted battery life. When using the nightly on and off for 20 minutes at a time, separated by a few hours, the estimated battery life on the G5 android 5.0.1 phone being used was about four hours, starting from a full charge. Of course, using a program means that the estimator is going to estimate upon the current being used at the beginning, which can give a false reading thereby. However, realizing that this might be the issue, got off the phone, closed the nightly, and went about my business for a couple of hours without using the phone. Then got back on, checked battery life, and while it had not decreased those couple of hours spent not using the phone, it was down about one hour for the two that the phone had been in standby. More usage of the nightly resulted in similar decreases in battery life.
With FF 41.0.2 installed this somewhat precipitate decrease in battery life does not occur.
Call me paranoid, but it was pointed out in the comments above that in the nightly the mdnsd software is running, but instead of four attachments, two to ipv6 and two to ipv4, there's now two of them connected to ipv4. Um. That seems consistent with what I'm seeing: Reduced battery life, but not as bad as V42/V43Beta, but not as good as V41.
Or I could just be dead wrong. Wish there was a way to get accurate load numbers.. I've got the test equipment to measure current drain at work, but I don't fancy soldering wires to the contacts on my phone.
Finally, I note that V43Beta was updated on the Google Play Store to a release dated Nov 24, 2015. I put that in this morning - and immediately, there was mdnsd, doing its battery-sucking best. Back to V41.0.2 for now.
Gad, I've installing/uninstalling a lot of FF loads recently.
(Reporter)

Comment 65

3 years ago
Can confirm Firefox Beta update 24th Nov (this morning) still has the MDNSD process running, nightly does not seem affected, however havent used it long enough to notice #Kenneth Becker's findings.

BTW love the little changes / additions in the nightly, cant wait for beta / stable v44/5.
Comment on attachment 8691049 [details] [diff] [review]
usedummy-mdns v0.1

This is a potential driver for 42.0.2 (mobile only).
Attachment #8691049 - Flags: approval-mozilla-release? → approval-mozilla-release+
Tracking for the reason in comment #66.
tracking-firefox42: ? → +

Comment 69

3 years ago
Unfortunately, I wasn't able to reproduce this issue, so can not verify this when fixed.
Tested on Samsung Galaxy S5 (Android 5.0) and Xiaomi Mi 4i (Android 5.0.2) on Firefox 43 Beta 6.
mdnsd does not appear in Battery use.
I've tried also with adb shell dumpsys batterystats and found the process "mdnsd" but the Estimated power use (mAh) is insignificant.
Flags: needinfo?(mihai.g.pop)
(In reply to Mihai Pop from comment #69)
> Unfortunately, I wasn't able to reproduce this issue, so can not verify this
> when fixed.

I don't think anyone at Mozilla has been able to reproduce the issue, which made this hard to find and fix. We'll need to depend on outside help to tell us if the battery usage has decreased. Generally speaking, it looks like people using Nightly are seeing less battery usage. We'll get more feedback when this is on Beta.

Comment 71

3 years ago
I have this issue on my device. I have downloaded Firefox Nightly and I'll get back in a day whether this issue is fixed.

Comment 72

3 years ago
After some time with nightly, the there's no sign of mdnsd. The device battery life also went from one day to two days.

Comment 73

3 years ago
On 11/27 I once again downloaded and installed Beta on my Galaxy S5 and 12 hours later mdnsd showed 22% usage, so I uninstalled it and will try 42.01 tomorrow. Will a fixed version be available to download any time soon?
(In reply to Bob Robertson from comment #73)
> On 11/27 I once again downloaded and installed Beta on my Galaxy S5 and 12
> hours later mdnsd showed 22% usage, so I uninstalled it and will try 42.01
> tomorrow. Will a fixed version be available to download any time soon?

As far as I can tell, only Nightly and Aurora have the fix. Firefox Beta should have the fix, but that build has not been pushed to the Play Store yet. Firefox 42.0.1 does not have the fix in it. We will create a Firefox 42.0.2 for the fix very soon.

Comment 75

3 years ago
I installed the upgrade of Beta on 11/28 and I'm happy to say, I've got my battery back!
Thanks to all who worked on this. I'm looking forward to the release of 42.0.2

Comment 76

3 years ago
We we're not able to reproduce this on 42.0.2 RC, but we weren't able to reproduce this before it was fixed. We'll need more feedback from the users after 42.0.2 will be available on Play Store.
Added to the release notes.
relnote-firefox: --- → 42+

Comment 78

3 years ago
Seems that 42.0.2 fixes this issue for me.
Android 5.1.1 on Sony Z3C/D5803.

Comment 79

3 years ago
(In reply to github from comment #78)
> Seems that 42.0.2 fixes this issue for me.
> Android 5.1.1 on Sony Z3C/D5803.

Seems so for me as well.

Comment 80

3 years ago
I switched from Beta (which was working) to 42.0.2 and last night at bedtime my battery showed:
"16 hr. 24 min. 54 sec on battery", "1 day 9 hrs left"
mdnsd is dead, long live Firefox!  Thanks, everybody!

Comment 81

3 years ago
42.0.2 works for me, too. So did the earlier beta. Good work, guys!
Thanks for all the confirmation, this is appreciated!
Status: RESOLVED → VERIFIED
status-firefox42: fixed → verified
status-firefox43: fixed → verified

Comment 83

3 years ago
Hello,

I am still suffering from the firefox battery drain on my Galaxy Note 4. I have installed the latest stable version from google play which has been updated 15th of December. From this post, I can not conclude if I should expect it to have been resolved or should I switch to the beta version ???

I would appreciate if you could please add a more clear conclusion here by clarifying what do you mean exactly by 'fixed' and 'resolved' in the status.

Thanks
File a new bug. This was a specific Android feature that Firefox called into and regressed battery usage. This code was removed thus exact thing is no longer a problem.

Comment 85

a year ago
Hello, I use Firefox as my android browser, and according to my phone, mdnsd is responsible for 50% of my battery consumption.

Comment 86

a year ago
(In reply to Imre Péntek from comment #85)
Mr. Pentek: I'm just one of the chickens (i.e., not a developer) and so haven't worked up to peering at the code to see what's what. However, My Galaxy S5 is still running Firefox, now up to 51.0.3, and I'm not seeing any MDNSD battery drain issues. What version of FF are you running on your phone? I know it's a silly question, but have you updated FF since January of 2016?

Comment 87

a year ago
(In reply to Kenneth Becker from comment #86)
I'm running 51.0.3, which is the up-to-date version according to both firefox and play store. Samsung galaxy note 2.
File a new bug. This was a specific Android feature that Firefox called into and regressed battery usage. This code was removed thus exact thing is no longer a problem.
Restrict Comments: true
You need to log in before you can comment on or make changes to this bug.