yashsingh1/xdaforums huggingface dataset:
[HTC 10 Guides, News, & Discussion] devsk:
The sad part is that good wifi connection is supposed to eat less battery than good LTE connection, its just simple physics (signal travelling over longer distance requires more energy). This phone can rock on the battery front!!

If only HTC developers paid attention to the massacre that happens with wifi in the logcat and dmesg, they will realize that they are just killing the battery. One look at the logcat and dmesg tells the story. I just can't comprehend how a good developer can look at that say we are doing close to the best we can do. Its not remotely close to what can be done.

The debugs alone are chewing through the CPU (read battery) and internal storage (read battery). Why do we need those verbose logs from wpa_supplicant for example? What purpose do they have? But you have like a thousand of them passing through the CPU/memory in a minute and half. Its just very rudimentary and careless programming!
[HTC 10 Guides, News, & Discussion] Locklear308:
Perhaps this explains why battery tests look bad generally but I've also seen people who are rocking some mega battery life? Is there anyway to fix this with root/roms/flashing something/etc? I'm almost never on stock roms lol

So what is the wifi just scanning over and over? I was a bit confused. I'm great with computers but wireless stuff has always been like... witch craft lol
[HTC 10 Guides, News, & Discussion] Genetic517:
Seems to me they are just oblivious to this bug. Maybe we should blow up there twitter? Lol
[HTC 10 Guides, News, & Discussion] Superguy:
I'm thinking we should. #wifigate lol

Go Pens!
[HTC 10 Guides, News, & Discussion] EtherealRemnant:
Well to be honest they seem to have addressed it to a point... wlan_rx_wake is sitting at 10% instead of 20 and my phone only was awake 3% of the time with the screen off. Also in betterbatterystats the no and unknown signal is no longer 100 percent but 0.

While I was sleeping the battery didn't drop near as much as it did on 1.53 and since this is first boot after a complete wipe and flash, lower battery life is an expectation. You can clearly see from my battery screenshot where I was sleeping and how little the device was awake. This is even better than when I had used Greenify on the old build as well.
[HTC 10 Guides, News, & Discussion] Genetic517:
Is this on the new US 1.8 firmware?
[HTC 10 Guides, News, & Discussion] EtherealRemnant:
Yes it is. I RUU'd back to stock, skipped the phone setup, installed the OTA, flashed TWRP, factory reset, rooted, then set up the phone fully which is why there's a huge drop in the beginning with everything syncing and such. I restored all my apps with TiBu as well during that time. Considering I haven't even run Greenify yet, it's really quite good for first boot.
[HTC 10 Guides, News, & Discussion] Genetic517:
Thanks will give it a try! You could have just flashed the firmware FYI. Didn't have to go through the ruu process [emoji6]
[HTC 10 Guides, News, & Discussion] EtherealRemnant:
I'm aware of that but I wanted a totally fresh install to compare with which just flashing the firmware wouldn't have given me. Compared to a fresh 1.53 flash, 1.8 is a noticeable improvement.
[HTC 10 Guides, News, & Discussion] _-..zKiLLA..-_:
I am getting my HTC 10 today and this thread makes me happy and sad at the same time lol. I might be a good test subject for a fresh device with the new fw, I am all for battery life :good:
[HTC 10 Guides, News, & Discussion] Haldi4803:
Wtf?

# /system/bin/sh
root@htc_pmeuhl:/storage/emulated/0 # su
dmesg|grep "msm_pcie_pm_suspend: RC0: PM_Enter_L23 is received" | head
dmesg|grep "msm_pcie_pm_suspend: RC0: PM_Enter_L23 is received" | tail
dmesg|grep "msm_pcie_pm_suspend: RC0: PM_Enter_L23 is received" | wc
dmesg|grep "msm_pcie_pm_suspend: RC0: PM_Enter_L23 is received" | head
dmesg|grep "msm_pcie_pm_suspend: RC0: PM_Enter_L23 is received" | tail
dmesg|grep "msm_pcie_pm_suspend: RC0: PM_Enter_L23 is received" | wc
ie_pm_suspend: RC0: PM_Enter_L23 is received" | head <
ie_pm_suspend: RC0: PM_Enter_L23 is received" | tail <
ie_pm_suspend: RC0: PM_Enter_L23 is received" | wc <
0 0 0
root@htc_pmeuhl:/storage/emulated/0 #

What could be blocking this?

And I closed all apps before I went to sleep!
[HTC 10 Guides, News, & Discussion] grega_slo:
With latest 1.80 firmware and base ROM, still same sh*t.

I really don`t get it, how can`t they fix it??
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
yeah so just disabling RA at all doesn't seem like a good idea. I've just disabled now ipv6 (not RA) via that sys flag, had my phone sleeping for 90 minutes and it was still receiving push messages from whatsapp so I think this actually might be a good work around, better than just disabling it on the router.
[HTC 10 Guides, News, & Discussion] devsk:
That's pretty bad!! It disables IPv6 on all interfaces, including the ones for data. This will not work with IPv6-only networks like T-Mobile once you move out of your wifi zone (home/office). You will have no data connection.

We really only want to disable IPv6 for wifi (and that too when we know the DHCP server you will be talking to gives out IPv4 addresses). The right place for this is the post-connect/post-up hooks provided by wpa/nm/wicd or whatever we are using to connect to wifi. I am sure the wpa in Android has a place to put this hook into.
[HTC 10 Guides, News, & Discussion] devsk:
[MENTION=3296134]gekkehenkie11[/MENTION]: it hasn't come up, so not sure if you know. There is this very simple flow based programming infra called Automate (like Tasker). It has a block for screen on/off event. You can easily use that to implement disabling IPv6 for wlan0 on screen off. I have it installed and I am going to try this. I will let you know if that makes any difference in the idle wifi drain.

PS: I am a big fan of Automate. If you want full control over your phone (other than UI elements), Automate is all you need.
[HTC 10 Guides, News, & Discussion] grega_slo:
Yeah some routers sux and RA interval cannot be configured:

http://www.zdnet.com/article/how-ba...can-drain-smartphone-and-tablet-battery-life/

https://tools.ietf.org/html/rfc7772
[HTC 10 Guides, News, & Discussion] ivicask:
I can also add that to my PnP mod. Is there a way to check if ipv6 is currently used?So i could add to disable it on screen off, but only if its not used, would be clean and safe solution for everyone.

Bed time, will check tomorrow more..
[HTC 10 Guides, News, & Discussion] ivicask:
Well couldn't sleep, i quickly added this to my PnP mods, tested it quickly and works great, give it a try if your already using my mod and have this WIFI issues

Balanced&Performance disable WLAN IPV6 on screen OFF

View attachment Tweaked_pnp_thermal_ivicask_v20.zip
[HTC 10 Guides, News, & Discussion] grega_slo:
Ummm okay, what if I don't want to disable ipv6 on screen off?
[HTC 10 Guides, News, & Discussion] andybones:
Here's my initial test from [MENTION=1792279]ivicask[/MENTION] v20

Will flash back to v19 and post compare shot.
[HTC 10 Guides, News, & Discussion] grega_slo:
Wow that`s bad...
[HTC 10 Guides, News, & Discussion] ivicask:
Why its bad?40 mins awake from almost 9 hours online, what you guys expect from this phone ?If you dont want it to wake or any sync to happen than just turn off wifi and data, than it will sleep fully.
[HTC 10 Guides, News, & Discussion] ivicask:
Well, tell me whats broken for you with this mod?
[HTC 10 Guides, News, & Discussion] grega_slo:
Screen on for 5 minutes and then deep sleep.

I loose like 5-6% in this scenario and have 2 exchange accounts syncing. No mods just EX kernel and Viper...

So yeah it`s bad in my opinion except if there is really some heavy syncing going on there...

I don`t know yet what will be broken, but my router is doing perfectly good job with RA packets and other junk flying over network so I`m just being careful :)
[HTC 10 Guides, News, & Discussion] ivicask:
Your not being realistic, and your forgetting there is no such thing as 8 hours deep sleep, phone gets woken in order for scheduled sync.

Me for example have.

Hangouts

Facebook

Facebook messanger

Whatsapp

Skype

Twitter

Touchdown email client

+ add to that all regular Google play services synces

And if i dont touch my phone for lets say 10 hours, i loose around 10% battery on WIFI

And not each app is the same, some sync more data, some use more CPU to complete the task, resulting in more battery use..

That seams just fine to me, if anyone expect any more than that, or any other similar device can do "more" well than please show it to me.
[HTC 10 Guides, News, & Discussion] grega_slo:
10% in 10 hours is great.

15% in almost 9 is not, but since we don`t know full background and all running apps we can also say that it`s super great awesomo. :)

I am realistic and I know exactly what can I expect from this phone and 1% per hour when in deep sleep and syncing mail is great for me at least.
[HTC 10 Guides, News, & Discussion] ivicask:
Well thats what im getting exactly 1% per hour.
[HTC 10 Guides, News, & Discussion] Haldi4803:
We're going slightly OffTopic here :)

If you want to relate Powerdraw to WiFi you need to wipe UserData and Test on a Clean Rom withouth any Accounts Setup or Apps installed.

Especially right now with Google services Failing and causing huge net scheduler wakelocks is the worst time to compare standby times with all your apps installed.
[HTC 10 Guides, News, & Discussion] ivicask:
Exactly my point above, isnt the point of this thread wake-locks and bad WIFI behavior?So if now someone has 40mins awake time from 9 hours on WIFI we can say the WIFI issue is solved?
[HTC 10 Guides, News, & Discussion] grega_slo:
Huh I don`t think so.

I get better and I have no mods installed.

I tried your V20 and when screen off wifi goes off too. You asked me what your mod breaks, now here you go :)

Disabling IPv6 is not a solution but a nasty workaround.

Solution is to implement better management traffic handling on routers but this has a long way to go...

If I can achieve 0.5% per hour at night with IPv6 fully working there clearly issue is either on router side or not IPv6 related at all...

But disabling IPv6 when screen off, well, since I also have and use (a lot) one IPv6 only network this is unacceptable for me.
[HTC 10 Guides, News, & Discussion] naughty6t9:
What rom are you on...

[MENTION=2195495]ivca[/MENTION]st can u add always display data icon even when Wi-Fi is on. Like old viper ROMs. Sensation, HTC m7 etc.. Can u add a MOD in hub please..
[HTC 10 Guides, News, & Discussion] ivicask:
Why are you even in this thread and flashing this mods if it works good for you already ? :)

It was for test only anyways, if it helps/works people with issues, who DONT use ipv6 and have issues with ipv6 packets, i can make 2 separate mods one which disables it and one which doesn't, selectable in aroma of course.

For now i want to see proffs from someone with issues if disabling ipv6 even helps, i dont have issue ether way so i cant test for my self.
[HTC 10 Guides, News, & Discussion] ivicask:
Please dont go off topic here, go please ask in Viper thread, and thats something for Jan to add, please ask him.
[HTC 10 Guides, News, & Discussion] grega_slo:
I`m here because I want to help and test and also gain some more deep sleep time (had a M8 long time it was really best HTC phone that slept like a baby :)).

Also I think I`m the first who brought up IPv6 in the first place...

P.S.

Regarding battery consumption, here is one after 8 hours: http://dl-1.va.us.xda-developers.co....png?key=79Dqq1KvMfBxauGTCKNOmg&ts=1475498485 :)
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
That's not a solution, but a dream of a very distant future. I can guarantee you won't be using your HTC 10 by then anymore :) Of course you can (and should) buy a good router for your home, but still, at those public wifi places your battery will drain.

Then don't use the mod :) For people who don't use ipv6, it IS a good solution to decrease their battery usage.
[HTC 10 Guides, News, & Discussion] devsk:
The goal of this thread remains to be finding the cause for and fix (or workaround) the wifi idle battery drain. If you are doing testing fully packed where you can't tell wakeups caused by legitimate traffic from rogue wakeups easily, you are doing the testing wrong. [MENTION=3056043]Haldi4803[/MENTION] is correct in that we need keep focus on this issue and test with minimal interference from apps.

1% per hour idle drain when you have many many apps generating wifi traffic (sync is the worst offender) even when the phone screen is off and is sitting idle, is normal IMO. Anything more than that, may be not and needs investigation for causes (which may be unrelated to wifi for all we know). I used to get around 2.5-3% idle drain with wifi, compared to about 1% with LTE. That's how I started on this thread.

Now, to the workaround of disabling IPv6 when screen goes off. I think its a perfectly good workaround for folks at home and office where IPv4 is still available. This is great for folks with rogue routers. May be we can be a little smart and detect that AP does not provide IPv4 IP address and hence we should not disable IPv6 on screen off because we do want our traffic to continue to flow while the phone sleeps. This check should be fairly easy to code in less than 5 lines of script code, and it makes it work for both cases.
[HTC 10 Guides, News, & Discussion] andybones:
I didn't mean to stir anything up by my screenshot.

[MENTION=1792279]ivicask[/MENTION] -- thank you very much for all you do!

I turn off all sync services except gmail. (venom hub I usually turn off but forgot)

Normally I turn Wi-Fi off overnight and at other times. I also have it to sleep when phone does.

For testing Wi-Fi drain I do reverse.

Here is a screenshot of v19.
[HTC 10 Guides, News, & Discussion] ivicask:
Well as far i can see there is no difference for you between IPV6 on or off, also, your not actually having wlan wake-locks anyways..

Whats the issue than?
[HTC 10 Guides, News, & Discussion] andybones:
I agree no difference between on or off IPV6 -- I already use your MOD, so I figured I'd test your v20 out and see what it produced for me. The way I use my device, I don't have to worry about Wi-Fi drain (doesn't mean I can't help out, however), but when I first found this thread I did the logging and did indeed have it. Since then though, Verizon did finally update us from 1.19x to 1.82x firmware.
[HTC 10 Guides, News, & Discussion] ivicask:
Mhm, was so busy this day that i didint event notice that internet stops working on my phone also after screen off even that i dont use IPV6 at all..

So forget about disabling IPV6, you can just turn off your WIFI..
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
Maybe if ipv6 is enabled on your router, it sends its RA messages only via ipv6 ? Not sure. I've disabled ipv6 on both my router and on my phone and in that combo it works well but maybe it's problematic when ipv6 is enabled on the router, not sure ... It also might even depend on the router.
[HTC 10 Guides, News, & Discussion] ivicask:
IPV6 is fully disabled on my router, if I disable IPV6 on phone I can't even ping phone anymore..
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
That's odd, not sure what's going on. You'd say your phone would get normal ipv4 RA packets and all should be good.
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
So on my new, ipv6 disabled router, I lose about 3% overnight on my 6p. Which seems acceptable but man if you I look at the log, tears jump into my eyes :) I mean, wtf. Whatsapp doing contact syncing, while I've disabled that. Google doing millions of things, communicating with google while I've disabled ALL syncing, all playstore settings and all google options that i could disable. It's really sad actually, sometimes I really think I just should by an iphone and never look back... But then again ... itunes, that's even worse :)
[HTC 10 Guides, News, & Discussion] Haldi4803:
And iPhones Batterylife is even worse xD

Btw Xposed + Powernap is nice ;)

BTT:

6P has the Same Problem as we do with ipV6 Broadcasts.

Samsung has their special stuff to fix it.

So what about LG G5 or other phones with the same Chipset?
[HTC 10 Guides, News, & Discussion] devsk:
Pretty much same observations here. Google is doing too much crap on the phone even though settings may be saying otherwise. Its one of those intentional "bugs". These phones with 3000mah batteries can last a while if the software was not doing crap. But then manufacturers will have no incentive for you to buy the phone with 3300mah next year. And google won't be able to demonstrate "battery savings" as a great feature next year...:) The endless loop continues...Oh the humanity...tears!
[HTC 10 Guides, News, & Discussion] ivicask:
Android 7.1 brings doze improvements and in general battery/power management, lets hope Google did good job solving this mess.
[HTC 10 Guides, News, & Discussion] devsk:
I heard the exact opposite so far, that the Nougat battery life is worse. May be its just some basic apps not compatible with Nougat. IDK. We will see.
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
Yeah I'm running 7.0 on my 6p, I'd indeed say that 6.x had better battery usage.
[HTC 10 Guides, News, & Discussion] Haldi4803:
Taking away the 2h SoT and getting 26min wake on 11hours that's still too much batterydrain!

I'll get into proper testing tomorrow, but that totally looks like the WiFi drain is back!

Sorry my fault. After force closing all apps, leaving WiFi and coming back its back to normal.

Might have been related to WhatsApp web not correctly closing.
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
Pretty accurate observation.

https://verdictforu.com/2016/10/06/...tly-lasts-nearly-40-longer-than-nexus-phones/
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
Hey HTC 10 friends, something you might find interesting/funny/sad ... People on our 6p device who upgraded to Nougat complained how 'android system' is now much higher on the battery usage list than the screen. People said something must have been wrong with Nougat. What I've just found is that Google actually is now using really different battery usage values. You know how it works right, A manufacturer measures how much power wifi takes, bluetooth etc and they supply all this power consumption data in a file called 'power_profile.xml' to android. Android then sees 'hey wifi was used 3 hours, so that means 3 hours * 200 mAh (as supplied in that file for example) is 600 mAh used by wifi, etc etc etc.

Well now, imagine my surprise when I just found how google uses almost COMPLETELY DIFFERENT values for the cpu power consumption in that file as supplied in their Nougat version !!

Here's the android 6 version for our Nexus 6p: https://android.googlesource.com/de...works/base/core/res/res/xml/power_profile.xml

And here's the android 7 version for that same phone: https://android.googlesource.com/de...works/base/core/res/res/xml/power_profile.xml

Take a look at the power usage for the highest CPU speed. If you max all cpu cores, according to their latest measurements that consumes almost 1800 mAh (cluster 0 + cluster 1), while previously they stated that this would only take less than 600 Mah. Imagine the impact of this !! Basically ALL previous battery usage data as supplied by our 6p phone was TOTALLY wrong !! People were just looking at a bunch of lies when they opened their battery statistics. Completely off. Man, that's interesting/funny/sad or what, LOL :)

Also interesting, if this latest measurement is correct (which I assume it is), then battery saving, at least for the Nexus 6p, is actually really just about having your phone sleep when you're not using it AND have it run as the lowest possible frequencies. Quite interesting actually, it's all about CPU ! Which makes sense I guess ...
[HTC 10 Guides, News, & Discussion] devsk:
I never trusted their mAh values to begin with, because whenever I tried to sum them all up, they never added up to to the actual battery capacity for 100% used (or more like 92% used, I typically don't let it fall below 8%). I think its hard to tell how much current is being drawn at every CPU frequency or by wifi for that matter precisely. They are just empirical data collected in a lab. But for them to be off by a factor of 4, is actually quite astonishing!! Gives me more reason to not trust those numbers.
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
Hehe I've made the same conclusion as you in the past, that something must have been wrong with those numbers. But just like you, I was *stunned* to see that the numbers have been off this much, wow ...
[HTC 10 Guides, News, & Discussion] Haldi4803:
Same issue with Qualcomm's Trepn Profiler. Hardware mode polls every 30 seconds for powerdraw (Below SD810 it was every 100ms.....) and Software mode is calculating Powerdraw from Mhz Clock, Load and other stuff. Well yeah, Hardware and Software mode are about 50% off..... and this is not from google! This is from Qualcomm! The manufacturere of the Chipset! If they don't have the proper values for their chips in their software............. well......

On another note, I was wondering how the Power_profile.xml for our HTC10 would look like.

Sadly i fail to decompile the Framework-res.apk

---------------------------------------------------------------------

| Log - 07.10.2016 -- 22:49:45,80 | Flasher 1.1.4\LogSimple.txt

---------------------------------------------------------------------

THE LOG BELOW IS FOR YOUR MOST RECENT PROCESS ONLY.

java version "1.8.0_101"

Java(TM) SE Runtime Environment (build 1.8.0_101-b13)

Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

I: Loading resource table...

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:55)

at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)

at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)

at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)

at brut.androlib.Androlib.getResTable(Androlib.java:44)

at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)

at brut.apktool.Main.cmdDecode(Main.java:128)

at brut.apktool.Main.main(Main.java:65)

Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000

at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)

at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:45)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:97)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)

... 8 more

Do i simply fail to decompile the framework-res.apk (download) or did it maybe get damaged while pulling the file via Filebrowser and not adb pull ( did it twice, same outcome), or is that stuff encrypted?

Uhgs... gotten a bit too much offtopic, sorry devsk.
[HTC 10 Guides, News, & Discussion] Haldi4803:
I think I'm back with the WiFi drain issue!

That was few days back when every Thing was fine.

Then I got a slight drain.

Switched to 4g over night.

And used the WiFi on the 2nd floor afterwards.

Now I'm back to this.

That's all on a stock 1.92.709.1 with Root and ivicask pnptweaks.
[HTC 10 Guides, News, & Discussion] ivicask:
Looks like older version of apktool, or something else just wrong..

View attachment power_profile.zip
[HTC 10 Guides, News, & Discussion] gekkehenkie11:
I'm pretty sure those CPU consumption values are WAY too low
[HTC 10 Guides, News, & Discussion] jhadsfi:
First of all I'd like to say that I am not very knowledgeable about the issue the device faces so what I say might be completely wrong but I do want to share my observations.

I've noticed that I get severe WiFi drain only after I've connected my device to my laptop through USB. If I don't connect through USB and charge through power outlet idle drain is < 1% per hour. It reaches about 2.5% if I use the device after charging through laptop. Could this have anything to do with anything? Thanks.