yashsingh1/xdaforums huggingface dataset:
[HTC 10 Guides, News, & Discussion] devsk:
I looked at your simplified output and it was the same as everyone else. Sorry, I did not reply.

I need the detailed output to see if there are issues. Are you running 1.80.617.1 or a custom version of it? If you are on WWE 401.3 or TMO 531.1, your data will show better suspend/resume action. So, please do post detailed output. It will help confirm many of the findings.

I can attest to the fact the [MENTION=609933]EtherealRemnant[/MENTION] has a decently clean power mgmt profile for this phone now, from kernel logs' perspective. He is projected to hitting 6hrs of SOT on wifi. I would have settled for 3, which I can't hit right now. I can hit 7hrs on data with wifi off.

The rx_wake can be lowered with my patch and that will likely help us reach 7hrs on wifi as well.
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
I'm on 1.80.617.1 firmware. Didn't mean to post simplified output, I just posted the output from the commands I saw in the OP (or maybe second or third post).

Ok. Well it seems like you guys have it under control. I was just offering to provide you with logs since I thought my logs showed that I should be having the issue, but my battery performance and wlan_rx_wake clearly do not.
[HTC 10 Guides, News, & Discussion] Haldi4803:
The advanced script is the reportSuspendResumeAction.txt in attachments of first post.

in my case i delete the "function sraPrint(){" at the begin and } at the end and run it via ScriptManager directly.

Talking about that. As Tmobile Kernel only did NOT fix the issue, it should be possible to flash your fix onto this firmware to reduce wlan_rx_wake issues.

[MENTION=609933]EtherealRemnant[/MENTION] care to try ? :)

No... well Yes.... but i did a run on a clean ROM without google account or anything set up, only BBS and Scriptmanager as app installed, Rooted. And yet, i still had all wakelocks :(
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
Detailed logs attached
[HTC 10 Guides, News, & Discussion] devsk:
you are the lucky one. For whatever reasons, your phone does not have any suspend aborts even with 1.80.617.1 firmware. Unless you collected the data when the phone was screen on, in which case, no suspend is attempted and hence no suspend abort will be seen in the logs...:) Did you collect that immediately after waking the phone after leaving it alone for 15-20 mins?
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
I don't know if screen was on and I did leave it alone for a while, but didn't put a stopwatch on it.

So, leave phone alone for 20 minutes and wake it up but make sure to turn screen back off prior to running the script?
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
Here are new logs with the screen definitely off and definitely the phone was left alone for 20 minutes.
[HTC 10 Guides, News, & Discussion] devsk:
Same thing. So, you are as good as the TMO update can get you just like EtherealRemnant.

So, amidst all this: [MENTION=266012]Urban Strata[/MENTION]: what's up with HTC not even providing Android Security update for July for the US Unlocked version? And while you are at it, include the updated pmic image as well in the firmware ZIP for good measure!
[HTC 10 Guides, News, & Discussion] devsk:
If I was S-Off, I could flash just the pmic partition and confirm this theory once and for all...I can't send my phone though.
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
pmic can be extracted from an RUU...but, like you said, you need to be s-off to flash it. Do you think yours was corrupted somehow? If you're on 1.80.617.1 then I can guarantee that we have the same pmic.

Volume in drive C has no label.

Volume Serial Number is CA4B-CBEA

Directory of C:\Users\itm\Documents\Android\10\backups\RUU_PERFUME_WL_M60_SENSE80GP_NA_Gen_Unlock_1.53.617.5\firmware

07/19/2016 06:46 PM <DIR> .

07/19/2016 06:46 PM <DIR> ..

05/05/2016 12:51 PM 933,456 aboot_signed.img

05/05/2016 12:24 PM 11,527,168 adsp.img

05/05/2016 12:15 PM 905 android-info.txt

05/05/2016 12:51 PM 92 android-info2.txt

05/05/2016 12:24 PM 13,248 apdp-8996-1.img

05/05/2016 12:41 PM 62,914,560 apppreload.img

05/05/2016 12:55 PM 905 backup_android-info.txt

05/05/2016 12:51 PM 41,375,205 boot_signed.img

05/05/2016 12:36 PM 6,136,028 cache.img

05/05/2016 12:24 PM 193,152 cmnlib32.img

05/05/2016 12:24 PM 239,642 cmnlib64.img

05/05/2016 12:41 PM 62,914,560 cota.img

05/05/2016 12:24 PM 55,264,256 cradio.img

05/05/2016 12:24 PM 18,906 cs_CY8C.img

05/05/2016 12:24 PM 39,738 devcfg-8996-1.img

07/19/2016 06:46 PM 0 dir.txt

05/05/2016 12:24 PM 16,777,216 dsp.img

05/05/2016 12:40 PM 12,368 dzdata_16g.hdr

05/05/2016 12:40 PM 2,222,672 dzdata_16g.img

05/05/2016 12:41 PM 20,592 dzdata_32g.hdr

05/05/2016 12:41 PM 2,547,312 dzdata_32g.img

05/05/2016 12:41 PM 24,384 dzdata_64g.hdr

05/05/2016 12:41 PM 2,778,432 dzdata_64g.img

05/05/2016 12:24 PM 1,024 fsc.img

05/05/2016 12:14 PM 17,408 gpt_main_16g.img

05/05/2016 12:14 PM 17,408 gpt_main_32g.img

05/05/2016 12:14 PM 17,408 gpt_main_64g.img

05/05/2016 12:51 PM 44,893,669 hosd_signed.img

05/05/2016 12:24 PM 260,050 hyp-8996-1.img

05/05/2016 12:24 PM 226,026 keymaster.img

05/05/2016 12:24 PM 57,370 lksecapp.img

05/05/2016 12:24 PM 2,097,152 modemst1.img

05/05/2016 12:24 PM 2,097,152 modemst2.img

05/05/2016 12:14 PM 1,504 partition_info

05/05/2016 12:24 PM 3,388 pg2fs_ship_signkey.img

05/05/2016 12:24 PM 42,763 pmic-8996-1.img

05/05/2016 12:24 PM 55,038,976 radio.img

05/05/2016 12:24 PM 1,048,576 rcdata.img

05/05/2016 12:51 PM 43,181,545 recovery_signed.img

03/16/2016 06:47 AM 236,032 rfg_2.img

04/22/2016 04:32 AM 837,120 rfg_3.img

05/05/2016 12:24 PM 229,432 rpm-8996-1.img

05/05/2016 12:24 PM 466,832 sensor_hub.img

05/05/2016 12:24 PM 3,597,312 slpi.img

04/21/2016 05:09 AM 7,471,104 splash1.nb0

05/05/2016 12:24 PM 203,069 tp_SYN3708.img

05/05/2016 12:24 PM 1,478,674 tz-8996-1.img

05/05/2016 12:24 PM 32,768 usb_typec.img

05/05/2016 12:24 PM 22,248 usb_typec_otp.img

05/05/2016 12:24 PM 2,067,968 venus.img

05/05/2016 12:24 PM 1,848,492 xbl-8996-1.img

51 File(s) 433,447,267 bytes

2 Dir(s) 411,630,256,128 bytes free
[HTC 10 Guides, News, & Discussion] devsk:
yeah. I have the one from 1.80.617.1 and one from 1.81.531.1 but I can't flash it with S-On.

I don't think its corrupt. I think there are certain conditions under which the pmic is behaving really bad. I don't know what those conditions are and how they are varying between users or different phones. But the same pmic image is showing different behaviour with respect to power management of the wifi chip. Its clear from the spurious interrupts and wakeups we see in the logs.

Like I posted before with version strings, the pmic version from TMO has fixes. And the changelog from TMO version also has this:

Notice "System and power enhancements"...that's pmic (which stands for Power Management Integrated Circuit, used to control power delivery to chips) change.
[HTC 10 Guides, News, & Discussion] andybones:
ReportSRaction log

and dmesg log

[MENTION=1416236]devsk[/MENTION] can you take a look at this please?

I am quite sure I am affected, but have no idea how to read the logs.

I am getting amazing battery life, however and I use WiFi about 80% of the day (I do have it set to turn off during sleep) and since finding this thread have been turning off WiFi when I go to bed.
[HTC 10 Guides, News, & Discussion] devsk:
Your report is definitely showing affected phone even with that setting where wifi turns off after sleep with quite a bit of suspend abortion and spurious wakeups action.

I think you are getting good screen on time because of the power save mode which limits the brightness and locks the cores at max of 1.3Ghz, and also because you are not letting it sleep much (8.5hours of screen on in 19hrs, what are u doing all that time on the phone...:D) and wifi is off when sleeping. So, you are doing everything to avoid this issue completely!
[HTC 10 Guides, News, & Discussion] andybones:
That was a long night, lol. I'm a very light user, and been running my phone the same way for quite some time. I'm very happy with the speed with power save mode with this device, I only turn it off when I need to, such as in the sunlight. I was getting 5 hours SOT with the M8 with GPe ROM before I switched over to the 10. I'll keep Wi-Fi on during the periods I'm not on it and see what my results are like.

I appreciate all the work you've been contributing to this issue!
[HTC 10 Guides, News, & Discussion] EtherealRemnant:
I actually got 5hr47m before 6% and a total of 22hr so yes, much better. I'll try your kernel over this one and report back sure. Having an HTC device with greater than 4 hours SoT has always been a pipe dream but almost 6?! Lol.
[HTC 10 Guides, News, & Discussion] EtherealRemnant:
[MENTION=1416236]devsk[/MENTION] This is interesting. It's not a full charge cycle but it's the longest SoT I've gotten ever... Not to mention quite a log for you.

Edit: 7hr7mn @ 2% - officially the longest SoT achievement of any phone I have ever had by a long shot and with no battery optimization other than Wi-Fi PM.
[HTC 10 Guides, News, & Discussion] devsk:
with the test fix or without?
[HTC 10 Guides, News, & Discussion] EtherealRemnant:
With. As you can see with sraPrint, the fix extended the seconds to 140 per incident lol.
[HTC 10 Guides, News, & Discussion] Urban Strata:
I checked with HTC product management about this T-Mobile firmware update. They confirmed there are no WiFi fixes or changes in the T-Mobile firmware that aren't already included in the US unlocked (open channel) firmware. As far as I'm aware -- and please keep in mind I'm not on HTC's engineering team -- the issue discussed in this thread still hasn't been replicated in HTC's lab, nor has root cause been identified. I'll continue to keep you posted if/when I get updates.
[HTC 10 Guides, News, & Discussion] devsk:
That does not make sense. US Unlocked was updated on 6.14.2016 and TMobile one was updated 7.1.2016. US Unlocked does not have:

as per Changelog on your website. How can you say there are no firmware changes in the TMO version when the pmic.img is different in the TMO version than the US Unlocked version, as I showed above with version upgrade strings in the images?

Moreover, as the user above has reported the fixes done to power management integrated circuit (PMIC) firmware present in TMO firmware.zip fixes the battery drain issue for him.

So, [MENTION=266012]Urban Strata[/MENTION]: which one is it? It better not be 2.)....:D I would lose all faith in HTC products.

All you have to do is to release an updated firmware for US Unlocked, and this issue will go away. You will make your customers happy, and last time I thought about it, happy customers are a good thing.
[HTC 10 Guides, News, & Discussion] devsk:
So, this means that I wasn't very far when I said TMobile pmic fix and my fix can bring it close to what we get with LTE, which is about 7hr for me. This is without working very hard to conserve battery!

HTC 10 can be such a beast in terms of battery usage, except for one thing: HTC as a company is failing its customers. As a developer, I can tell you, at my company, we acknowledge and fix the customer issues quickly. Otherwise, we would be decimated!
[HTC 10 Guides, News, & Discussion] devsk:
I have updated to 0.10 of EX and testing it. Note that it takes couple of days to test thing to be sure.
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
TMO was updating all the way from 1.21 though. Whereas US Unlocked went 1.21 to 1.53 to 1.80. US Unlocked definitely had "System and power enhancements" in the 1.53 update. PMIC was updated for the US Unlocked variant way back in the beginning of May. The PMIC in the new TMO update is identical to the PMIC that the US Unlocked got in May. See screengrab below.

As for the dates, carrier updates are notoriously slow. Just because the carrier was updated after US Unlocked, doesn't mean that the update to the carrier system and firmware is any newer than the US Unlocked. Carriers do their own testing and approval before allowing HTC to roll out their updates.

I'm not some fanboy here and am more than willing to point out flaws in the device (Wi-Fi range is atrocious!) or in HTC itself, but I think your comments to [MENTION=266012]Urban Strata[/MENTION] are way out of line in this instance.
[HTC 10 Guides, News, & Discussion] devsk:
Hold on there. If you see my analysis the pmic.img I extracted from 1.80.617.1 definitely different from 1.81.531.1 of TMO. I did a very thorough and methodical comparison. Please redo your comparisons. Files differ for sure!

Please compare pmic.img in 1.80.617.1 and 1.81.531.1 this time. May be between may update (1.53) and june update (1.80), they went back on the pmic by mistake. So, don't compare 1.53 pmic and 1.81.531.1 pmic.
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
Sorry. You're correct. Carry on.
[HTC 10 Guides, News, & Discussion] hemirunner426:
I'd have to side with [MENTION=1416236]devsk[/MENTION] on this one. There is plenty of empirical data here to support the numerous claim. We are calling HTC engineering out in this problem, not anyone personally.
[HTC 10 Guides, News, & Discussion] devsk:
pmic being older version (135 compared to 136) in 1.80.617.1 compared to 1.53.617.1 also means that many folks who are still using 1.53.617 firmware won't see this issue. Its also possible HTC engineering released the firmware with previous version pmic by mistake while testing with the correct pmic in house. I am ready to give benefit of the doubt to HTC but at least try to diagnose the thing and fix the issue. People are genuinely reporting this issue and spending their time troubleshooting it. Ack that and help them.

This also explains why many people are not seeing this issue. One way or another (still running 1.53 firmware or running WWE or TMO firmware), they have the correct pmic image.
[HTC 10 Guides, News, & Discussion] SynisterWolf:
Thread cleaned. Post edited. Please remember to always show respect and do not flame or belittle anyone on this site. This is a learning community.

Thanks for your understanding in this

Wolf
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
Anyway...here is a download flashable zip with the TMO 1.81.531.1 pmic (for flashing over US Unlocked 1.80.617.1) firmware, if anyone who's s-off wants to see if this fixes their issue.
[HTC 10 Guides, News, & Discussion] devsk:
One last comment on the fanboyism comment from jolly: I have been a HTC fanboy from G1 (remember the first android phone?) days. I have spent numerous hours troubleshooting and finding fixes for this issue. Anybody else would have moved on.
[HTC 10 Guides, News, & Discussion] Haldi4803:
Wish i'd be :( S-on can easily flash boot.img and recovery.img via 2PS6IMG.zip but with the PMIC i always get an android-info ist wrong.

P.S the "erasepartition: devinfo" is only present in the US unlocked.

Anyone else whos trying to flash this. You need to modify

modelid: 2PS650000

cidnum: BS_US001

cidnum: BS_US002

mainver: 1.80.617.1

to your own stuff found in your last OTA.

P.P.S

I was wondering if dd would work, but when I used the backup command:

dd if=/dev/block/bootdevice/by-name/pmic of=/sdcard/pmic.img

I got a 512kb file while this one here is 42....

Too scared to flash it.
[HTC 10 Guides, News, & Discussion] andybones:
Can anyone who's S-OFF flash it such as Verizon user like myself?
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
Probably, but since I can't test that myself, I can't say with 100% certainty. Are you Verizon branded or US unlocked converted?

If Verizon branded, you'll need to either edit Android-info to match your cid and mid and remove the line erasepartition: devinfo, or use the latest Verizon Android-info file

Also, you should make sure you have a copy of your current firmware so you can restore if you have issues.
[HTC 10 Guides, News, & Discussion] andybones:
I am Verizon branded, editing the file wouldn't be a problem, if I end up trying it I'll report back. Thank you.

edit: decided to flash it, also then went back to bootloader and made sure my Verizon pmic.img would flash back correctly, which it did. I will post my results. Thanks to all who've been contributing to this issue.

C:\apktool>fastboot flash zip [B]PMIC-TMO.zip[/B]
target reported max download size of 800000000 bytes
sending 'zip' (12 KB)...
OKAY [ 1.014s]
writing 'zip'...
(bootloader) HOSD CL#749324
(bootloader) Perform pre-update
(bootloader) start@1
(bootloader) pmic-8996-1.img@100%
(bootloader) Perform hardware reset
FAILED (remote: 90 hboot pre-update! please flush image again immediately )
finished. total time: 1.139s

C:\apktool>fastboot flash zip [B]PMIC-TMO.zip[/B]
< waiting for device >
target reported max download size of 800000000 bytes
sending 'zip' (12 KB)...
OKAY [ 1.014s]
writing 'zip'...
(bootloader) HOSD CL#749324
(bootloader) start@1
(bootloader) pmic-8996-1.img@100%
(bootloader) Update zip file OK
(bootloader) end@Done
OKAY [ 2.137s]
finished. total time: 3.151s

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

C:\apktool>fastboot flash zip [B]PMIC-VZW.zip[/B]
< waiting for device >
target reported max download size of 800000000 bytes
sending 'zip' (12 KB)...
OKAY [ 1.014s]
writing 'zip'...
(bootloader) HOSD CL#749324
(bootloader) Perform pre-update
(bootloader) start@1
(bootloader) pmic-8996-1.img@100%
(bootloader) Perform hardware reset
FAILED (remote: 90 hboot pre-update! please flush image again immediately )
finished. total time: 20.452s

C:\apktool>fastboot flash zip [B]PMIC-VZW.zip[/B]
< waiting for device >
target reported max download size of 800000000 bytes
sending 'zip' (12 KB)...
OKAY [ 2.012s]
writing 'zip'...
(bootloader) HOSD CL#749324
(bootloader) start@1
(bootloader) pmic-8996-1.img@100%
(bootloader) Update zip file OK
(bootloader) end@Done
OKAY [ 2.168s]
finished. total time: 4.196s
[/HIDE]
[HTC 10 Guides, News, & Discussion] andybones:
New logs after flashing the pmic.img that [MENTION=5957136]jollywhitefoot[/MENTION] provided.
[HTC 10 Guides, News, & Discussion] devsk:
Thanks [MENTION=2586080]andybones[/MENTION]. Your output is as clean as it gets. No suspend aborts and no full system resumes. You just confirmed the pmic theory because your earlier output was affected and showing the issue (its only a page or two back). You don't have to worry about turning wifi off no more...:D

Darn! I wish I was S-Off...:D
[HTC 10 Guides, News, & Discussion] andybones:
Awesome! Very glad I was able to help in some way. You did all the ground work and can't thank you enough!

P.S. - For this new log I had the device plugged into PC while I waited the 20 mins, and also set Wi-Fi to not sleep and turned power saver off. My previous logs I ran from terminal and as you saw had power save on and Wi-Fi set to sleep as that's my normal usage. Would you like me to do any other logs or do they suffice?
[HTC 10 Guides, News, & Discussion] devsk:
Just a quick one: unplug the phone, make sure its connected to wifi and data is off. Turn the screen off and leave it there for 20-30mins. Connect with PC, wake it up and run the command in adb shell right away without doing anything else.

Its important that its not plugged in when its lying idle, because it won't try suspend if its plugged. Please do report back on this one, its important. And thanks for providing that P.S....:)
[HTC 10 Guides, News, & Discussion] hemirunner426:
Me too. I don't want to send my phone in to s-off. Damn Verizon.
[HTC 10 Guides, News, & Discussion] andybones:
Shoot sorry, will be posting back very soon.
[HTC 10 Guides, News, & Discussion] devsk:
No worries mate. I should have clearly mentioned that. I sort of assumed that it was a battery test, so the phone should idle on battery and not connected. Assume always reminds me of how my prof used to break it down in 3 words, and drill into us "don't assume"...:) So, fault on both sides here...:)
[HTC 10 Guides, News, & Discussion] andybones:
[MENTION=1416236]devsk[/MENTION] you are a good man.

new logs

I will also do from terminal next just like I did the first time, just for safe measure.

but these i let it sit for almost 30 min. plugged into PC immediately, then ran the commands.

Fingers crossed.
[HTC 10 Guides, News, & Discussion] jollywhitefoot:
I think this looks like your old logs on Verizon pmic
[HTC 10 Guides, News, & Discussion] andybones:
Yea I was thinking the same.. :-/
[HTC 10 Guides, News, & Discussion] devsk:
The data has some suspends aborted and some wakeups, which may be expected in 30mins period as valid packets for sync arrive but the data is much much better than your before data. I think we need more data to be 100% sure though. We wait till tomorrow morning for more data. Please, before u go to bed, collect data once, leave wifi on, data off, unplugged, sync on and turn the screen off. Collect again in the morning. Please attach both data collections.

Also, if you have BBS, collect the screenshots of that (Kernel and Partial wakelocks, Process, CPU, Alarms) as well in the morning. We can correlate and confirm findings across the log and BBS.
[HTC 10 Guides, News, & Discussion] andybones:
I appreciate this. I will charge up now, and keep Wi-Fi to stay on during sleep, can I keep power save on, or should I turn that off? And in the morning before I touch device I'll get a log.

I don't have bbs but will download it and attach the screenshots. Also I see there is a long list in BBS do I need to get all of it? Could be about 5 or so ss in in a few, I don't mind just asking.
[HTC 10 Guides, News, & Discussion] devsk:
In twice the overall amount of time, he had more than 8 times the DHD wakeups. And in the same duration he had twice the DHD wakeups. So, the data is better for sure. I think we need a big enough sample. So, I am not calling it yet.

[MENTION=2586080]andybones[/MENTION]: did you compare md5sum of both img files?
[HTC 10 Guides, News, & Discussion] devsk:
As far as I have understood what powersave mode does, it should not interfere.
[HTC 10 Guides, News, & Discussion] andybones:
Alright thanks. No I never compared the md5. I can flash another .img if needed.
[HTC 10 Guides, News, & Discussion] devsk:
Can you please run md5sum on both pmic.img files? Just to rule out the possibility that you had the same pmic.img before.
[HTC 10 Guides, News, & Discussion] andybones:
Absolutely. I'll download the file again from [MENTION=5957136]jollywhitefoot[/MENTION] and check md5 against my Verizon one, I also like to compare them using beyond compare and then I will flash the pmic.img again just to be sure.

edit:

ok the pmic.img I flashed has an md5 of:

C53A2520595796CA3FBC62577762632B

while the Verizon one is:

1D29D323B673E02F444F00B3D5295230

I reflashed now and it was successful:

C:\apktool>adb reboot bootloader

C:\apktool>fastboot oem rebootRUU
...
OKAY [ 0.016s]
finished. total time: 0.016s

C:\apktool>fastboot flash zip PMIC-TMO.zip
target reported max download size of 800000000 bytes
sending 'zip' (12 KB)...
OKAY [ 0.998s]
writing 'zip'...
(bootloader) HOSD CL#749324
(bootloader) Perform pre-update
(bootloader) start@1
(bootloader) pmic-8996-1.img@100%
(bootloader) Perform hardware reset
FAILED (remote: 90 hboot pre-update! please flush image again immediately )
finished. total time: 1.123s

C:\apktool>fastboot flash zip PMIC-TMO.zip
< waiting for device >
target reported max download size of 800000000 bytes
sending 'zip' (12 KB)...
OKAY [ 0.998s]
writing 'zip'...
(bootloader) HOSD CL#749324
(bootloader) start@1
(bootloader) pmic-8996-1.img@100%
(bootloader) Update zip file OK
(bootloader) end@Done
OKAY [ 2.137s]
finished. total time: 3.136s

C:\apktool>fastboot reboot
rebooting...

finished. total time: 0.000s

C:\apktool>

I will get as detailed logs as possible before I hit the hay, and once I awake tmw, and also get the screen shots of BBS.