Skip to content
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

CPU Frequency shows as "N/A" on macOS 10.14 Catalina 2015 MacBook Pro 4 core, 8 thread. #280

Open
joshuapinter opened this issue Oct 25, 2020 · 14 comments · May be fixed by #1272
Open

CPU Frequency shows as "N/A" on macOS 10.14 Catalina 2015 MacBook Pro 4 core, 8 thread. #280

joshuapinter opened this issue Oct 25, 2020 · 14 comments · May be fixed by #1272
Labels
MacOS 🍏 MacOS / Darwin related issues

Comments

@joshuapinter
Copy link

image

Not sure if it's a known issue or something that I'm maybe doing wrong. Anyway, thought I'd post it to get some feedback.

Thanks!

@BenBE
Copy link
Member

BenBE commented Oct 25, 2020

Based on this part of the code this does not seem to be implemented on MacOS yet.

@joshuapinter
Copy link
Author

Thanks for the feedback @BenBE! Now that we know should we close this or add something about compatibility in the docs. Your call. Thanks.

@BenBE
Copy link
Member

BenBE commented Oct 25, 2020

I think we should keep it open marking it as a feature request/enhancement request to support these information on MacOSX. Simply closing it doesn't feel right for two reasons: First you either should provide the information properly or second don't offer the option to show them if unsupported. As it is now it's in a half-baked state where it should be improved.

@joshuapinter
Copy link
Author

Beauty! Thanks for your help!

@cgzones
Copy link
Member

cgzones commented Oct 26, 2020

hint: https://stackoverflow.com/questions/9948987/detect-current-cpu-clock-speed-programmatically-on-os-x

@cgzones cgzones added the MacOS 🍏 MacOS / Darwin related issues label Oct 26, 2020
@fasterit
Copy link
Member

hint: https://stackoverflow.com/questions/9948987/detect-current-cpu-clock-speed-programmatically-on-os-x

The tl;dr version of this is: Not really possible to get anything but the default frequency on MacOS without very low level measurement loops (which would break again as Apple goes ARM).

Shall we disable the option when compiling for MacOS (and other platforms where we can't get the data well)?

@BenBE
Copy link
Member

BenBE commented Oct 30, 2020

Disabling/hiding that option for unsupported platforms is probably best.

@ulope
Copy link

ulope commented Oct 5, 2022

The macOS built in powermetrics cli tool is able to show cpu frequency and a lot more information (P/E cluster usage etc.).

@BenBE
Copy link
Member

BenBE commented Oct 6, 2022

The macOS built in powermetrics cli tool is able to show cpu frequency and a lot more information (P/E cluster usage etc.).

Do you have a source code reference for this tool to look at?

@mig8447
Copy link

mig8447 commented Feb 6, 2023

You can take a look at https://www.unix.com/man-page/osx/1/powermetrics/

@BenBE
Copy link
Member

BenBE commented Feb 6, 2023

You can take a look at https://www.unix.com/man-page/osx/1/powermetrics/

That's not exactly "source code" that could be any reference for an implementation AFAICS …

@dontcrash
Copy link

You can get the CPU frequency on macOS ARM:
sudo /usr/bin/powermetrics -s cpu_power -n 1
image

@ulope
Copy link

ulope commented May 6, 2023

@bakaid
Copy link
Contributor

bakaid commented Jul 26, 2023

Hi folks!

I just submitted #1272 that implements this for Apple Silicon. I only have vanilla M1 and M2 machines, so if any of you have Pro/Max and especially Ultra versions, and could give this a spin, it would be very helpful.
If you can, please also test it with maximum CPU (using something like Endurance) and see if the maximum frequencies and number of P/E cores make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS 🍏 MacOS / Darwin related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants