Open giampaolo opened 8 months ago
I will check further! Will also look into #2354 at the same time.
I think this is a relic of the VM used by GitHub (and other CI providers) that don't include the pmgr
info that on-metal hardware provides.
Yeah what Daniel has pointed out in https://github.com/giampaolo/psutil/pull/2222#issuecomment-2000755602 is spot on as to why this is failing.
I just booted a VM to test this and when I tried to use powermetrics
it reports the exact same error. I opened the IORegistryExplorer just for fun and indeed the pmgr
property is not exposed:
I opened the IORegistryExplorer just for fun and indeed the pmgr property is not exposed:
Any way you can explore around and see if the "voltage-states5-sram" or "voltage-states1-sram" or any "voltage-states*-sram" value exists in any key?
Any way you can explore around and see if the "voltage-states5-sram" or "voltage-states1-sram" or any "voltage-states*-sram" value exists in any key?
ioreg -k 'voltage-states5-sram' -r
is empty, so it's not looking very promising.
any "voltage-states" at all?
I'm not sure "CPU Frequency" has any meaning for a VM, anyway. And in most cases, CPU Frequency has changed by the time you read the results. I think the appropriate response here is to ignore the error and return either 0 or some sane default.
We recently added a macOS build for arm64 and we get a failure: https://github.com/giampaolo/psutil/actions/runs/8301314525/job/22721158479
Error originates from: https://github.com/giampaolo/psutil/blob/f51f62beef5e2ce0d64c9cb76fb7b4e9094b1864/psutil/arch/osx/cpu.c#L160-L166.
Change was introduced in https://github.com/giampaolo/psutil/pull/2222.
@snOm3ad: Any chance you can take a look?