Auto-cpufreq install errors

Hi Everyone, I was really looking forward to trying out auto-cpufreq on a Asus ZenBook laptop running an up to date Leap 15.6, as it sounds like it could make a difference in battery energy consumption. I tried installing per these instructions: GitHub - AdnanHodzic/auto-cpufreq: Automatic CPU speed & power optimizer for Linux
I’m not knowledgeable enough to know if these errors are related to Leap or if they have more to do with auto-cpufreq. Would you able to advise if I should seek help through this forum or with the auto-cpufreq developer? Or if you know how this can be solved, please let me know in a reply.


────────────────────────────────────── Detected OpenSUSE distribution ──────────────────────────────────────


─────────────────────────────────────── Setting up Python environment ───────────────────────────────────────

Loading repository data...
Reading installed packages...
'python3' is already installed.
No update candidate for 'python3-3.6.15-150300.10.81.1.x86_64'. The highest available version is already installed.
'python3-pip' is already installed.
No update candidate for 'python3-pip-20.0.2-150400.20.1.noarch'. The highest available version is already installed.
'gtk3' not found in package names. Trying capabilities.
'libgtk-3-0' providing 'gtk3' is already installed.
'dmidecode' is already installed.
No update candidate for 'dmidecode-3.6-150400.16.11.2.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Problem: 1: the to be installed python3-cairo-devel-1.15.1-150000.3.8.1.x86_64 requires 'python3-cairo = 1.15.1', but this requirement cannot be provided
not installable providers: python3-cairo-1.15.1-150000.3.8.1.x86_64[repo-oss]

 Solution 1: deinstallation of python3-pycairo-1.20.1-150400.5.69.x86_64
 Solution 2: do not install python3-cairo-devel-1.15.1-150000.3.8.1.x86_64
 Solution 3: break python3-cairo-devel-1.15.1-150000.3.8.1.x86_64 by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/3/c/d/?] (c): c

─────────────────────────────────── Installing necessary Python packages ───────────────────────────────────

Collecting pip
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1.7 MB 4.2 MB/s 
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, wheel
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-21.3.1 wheel-0.37.1

─────────────────────────────────────── Installing auto-cpufreq tool ───────────────────────────────────────

Processing /home/heidi/auto-cpufreq
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-i4rr0fat/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry-core>=1.0.0' 'poetry-dynamic-versioning>=1.0.0,<2.0.0'
       cwd: None
  Complete output (4 lines):
  Collecting poetry-core>=1.0.0
    Downloading poetry_core-1.0.8-py2.py3-none-any.whl (425 kB)
  ERROR: Could not find a version that satisfies the requirement poetry-dynamic-versioning<2.0.0,>=1.0.0 (from versions: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6, 0.12.7, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.16.0, 0.17.0, 0.17.1, 1.0.0b1, 1.0.0b2, 1.0.0b3)
  ERROR: No matching distribution found for poetry-dynamic-versioning<2.0.0,>=1.0.0
  ----------------------------------------
WARNING: Discarding file:///home/heidi/auto-cpufreq. Command errored out with exit status 1: /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-i4rr0fat/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry-core>=1.0.0' 'poetry-dynamic-versioning>=1.0.0,<2.0.0' Check the logs for full command output.
ERROR: Command errored out with exit status 1: /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-i4rr0fat/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry-core>=1.0.0' 'poetry-dynamic-versioning>=1.0.0,<2.0.0' Check the logs for full command output.

───────────────────────────────── auto-cpufreq tool successfully installed ─────────────────────────────────

For list of options, run:
auto-cpufreq --help

Thanks so much.

I use tlp since it came preinstalled with openSUSE but was disabled by default. :green_circle:

The issue could be caused by outdated packages on Leap. :cold_face:

Are you able to tell from the konsole output which Leap packages may be outdated? There are no updates available when I run sudo zypper list-updates

The output is clear. Leap uses an up to date python3-pycairo package. But the external shell script needs a way older (outdated) package. So the issue is not Leap but the external installer which wants an older package.

1 Like

The script doesn’t specify version. It just wants python3-cairo-devel.

FWIW, no package by that name is available in TW/SR. The dependency resolution and conflict message is all zypper/leap.

Perhaps the install script can be edited to specify the version. What’s the output of:

zypper se /python.*cairo.*devel/
python3 -V

The script is not guilty. It’s all Leap’s fault:

pavin@suse-pc:~> sudo zypper install --dry-run python3 python3-pip python311-setuptools python3-devel gcc dmidecode gobject-introspection-devel python3-cairo-devel gtk3 gtk3-devel
Please enter the PIN: 
Please touch the device.
Loading repository data...
Reading installed packages...
'python3' not found in package names. Trying capabilities.
'python311' providing 'python3' is already installed.
'gtk3' not found in package names. Trying capabilities.
'libgtk-3-0' providing 'gtk3' is already installed.
'python311-setuptools' is already installed.
No update candidate for 'python311-setuptools-75.8.0-1.4.noarch'. The highest available version is already installed.
'gcc' is already installed.
No update candidate for 'gcc-14-3.1.x86_64'. The highest available version is already installed.
'dmidecode' is already installed.
No update candidate for 'dmidecode-3.6-2.2.x86_64'. The highest available version is already installed.
'python3-pip' not found in package names. Trying capabilities.
'python311-pip' providing 'python3-pip' is already installed.
'python3-devel' not found in package names. Trying capabilities.
'python3-cairo-devel' not found in package names. Trying capabilities.
Resolving package dependencies...

The following 3 recommended packages were automatically selected:
  libpng16-compat-devel libtiff-devel-docs pcre2-doc

The following 83 NEW packages are going to be installed:
  at-spi2-core-devel cairo-devel dbus-1-devel fontconfig-devel freetype2-devel fribidi-devel gdk-pixbuf-devel gettext-its-gtk3 glib2-devel gobject-introspection
  gobject-introspection-devel graphite2-devel gtk3-devel harfbuzz-devel libblkid-devel libbrotli-devel libbz2-devel libdatrie-devel libeconf-devel libepoxy-devel
  libexpat-devel libffi-devel libgirepository-2_0-0 libglvnd-devel libgthread-2_0-0 libharfbuzz-cairo0 libicu-devel libjpeg62 libjpeg62-devel libmount-devel libpcre2-posix3
  libpixman-1-0-devel libpng16-compat-devel libpng16-devel libselinux-devel libsepol-devel libstdc++-devel libthai-devel libtiff-devel libtiff-devel-docs libX11-devel
  libXau-devel libxcb-composite0 libxcb-damage0 libxcb-dbe0 libxcb-devel libxcb-dpms0 libxcb-record0 libxcb-screensaver0 libxcb-xf86dri0 libxcb-xtest0 libxcb-xvmc0
  libXcomposite-devel libXcursor-devel libXdamage-devel libXext-devel libXfixes-devel libXft-devel libXi-devel libXinerama-devel libxkbcommon-devel libXrandr-devel
  libXrender-devel libXtst-devel libz-ng-compat1 libzstd-devel Mesa-KHR-devel Mesa-libEGL-devel Mesa-libGL-devel pango-devel pcre2-devel pcre2-doc pcre2-tools python311-devel
  python311-pycairo-devel python-pycairo-common-devel typelib-1_0-GdkPixdata-2_0 typelib-1_0-GIRepository-3_0 typelib-1_0-GLibUnix-2_0 wayland-devel xorgproto-devel xz-devel
  zlib-ng-compat-devel

83 new packages to install.

Package download size:    12.7 MiB

Package install size change:
              |      81.7 MiB  required by packages that will be installed
    81.7 MiB  |  -      0 B    released by packages that will be removed

Backend:  classic_rpmtrans --dry-run
Continue? [y/n/v/...? shows all options] (y): n
pavin@suse-pc:~> 

Leap works also…but the script is broken as it does not stop at the zypper solver question, but poceedes without possibility to select a solution.
Leap and zypper are able to resolve the conflict but the script fails.

test@leaptest:~> sudo zypper install --dry-run python3 python3-pip python311-setuptools python3-devel gcc dmidecode gobject-introspection-devel python3-cairo-devel gtk3 gtk3-devel
[sudo] password for root: 
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
Loading repository data...
Reading installed packages...
'gcc' is already installed.
No update candidate for 'gcc-7-3.9.1.x86_64'. The highest available version is already installed.
'python3' is already installed.
No update candidate for 'python3-3.6.15-150300.10.81.1.x86_64'. The highest available version is already installed.
'python3-pip' is already installed.
No update candidate for 'python3-pip-20.0.2-150400.20.1.noarch'. The highest available version is already installed.
'dmidecode' is already installed.
No update candidate for 'dmidecode-3.6-150400.16.11.2.x86_64'. The highest available version is already installed.
'gtk3' not found in package names. Trying capabilities.
'libgtk-3-0' providing 'gtk3' is already installed.
Resolving package dependencies...

Problem: 1: the to be installed python3-cairo-devel-1.15.1-150000.3.8.1.x86_64 requires 'python3-cairo = 1.15.1', but this requirement cannot be provided
not installable providers: python3-cairo-1.15.1-150000.3.8.1.x86_64[openSUSE:repo-oss]

 Solution 1: deinstallation of python3-pycairo-1.20.1-150400.5.69.x86_64
 Solution 2: do not install python3-cairo-devel-1.15.1-150000.3.8.1.x86_64
 Solution 3: break python3-cairo-devel-1.15.1-150000.3.8.1.x86_64 by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/3/c/d/?] (c): 1

Resolving dependencies...
Resolving package dependencies...

The following 6 recommended packages were automatically selected:
  libpng16-compat-devel pcre2-doc python311 python311-curses python311-dbm python311-pip

The following 104 NEW packages are going to be installed:
  at-spi2-core at-spi2-core-devel at-spi2-core-lang cairo-devel compositeproto-devel damageproto-devel dbus-1-devel fixesproto-devel fontconfig-devel freetype2-devel fribidi-devel gdk-pixbuf-devel
  gettext-its-gtk4 glib2-devel gobject-introspection gobject-introspection-devel graphite2-devel gtk3-devel harfbuzz-devel inputproto-devel kbproto-devel libblkid-devel libbrotli-devel
  libbz2-devel libdatrie-devel libepoxy-devel libexpat-devel libffi-devel libglvnd-devel libharfbuzz-cairo0 libharfbuzz-gobject0 libharfbuzz-icu0 libicu73_2-devel libjpeg62 libjpeg62-devel
  libmount-devel libpcre2-32-0 libpcre2-posix3 libpixman-1-0-devel libpng16-compat-devel libpng16-devel libpython3_11-1_0 libselinux-devel libsepol-devel libstdc++-devel libthai-devel
  libtiff-devel libX11-devel libXau-devel libxcb-devel libxcb-screensaver0 libxcb-xf86dri0 libxcb-xtest0 libxcb-xvmc0 libXcomposite-devel libXcursor-devel libXdamage-devel libXext-devel
  libXfixes-devel libXft-devel libXi-devel libXinerama-devel libxkbcommon-devel libXrandr-devel libXrender-devel libXtst-devel libzstd-devel Mesa-KHR-devel Mesa-libEGL-devel Mesa-libGL-devel
  pango-devel pcre2-devel pcre2-doc pcre2-tools pthread-stubs-devel python311 python311-base python311-curses python311-dbm python311-gobject python311-gobject-cairo python311-pip
  python311-pycairo python311-setuptools python3-cairo python3-cairo-devel python3-devel python3-gobject-Gdk python-cairo-common-devel randrproto-devel recordproto-devel renderproto-devel
  typelib-1_0-Atk-1_0 typelib-1_0-Atspi-2_0 typelib-1_0-GdkPixbuf-2_0 typelib-1_0-GdkPixdata-2_0 typelib-1_0-Gtk-3_0 typelib-1_0-HarfBuzz-0_0 typelib-1_0-Pango-1_0 wayland-devel xextproto-devel
  xineramaproto-devel xproto-devel xz-devel

The following package is going to be REMOVED:
  python3-pycairo

104 new packages to install, 1 to remove.

Package download size:    34.2 MiB

Package install size change:
              |     160.3 MiB  required by packages that will be installed
   159.7 MiB  |  -  606.2 KiB  released by packages that will be removed

Backend:  classic_rpmtrans --dry-run
Continue? [y/n/v/...? shows all options] (y): 

Another hint that this script is borked can be seen at the TOs output. The installation totally fails but the script still claims:

Sure…

I can provide the output of

zypper se /python.*cairo.*devel/ python3 -V
when I have that laptop near me later today. Do you think it's still relevant? It also looks like the devs of auto-cpufreq should be notified of this issue. Do you agree?

No. It is clear what the problem is; what is not quite clear is how to properly solve it.

I would not call it exactly a β€œfault”, but there are two packages - python3-cairo* and python3-pycairo*, where the former is obsolete by the latter:

bor@10:~> zypper info --obsoletes python3-pycairo
Loading repository data...
Reading installed packages...


Information for package python3-pycairo:
----------------------------------------
Repository     : Main Repository
Name           : python3-pycairo
Version        : 1.20.1-150400.5.69
Arch           : x86_64
Vendor         : SUSE LLC <https://www.suse.com/>
Installed Size : 606.2 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : python3-pycairo-1.20.1-150400.5.69.src
Upstream URL   : https://github.com/pygobject/pycairo
Summary        : Python Bindings for Cairo
Description    : 
    Pycairo is a Python module providing bindings for the cairo graphics
    library.
Obsoletes      : python3-cairo < 1.20.1

bor@10:~>  zypper info --provides python3-pycairo
Loading repository data...
Reading installed packages...


Information for package python3-pycairo:
----------------------------------------
Repository     : Main Repository
Name           : python3-pycairo
...
Provides       : [3]
    python3-cairo = 1.20.1
    python3-pycairo = 1.20.1-150400.5.69
    python3-pycairo(x86-64) = 1.20.1-150400.5.69

bor@10:~> 

And the same for python3-pycairo-devel. If python3-cairo* packages are obsolete anyway, why they are included in the distribution? If they were not present, the requirement for the python3-cairo-devel would have been satisfied by python3-pycairo-devel without any conflicts.

@kp_auburn Try installing python3-pycairo-devel explicitly before running your script. Will you have the same issue then?

Thank you. I will try installing python3-pycairo-devel explicitly before running the script and I’ll post the results later today.

Here is the terminal output of auto-cpufreq install attempt after installing python3-pycairo-devel first.

heidi@heidi-zenbookux393eaux393ea:~> cd auto-cpufreq && sudo ./auto-cpufreq-installer
[sudo] password for root: 

──────────────────────────────────────────────────────────────── auto-cpufreq installer ────────────────────────────────────────────────────────────────

Welcome to auto-cpufreq tool installer.

Select a key [I]nstall/[R]emove or press ctrl+c to quit: I


──────────────────────────────────────────────────────────── Detected OpenSUSE distribution ────────────────────────────────────────────────────────────


───────────────────────────────────────────────────────────── Setting up Python environment ─────────────────────────────────────────────────────────────

Loading repository data...
Reading installed packages...
'python3' is already installed.
No update candidate for 'python3-3.6.15-150300.10.81.1.x86_64'. The highest available version is already installed.
'python3-devel' is already installed.
No update candidate for 'python3-devel-3.6.15-150300.10.81.1.x86_64'. The highest available version is already installed.
'python3-pip' is already installed.
No update candidate for 'python3-pip-20.0.2-150400.20.1.noarch'. The highest available version is already installed.
'gtk3' not found in package names. Trying capabilities.
'libgtk-3-0' providing 'gtk3' is already installed.
'dmidecode' is already installed.
No update candidate for 'dmidecode-3.6-150400.16.11.2.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Problem: 1: the installed python3-pycairo-devel-1.20.1-150400.5.69.x86_64 obsoletes 'python3-cairo-devel < 1.20.1' provided by the to be installed python3-cairo-devel-1.15.1-150000.3.8.1.x86_64
 Solution 1: Following actions will be done:
  deinstallation of python3-pycairo-devel-1.20.1-150400.5.69.x86_64
  deinstallation of python-pycairo-common-devel-1.20.1-150400.1.11.x86_64
  deinstallation of python3-pycairo-1.20.1-150400.5.69.x86_64
 Solution 2: do not install python3-cairo-devel-1.15.1-150000.3.8.1.x86_64

Choose from above solutions by number or cancel [1/2/c/d/?] (c): c

───────────────────────────────────────────────────────── Installing necessary Python packages ─────────────────────────────────────────────────────────

Requirement already satisfied: pip in /opt/auto-cpufreq/venv/lib/python3.6/site-packages (21.3.1)
Requirement already satisfied: wheel in /opt/auto-cpufreq/venv/lib/python3.6/site-packages (0.37.1)

───────────────────────────────────────────────────────────── Installing auto-cpufreq tool ─────────────────────────────────────────────────────────────

Processing /home/heidi/auto-cpufreq
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_cu19bdj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry-core>=1.0.0' 'poetry-dynamic-versioning>=1.0.0,<2.0.0'
       cwd: None
  Complete output (4 lines):
  Collecting poetry-core>=1.0.0
    Using cached poetry_core-1.0.8-py2.py3-none-any.whl (425 kB)
  ERROR: Could not find a version that satisfies the requirement poetry-dynamic-versioning<2.0.0,>=1.0.0 (from versions: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6, 0.12.7, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.16.0, 0.17.0, 0.17.1, 1.0.0b1, 1.0.0b2, 1.0.0b3)
  ERROR: No matching distribution found for poetry-dynamic-versioning<2.0.0,>=1.0.0
  ----------------------------------------
WARNING: Discarding file:///home/heidi/auto-cpufreq. Command errored out with exit status 1: /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_cu19bdj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry-core>=1.0.0' 'poetry-dynamic-versioning>=1.0.0,<2.0.0' Check the logs for full command output.
ERROR: Command errored out with exit status 1: /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_cu19bdj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry-core>=1.0.0' 'poetry-dynamic-versioning>=1.0.0,<2.0.0' Check the logs for full command output.

─────────────────────────────────────────────────────── auto-cpufreq tool successfully installed ───────────────────────────────────────────────────────

For list of options, run:
auto-cpufreq --help

There is definitely still an issue. Does it look like installing python3-pycairo-develahead of installing auto-cpufreq changed anything for the better?

@kp_auburn Hi, use the code not blockquote when adding terminal output :wink:

Open a Github Issue, the packages the install script is trying to install for Leap can definitely be improved. :eyes:

If you mean the original problem - yes, zypper will first look for the packages with the given names and only if none is found will check the Provides. You could try openSUSE bug report, although I am not sure what can be done here - it is unlikely that packages will be removed from the main repository at this point.

If you mean

it is something different. The last poetry-dynamic-versioning compatible with Python 3.6 was indeed 1.0.0b3 which is lower that 1.0.0 (it was pre-release).

Python 3.11 is available for Leap 15.6. I have no idea how you script decides which version to use.

… hmm, your script just takes python3 which is and will remain Python 3.6 on Leap for compatibility reasons. At the same time your script tries to install python311-setuptools which will not be used at all.

Yes, open an issue/bug/whatever for this project. This script needs fixing on Leap.

As a workaround you can try to install python311 and temporary override python3 to point to the /usr/bin/python3.11 when running your script. This should create venv for Python 3.11 then. You will need to install all dependencies manually though (e.g. python311-pycairo-devel etc).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.