-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Wrong power measurement on iPad 2020 #3
Comments
First, thanks for opening up an issue. The power measurement is from apple's CLPC(Close loop performance controller)which I believe only appear on SoC >A13. I used this to get high resolution per process energy consumption; so under current circumstances, there is no way to workaround with this. Maybe there are other ways to get this but I am sure it wouldn't be as accurate as the current approach. |
IOService.txt |
From XNU source code(Version 8792.81.2), the power energy counter code is gated behind macro |
Can you can provide a power calibration interface like GPU GFLOPS? I think that helps with debugging. |
If you mean high resolution sampling, see my another repo https://github.com/junjie1475/ios_power_log |
Do you mean a power measure app with GUI and run in the background ? |
I think it may be a wrong unit of measurement causing the power to show extremely low. |
If you can, that's great. |
From XNU documentation(see recount.md) the unit is nano-joule, but you can try to use ios_power_log to track the energy consumption/sec and see what cause the bug. |
I don't think it's possible to track other process's info on iOS but I can integrate the graph into the App itself perhaps(Maybe through swift chart). |
Sorry but I don't have a computer running macOS. |
You don't need to have one, as far as I know you can use sideloadly to inject the dylib and it is also possible to read console log through windows. |
In my opinion, it seems right. As you can see, the power measured by the app is slightly lower than the power measured by macOS powermetrics command. |
Yes, but I believe he uses Apple A12 but not Apple M1, something could be different for that chip. I agree with junjie that the difference could reside in differences between Apple A12's CLPC and Apple M1's CLPC, and in XNU opensource only M1's CLPC definition could be found, so a headache here...... |
Ok then, I will patch this fix when I have time.
…On Sun, 4 Jun 2023 at 5:59 PM, hamjin ***@***.***> wrote:
[image: 697799afd74fbe72f93ddd01caf06ed0]
<https://user-images.githubusercontent.com/30927889/243166013-5a79d08a-c4bd-4655-acfe-5997a60dfb77.png>
[image: image]
<https://user-images.githubusercontent.com/30927889/243166045-6bcfe3f1-6840-4f8a-a2dd-a78a9abe4491.png>
This is a section of my running 500.perlbench results (from rest to
running), without power saving mode enabled
I am not very sure what is the power usage of the A12 device but it seems
like power x100 would lead to the correct result.
[image: image]
<https://user-images.githubusercontent.com/30927889/243168910-07037421-8ec5-4918-a012-8e933be76dec.png>
Only one result from Anandtech's Spec 2006 has subitem power consumption
and I don't know the gap.
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUSI37B22TRVINESQ5HO7E3XJRL6PANCNFSM6AAAAAAYTNW6QA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
|
I think it is possible that those values don't have any meaning. I should look more into the XNU code to see if I can find more clues. |
Thanks again for your efforts, if help is needed I will do my best. |
Version: 2.3.0
Device: iPad 8
iPad OS Version: 16.5
SoC: Apple A12
Steps to reproduce
Open the app first. Then select one of the project and run.
I'm sure that the device is not charging or doing anything else.
Expected behaviour
Show correct power.
Actual behaviour
Always showing wrong power like below.
The text was updated successfully, but these errors were encountered: