Skip to content

[macOS,M5 hardware] cpu_freq returned a result with an exception set #2841

Description

@georgevreilly

Summary

  • OS: macOS Tahoe 26.5.1
  • Architecture: 64bit M5
  • Psutil version: 7.2.2
  • Python version: 3.14.5
  • Type: core

Description

This simple script

#!/usr/bin/env python3

import psutil

print(psutil.cpu_freq(True))

fails

❯ uv run x.py
RuntimeError: invalid CPU frequency data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/georgevreilly/src/pangur/x.py", line 5, in <module>
    print(psutil.cpu_freq(True))
          ~~~~~~~~~~~~~~~^^^^^^
  File "/Users/georgevreilly/src/pangur/.venv/lib/python3.14/site-packages/psutil/__init__.py", line 1945, in cpu_freq
    ret = _psplatform.cpu_freq()
  File "/Users/georgevreilly/src/pangur/.venv/lib/python3.14/site-packages/psutil/_psosx.py", line 166, in cpu_freq
    curr, min_, max_ = cext.cpu_freq()
                       ~~~~~~~~~~~~~^^
SystemError: <built-in function cpu_freq> returned a result with an exception set

When I run the repro on an M1 Mac on the same version of macOS, I get

[scpufreq(current=3228, min=600, max=3228)]

so this problem is likely specific to the new M5 hardware.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions