Baldomo / asusctltray

Simple tray profile switcher for asusctl
MIT License
32 stars 5 forks source link

Not launching on Hyprland #22

Open k2helix opened 6 months ago

k2helix commented 6 months ago

I installed asusctltray on Hyprland (wayland) and I'm getting this error whenever I try to open asusctltray from the command line (desktop app also does not work)

Traceback (most recent call last):
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 173, in activate_name_owner
    return self.get_name_owner(bus_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 348, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: The name does not have an owner

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 690, in <module>
    TrayIcon(loop)
  File "/usr/local/bin/asusctltray", line 650, in __init__
    self.build_menu()
  File "/usr/local/bin/asusctltray", line 663, in build_menu
    PowerProfilesController().attach(self.menu)
  File "/usr/local/bin/asusctltray", line 328, in attach
    for item in self.items:
                ^^^^^^^^^^
  File "/usr/local/bin/asusctltray", line 585, in items
    for p in self.proxy.Get("net.hadess.PowerProfiles", "Profiles")
             ^^^^^^^^^^
  File "/usr/local/bin/asusctltray", line 591, in proxy
    dbus.SystemBus().get_object(
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 237, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 178, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib64/python3.12/site-packages/dbus/bus.py", line 273, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
Baldomo commented 6 months ago

The DBus API for fan profiles has been substantially changed on asusctl's side, I am already working on a fix for the latest asusctl version. It will break compatibility with old versions but oh well, I can't maintain this program for that many old API versions

Baldomo commented 1 month ago

I generally fixed the script in c8ef0ba according to the DBus API changes. However, looking at the stacktrace you posted, it may just be that you're missing power-profiles-daemon or it's not launching correctly (it must be enabled in systemd of course). Please do let me know if everything works now.

Sorry for the wait!

k2helix commented 1 month ago

Hi, you're right, I don't have the power-profiles-daemon installed because I use tlp. Will let you know if it works when I get to configure Hyprland again. Thanks for your help