vagnum08 / cpupower-gui

cpupower-gui is a graphical program that is used to change the scaling frequency limits of the cpu, similar to cpupower.
GNU General Public License v3.0
476 stars 31 forks source link

When some core is offlline, the gui crash #106

Closed Lutty76 closed 1 year ago

Lutty76 commented 1 year ago

Describe the bug

If i disabled some core on my CPU the GUI is not refreshed anymore, after restart the gui appear as the screenshot below

To Reproduce Steps to reproduce the behaviour:

  1. Run cpupower-gui
  2. Click on online checkbox of one or more CPU
  3. Click on Apply
  4. See error

Expected behaviour GUI continue working with showing disabled core with possibility of reactivate it

Setup (please complete the following information):

Additional context

If I reactivate all core manually, GUI works again.

Capture d’écran du 2023-07-07 10-56-23

Log at start :

⇒cpupower-gui                                                           10:53:15
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
WARNING! Unknown CPU frequency, cause: [Errno 16] Périphérique ou ressource occupé
Traceback (most recent call last):
  File "/usr/share/cpupower-gui/cpupower_gui/main.py", line 76, in do_activate
    win = CpupowerGuiWindow(application=self)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/cpupower-gui/cpupower_gui/window.py", line 177, in __init__
    self.load_cpu_settings()
  File "/usr/share/cpupower-gui/cpupower_gui/window.py", line 205, in load_cpu_settings
    self.settings[cpu] = CpuSettings(cpu)
                         ^^^^^^^^^^^^^^^^
  File "/usr/share/cpupower-gui/cpupower_gui/config.py", line 434, in __init__
    self.update_conf()
  File "/usr/share/cpupower-gui/cpupower_gui/config.py", line 438, in update_conf
    self._settings["freqs"] = read_freqs(cpu)
                              ^^^^^^^^^^^^^^^
  File "/usr/share/cpupower-gui/cpupower_gui/utils.py", line 93, in read_freqs
    freq_min = int((sys_path / FREQ_MIN).read_text())
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/pathlib.py", line 1059, in read_text
    return f.read()
           ^^^^^^^^
OSError: [Errno 16] Périphérique ou ressource occupé

(cpupower-gui:231626): Gdk-CRITICAL **: 10:53:20.989: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
vagnum08 commented 1 year ago

I am aware of this. It is half-way fixed on #105 ,it needs a bit more work in order to update the governor and frequency limits.

It will be fixed when the pull request is merged.