cpupower-gui icon indicating copy to clipboard operation
cpupower-gui copied to clipboard

"int-expected, float-passed" error for the --min frequency

Open feg2hi opened this issue 1 year ago • 0 comments

Describe the bug passing this command on the CLI throwth "int-expected, float-passed" error: /usr/bin/cpupower-gui frequency --min 800 --max 1700 0-7

To Reproduce Steps to reproduce the behaviour:

  1. Open terminal
  2. /usr/bin/cpupower-gui frequency --min 800 --max 1700 0-7
  3. See error

Expected behaviour No error

Setup (please complete the following information):

  • Distro: Linux-Mint 21.3 Virginia
  • Hardware: MacBook Pro (Mid 2015) without battery (blown up ==> removed for safety). Without battery the MacBook resets on higher current consumption due to brightness and processor clock.
  • Package version: cpupower-gui_1.0.0-1_all_linux_mint.deb
  • Installed via: download of cpupower-gui_1.0.0-1_all_linux_mint.deb and double click in file manager

Additional context Fortunately, I could repair it for my use case. In the file /usr/share/cpupower-gui/cpupower_gui/helper.py I added two lines for explicit type conversion:

def set_cpu_min_freq(cpu, freq):
    """Set minimum frequency for CPU
...
    freq *= 1e3
    freq = int(freq) """ <<<< Add this line here


def set_cpu_max_freq(cpu, freq):
    """Set maximum frequency for CPU
...
    freq *= 1e3
    freq = int(freq) """ <<<< Add this line here

Would be fine to find the latest release in the repository for Ubuntu / Debian

feg2hi avatar Feb 03 '24 13:02 feg2hi