Subsonic icon indicating copy to clipboard operation
Subsonic copied to clipboard

Battery drain

Open ghost opened this issue 7 years ago • 40 comments

It's happened quite a few times since I upgraded to Nougat on my Nexus 6P.

Example: http://i.imgur.com/xBxpIAn.png

DSub doesn't have to be playing music for it to occur.

ghost avatar Oct 16 '16 01:10 ghost

Can someone try out this apk and let me know if they see a brief toast onPause when they exit the application? Pressing back or pressing home should both trigger it.

https://dl.dropboxusercontent.com/u/23354647/DSub%205.3.1-fix.apk

daneren2005 avatar Oct 17 '16 18:10 daneren2005

"App not installed. This package appears to be corrupt."

ghost avatar Oct 17 '16 20:10 ghost

Weird. I tried re-compiling it and uploading so try again. I imagine something just got corrupted when either uploading to dropbox or you downloading it.

daneren2005 avatar Oct 17 '16 21:10 daneren2005

Another user screenshot: screenshot_20161014-134552

daneren2005 avatar Oct 17 '16 21:10 daneren2005

Sorry it's not working

ghost avatar Oct 18 '16 10:10 ghost

Was able to install and saw the onPause toast when pressing back & pressing home on Android 6

keckelt avatar Oct 18 '16 10:10 keckelt

Another user was able to install and verify that the onPause is still being called correctly on Android 7: Just installed. I do see it when I exit by hitting back, by hitting home and when selecting exit from the daub home screen context menu. That last one it the only one that pauses the music though. I also see it a few other random times like entering the settings menu but that also doesn't pause music.

daneren2005 avatar Oct 18 '16 20:10 daneren2005

Maybe I wasn't able because I'm enrolled in the beta?

ghost avatar Oct 20 '16 15:10 ghost

It might be that simple. Here are a couple of apk's based off the latest Beta code. The first one upgrades the support library to the latest version made for Android 7.0. The second one just removes casting functionality to see if something is going wrong with that.

https://dl.dropboxusercontent.com/u/23354647/DSub%205.3.2%20BETA%20Upgrade%20Support%20Library.apk https://dl.dropboxusercontent.com/u/23354647/DSub%205.3.2%20BETA%20Remove%20Cast.apk

I am also looking into buying a a Nexus 5x to directly debug. Can you think of any options you normally change which are different than the defaults? While there are quite a few people reporting this, it definitely is not as high as it should be if everyone was experiencing this. I'm trying to think of anything which could narrow down what the issue could be.

daneren2005 avatar Oct 20 '16 18:10 daneren2005

Are these supposed to give me any toast messages? I installed the apk files.

ghost avatar Oct 20 '16 19:10 ghost

No they are not supposed to give toast messages. I just want to see if they still give you a huge battery drain while running them. And you can only have one installed at a time. Which one did you install and have you been noticing the same issue so far?

daneren2005 avatar Oct 21 '16 14:10 daneren2005

http://i.imgur.com/RwigkGi.png http://i.imgur.com/4eFpm55.png No drain yet on the apk that removes casting functionality. The initial wakelock with the screen off was because I was playing music with DSub.

ghost avatar Oct 21 '16 16:10 ghost

Another user has verified that the old version of DSub 5.2.2 works fine without the battery drain. If you are not seeing any battery drain with that version without casting functionality, I would try https://dl.dropboxusercontent.com/u/23354647/DSub%205.3.2%20BETA%20Remove%20DLNA.apk. This version ONLY removes DLNA casting functionality. Upgrading the library I use for DLNA casting was the only change related to casting I made between 5.2.2 and 5.3.

PS I am trying to get more people on this thread so the testing isn't all on you/so we can get more data.

daneren2005 avatar Oct 21 '16 17:10 daneren2005

The battery drain for me only shows up when DSub has to fetch something from the server to play. If I am in offline mode or I play only cached music, battery usage is fine. My hacky work around has been to cache what I want to hear and then force kill DSub, this seems to keep battery usage down quite a bit. If you have something specific you want tested, please let me know (I have Nougat on a Nexus 6p).

khers avatar Oct 22 '16 21:10 khers

I purchased a Nexus 5x, but didn't realize it only came with a USB C -> C cable. I won't be able to do any more debugging on this for a couple more days until Amazon delivers some A -> C cables.

daneren2005 avatar Oct 25 '16 00:10 daneren2005

@daneren2005 should we be testing that 5.3.2 beta with DLNA removed? I see the same battery drain on a Pixel running Nougat.

pdf avatar Oct 30 '16 13:10 pdf

Yes that would be good. I bought a nexus 5x but am unable to reproduce the battery drain. Is anyone able to list their settings so I can see what I might need to set differently?

daneren2005 avatar Oct 30 '16 15:10 daneren2005

I get 'The package appears to be corrupt' trying to install that no-DLNA package. I tried downloading the file from my computer too, to be sure, same thing.

There's no settings export in DSub, is there?

pdf avatar Oct 30 '16 22:10 pdf

I forgot I have done an update since I put that out so the versions don't match. I will have to recompile them again. No there is no export. I will have to see how long it would take to make one

daneren2005 avatar Oct 31 '16 16:10 daneren2005

Here are some different test versions: DLNA removed: https://dl.dropboxusercontent.com/u/23354647/DSub%205.3.2%20Remove%20DLNA.apk Chromecast removed: https://dl.dropboxusercontent.com/u/23354647/DSub%205.3.2%20Remove%20Chromecast.apk All casting removed: https://dl.dropboxusercontent.com/u/23354647/DSub%205.3.2%20Remove%20Casting.apk

daneren2005 avatar Oct 31 '16 22:10 daneren2005

I found the same issue where dsub was using a proportionally high amount of battery%. I installed the All casting removed package and have thus far seen a marked improvement in battery usage. Before it was not unusual to see 15-20% usage for dsub, but thus far I haven't even seen it show up in the battery usage monitor since updating.

QuillOmega0 avatar Nov 02 '16 21:11 QuillOmega0

I've been using the DLNA removed version the last couple of days, seems good but I want to give it a little more time.

pdf avatar Nov 02 '16 22:11 pdf

I've been experiencing the same battery drain since I'm on Android 7, and also Android 7.1.1 on my Nexus 6P. The test version without any casting seems to be fine, no battery drain so far. For the record. On one day battery usage for Dsub could be 20%, without actually using it, and the main usage of the app would be the Wifi connection. Now, after using Dsub listening to music for an hour it's only on 1% of battery usage.

OpenAai avatar Nov 03 '16 10:11 OpenAai

DLNA removed version seems to do the job here.

pdf avatar Nov 05 '16 10:11 pdf

It's good to know the root issue is with DLNA. I am trying to figure out what the root issue is

daneren2005 avatar Nov 07 '16 22:11 daneren2005

5.3.3 Is a battery drainer as wel.

OpenAai avatar Nov 14 '16 17:11 OpenAai

Since I have the same issues with the current release, I will install the non cast version and report.

plastikman avatar Nov 16 '16 00:11 plastikman

I can confirm that running with "DSub 5.3.2 Remove DLNA.apk" the battery drain is gone. My phone is no longer smoking hot and the battery is back to respectable times!

I know that the issue is not "Fixed" but I am glad my favorite music streamer is working properly again.

Thanks @daneren2005

plastikman avatar Nov 16 '16 17:11 plastikman

5.3.3 is still sucking the battery dry.

QuillOmega0 avatar Nov 18 '16 00:11 QuillOmega0

@QuillOmega0 I don't think that @daneren2005 ever said that 5.3.3 was fixed. Turn off auto updates in the play store for dsub, then install one of the known working versions that are listed in this issue. I am sure once there is a workable update to solve the drain issues there will be a 5.3.4 release.

plastikman avatar Nov 18 '16 18:11 plastikman