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
465 stars 32 forks source link

cpupower-gui fails to launch #18

Closed phongvu99 closed 4 years ago

phongvu99 commented 4 years ago

Describe the bug The GUI failed to start when tried to launch via the shortcut or the terminal

To Reproduce Steps to reproduce the behaviour:

  1. Find the application
  2. Either click on 'cpupower-gui' via the menu or type it out in the terminal.
  3. Nothing happened via the menu but if used the terminal then step 4.
  4. See error

Expected behaviour A traceback provided by Python.

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner return self.get_name_owner(bus_name) File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner 's', (bus_name,), **keywords) File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.rnd2.cpupower_gui.helper': no such name

During` handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/cpupower-gui", line 40, in from cpupower_gui import main File "/usr/share/cpupower-gui/cpupower_gui/main.py", line 36, in from .window import CpupowerGuiWindow File "/usr/share/cpupower-gui/cpupower_gui/window.py", line 26, in "org.rnd2.cpupower_gui.helper", "/org/rnd2/cpupower_gui/helper" File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object follow_name_owner_changes=follow_name_owner_changes) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in init self._named_service = conn.activate_name_owner(bus_name) File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner self.start_service_by_name(bus_name) File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name 'su', (bus_name, flags))) File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.systemd1.NoSuchUnit: Unit cpupower-gui-helper.service not found.

Setup (please complete the following information):

Additional context None.

vagnum08 commented 4 years ago

I think the issue is when you built with meson. My bad that I haven't document this in README, but there is an option for the systemd directory.

I tried this in a virtual machine using a live image. Meson version from repo is 0.45.1 and this project requires >=0.50.0. Also, Mint 19.3 is base on Ubuntu 18.04 and the version of python3-gobject is not available. The latest version of cpupower-gui that can be run on Ubuntu 18.04 is 0.7.0 (see note below).

You could try solving the system-helper error, but I don't think you can get away with python3-gobject. If you want to try and report back do the following

meson --prefix /usr -Dsystemddir=/lib/systemd build
ninja -C build
ninja -C build install

This should resolve the dbus.exceptions.DBusException: org.freedesktop.systemd1.NoSuchUnit: Unit cpupower-gui-helper.service not found. error.

Note:

If you want to get a deb package for 0.7.0, use the one from launchpad (download link)

phongvu99 commented 4 years ago

This actually solved the problem. Thanks for the rapid help! Btw, my Meson build system version is 0.51.2. The -Dsystemddir config resolves this for me.

P.S. You should add this to the documentation so people can resolve this issue in case they encounter one.

vagnum08 commented 4 years ago

Thanks for letting me know it worked. I will add this to README.md