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

Spamming of line 98: echo: write error: Device or resource busy #751

Closed
dotfrag opened this issue Jul 24, 2024 · 2 comments
Closed

Spamming of line 98: echo: write error: Device or resource busy #751

dotfrag opened this issue Jul 24, 2024 · 2 comments

Comments

@dotfrag
Copy link

dotfrag commented Jul 24, 2024

Fill out information requested in this template, without doing so issue will be ignored & closed!

Have you tried?

Yes, I have found multiple issues but they claim that it has been resolved.

EDIT: I have possibly duplicated #724, I'm sorry if that's the case, I should have been more careful. Specifically:

When the governor is set to performance, only performance EPP is available as you can see in the screenshot below. By default auto-cpufreq tries to set balance-performance which might be causing this issue because such an EPP is not available.

Not failed.

Yes.

I checked, but the issue is not listed.

Error output:

Lenovo Thinkpad P16s AMD gpu, more hardware info below. Ubuntu - installed with installer script.

● auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
     Loaded: loaded (/etc/systemd/system/auto-cpufreq.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-07-24 17:56:20 EEST; 4min 55s ago
   Main PID: 29827 (python)
      Tasks: 2 (limit: 71724)
     Memory: 18.1M
        CPU: 5.700s
     CGroup: /system.slice/auto-cpufreq.service
             └─29827 /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/bin/auto-cpufreq --daemon

Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy
Jul 24 18:01:14  python[35039]: /usr/local/bin/cpufreqctl.auto-cpufreq: line 98: echo: write error: Device or resource busy


System information:

Add/paste output of:

-------------------------------- Battery Info ---------------------------------

battery count = 1
BAT0 start threshold = 0
BAT0 start threshold = 100

-------------------------------------------------------------------------------

Linux distro: Ubuntu 22.04 Jammy Jellyfish
Linux kernel: 6.5.0-1025-oem
Processor: AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics
Cores: 16
Architecture: x86_64
Driver: amd-pstate-epp

------------------------------ Current CPU stats ------------------------------

CPU max frequency: 6076 MHz
CPU min frequency: 400 MHz

Core	Usage	Temperature	Frequency
CPU0      1.0%        46 °C       400 MHz
CPU1      0.0%        46 °C       400 MHz
CPU2      1.0%        46 °C       400 MHz
CPU3      1.0%        46 °C       400 MHz
CPU4      2.0%        46 °C      3267 MHz
CPU5      0.0%        46 °C       400 MHz
CPU6      0.0%        46 °C       400 MHz
CPU7      0.0%        46 °C      2972 MHz
CPU8      1.0%        46 °C      3116 MHz
CPU9      0.0%        46 °C      3268 MHz
CPU10      0.0%        46 °C       400 MHz
CPU11      0.0%        46 °C      3269 MHz
CPU12      1.0%        46 °C      3191 MHz
CPU13      0.0%        46 °C       400 MHz
CPU14      0.0%        46 °C      3268 MHz
CPU15      0.0%        46 °C       400 MHz

CPU fan speed: 1990 RPM

auto-cpufreq version: 2.3.0 (git: a7df94d)

Python: 3.10.12
psutil package: 5.9.8
platform package: 1.0.8
click package: 8.1.7
distro package: 1.9.0

Computer type: Notebook
Battery is: charging

auto-cpufreq system resource consumption:
cpu usage: 0.0 %
memory use: 0.05 %

Total CPU usage: 3.2 %
Total system load: 0.04
Average temp. of all cores: 46.00 °C 

Currently using: performance governor
CPU turbo is controlled by amd-pstate-epp driver
Currently turbo boost is: off

-------------------------------------------------------------------------------

Also please be descriptive about the issue you're reporting, i.e: what you tried & what's the expected behaviour.

Line 98 is:

function write_value () {
  if [ -w $FLNM ]; then echo $VALUE > $FLNM; fi
}

This only happens with performance governor. Switching to powersave doesn't give any error. Charger plugged in or not makes no difference.

EDIT: I have possibly duplicated #724, I'm sorry if that's the case, I should have been more careful. Specifically:

When the governor is set to performance, only performance EPP is available as you can see in the screenshot below. By default auto-cpufreq tries to set balance-performance which might be causing this issue because such an EPP is not available.

❯ cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences
performance
@dotfrag
Copy link
Author

dotfrag commented Jul 25, 2024

I have updated to 24.04 LTS and the issue is gone. It seems that auto-cpufreq is no longer trying to load balanced_performance.

@AdnanHodzic
Copy link
Owner

I'm also on 24.04 for awhile and also don't have this problem, hence will close the issue. Please feel free to re-open if issue persist.

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

2 participants