Closed bill88t closed 1 year ago
When cpu1 is disabled:
cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_min_freq
cat: /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_min_freq: Device or resource busy
cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq
cat: /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq: Device or resource busy
However sudo sh -c 'echo "1" > /sys/devices/system/cpu/cpu1/online'
works just fine.
Maybe it is wise to check if the core is enabled first.
I can probably fix this myself.
I am aware of this. I found out a couple of weeks ago that this happens when I was trying to troubleshoot another bug.
I did some changes in helper.py if I recall correctly.
Feel free to have a go at fixing this and I will be happy to merge a pull request.
All yours chief. Tested it against my system.
The classic "it works on my system" lol. I had this issue just now when messing with disabling cores. 6 of my cores are hyperthreaded to each handle 2 threads (so I have 14 hardware cores but the computer sees 20), not sure if that might be related or not.
Here's the output:
wkoa {~} $ cpupower-gui off 1
Setting CPU1 offline...
OK
wkoa {~} $ cpupower-gui co
WARNING! Unknown CPU frequency, cause: [Errno 16] Device or resource busy
WARNING! Unknown CPU frequency, cause: [Errno 16] Device or resource busy
WARNING! Unknown CPU frequency, cause: [Errno 16] Device or resource busy
WARNING! Unknown CPU frequency, cause: [Errno 16] Device or resource busy
Applying configuration...
Setting CPU: 0
Minimum Frequency: 400.0 MHz, Maximum Frequency: 4700.0 MHz
Governor: Powersave, Online: True
Traceback (most recent call last):
File "/usr/bin/cpupower-gui", line 351, in <module>
args.func(args)
File "/usr/bin/cpupower-gui", line 72, in set_config
ret = apply_configuration(conf)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/cpupower-gui/cpupower_gui/helper.py", line 67, in apply_configuration
apply_cpu_profile(config.get_profile(profile))
File "/usr/share/cpupower-gui/cpupower_gui/helper.py", line 52, in apply_cpu_profile
print(MSG.format(cpu, fmin / 1e3, fmax / 1e3, gov.capitalize(), online))
Same thing with sudo, whether that helps or not idk.
Yes, I am getting the same problem both from the release and building from source. Disabling / sleeping cores makes it crash.
Describe the bug Fails to retrieve cpu core properties on disabled cores.
To Reproduce
Setup
Additional context Ryzen 3 3250U Python3.10 Activating a profile that enables the cpu's will enable one, so a temporary workaround is to spam it till all are online.
cpu-info freq
will also fail.