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

cpufreq does not work #7

Open
sabquat opened this issue Aug 6, 2021 · 2 comments
Open

cpufreq does not work #7

sabquat opened this issue Aug 6, 2021 · 2 comments

Comments

@sabquat
Copy link

sabquat commented Aug 6, 2021

Got following error with cpufreq-

$ cpufreq --help
Traceback (most recent call last):
  File "/home/serlop/anaconda3/bin/cpufreq", line 8, in <module>
    sys.exit(main())
  File "/home/serlop/anaconda3/lib/python3.8/site-packages/cpufreq/run.py", line 104, in main
    c = cpuFreq()
  File "/home/serlop/anaconda3/lib/python3.8/site-packages/cpufreq/cpufreq.py", line 77, in __new__
    dataf = cpuFreq.__instance.__read_cpu_file(fpath)
  File "/home/serlop/anaconda3/lib/python3.8/site-packages/cpufreq/cpufreq.py", line 90, in __read_cpu_file
    with open(fpath, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'

Apparently, Intel has stopped publishing available frequencies. However, it is still possible to calculate the available frequencies using min, max, and the number of available frequency steps.

FYI, I am using Ubuntu 18.04 LTS and i5-10400

@VitorRamos
Copy link
Owner

Well in fact this API was designed to work with the acpi-cpufreq driver, some features might work with the intel-pstate but is not guaranteed.

@insung3511
Copy link

I got a similar issue in macOS, Macbook Pro M1 ARM architecture. This is a problem code and result.

import psutil
print(psutil.cpu_freq().max)
.
.
  File "/Users/user/miniconda3/lib/python3.10/site-packages/psutil/_psosx.py", line 179, in cpu_freq
    curr, min_, max_ = cext.cpu_freq()
FileNotFoundError: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))

When I searched, still this is a problem for M1 users. Are there any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants