Giter VIP home page Giter VIP logo

asusctltray's People

Contributors

baldomo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asusctltray's Issues

No Desktop Icon on gnome on arch

Hi I installed it from aur and it seems to be working fine. However there is no icon as from the screenshots below. I am using gnome on arch and icon is missing in search bar as well as the pinned dock.

No icon in search bar

No icon in Dock

If possible make an icon :)

Installing from AUR

I previously installed this with the install.sh, but when installing via the new AUR method, I get the following error. (Supergfxctl & asusctl are both installed.)

error: failed to commit transaction (conflicting files)
supergfxctl: /usr/bin/supergfxctl exists in filesystem
supergfxctl: /usr/bin/supergfxd exists in filesystem
supergfxctl: /usr/lib/systemd/system-preset/supergfxd.preset exists in filesystem
supergfxctl: /usr/lib/systemd/system/supergfxd.service exists in filesystem
supergfxctl: /usr/lib/udev/rules.d/90-supergfxd-nvidia-pm.rules exists in filesystem
supergfxctl: /usr/share/X11/xorg.conf.d/90-nvidia-screen-G05.conf exists in filesystem
supergfxctl: /usr/share/dbus-1/system.d/org.supergfxctl.Daemon.conf exists in filesystem
Errors occurred, no packages were upgraded.

Arch (Garuda Barebones), Asus ROG Flow X13

Support for supergfxctl v3.x.x

supergfxctl just released v3.0.0 (https://gitlab.com/asus-linux/supergfxctl/-/releases/3.0.0) in which the graphics modes have been renamed. This causes asusctltray to display different graphics mode than that which is set by supergfxctl

For example, setting the graphics mode to integrated via supergfxctl results in compute being the graphics mode selected in asusctltray on my G14.

I'm guessing the graphics mode indices and their respective display names have to be updated?

Thanks!

Add dGPU power status to tray

Would you think that adding a status line or icon to indicate the power status of the dGPU (supergfxctl -S) to show if it's active or suspended would be worthwhile? It's a command I run fairly regularly to check the dGPU is suspended properly.

Hopefully, the image below shows how the gnome tool presents the info.

image

Licensing

I am currently writing a PKGBUILD for this program, is there any licensing information ?

Suddenly stopped working after update

Hi I just did a full system update and after that the software is unable to launch.

Initially when I tried to launch from command line it said there is no module dbus. Then I installed dbus using sudo pacman -S python-dbus. But now it is giving me some other error. I am pasting it here.

Also I think there is issue with conda as well as regular python too you can see from the log cause when I tried to use asusctltray when conda is activated it gave me error when package gi is not installed.

I reinstalled from AUR and even tried from git repo and got the same issues.
Any idea how to fix this cause this worked flawlessly even if there is no icon

(base) [wick@sanganaka ~]$ asusctltray 
Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 31, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'
(base) [wick@sanganaka ~]$ asusctltray
Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 31, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'
(base) [wick@sanganaka ~]$ conda deactivate
[wick@sanganaka ~]$ asusctltray
Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 695, in <module>
    TrayIcon(loop)
  File "/usr/local/bin/asusctltray", line 655, in __init__
    self.build_menu()
  File "/usr/local/bin/asusctltray", line 671, in build_menu
    FanCurveController().attach(self.menu)
  File "/usr/local/bin/asusctltray", line 329, in attach
    for item in self.items:
                ^^^^^^^^^^
  File "/usr/local/bin/asusctltray", line 469, in items
    return [FAN_CURVES[i] for i in self.proxy.Profiles()]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/asusctltray", line 469, in <listcomp>
    return [FAN_CURVES[i] for i in self.proxy.Profiles()]
            ~~~~~~~~~~^^^
  File "/usr/local/bin/asusctltray", line 124, in __getitem__
    return self.right[key]
           ~~~~~~~~~~^^^^^
  File "/usr/local/bin/asusctltray", line 80, in __getitem__
    return self._dict[key]
           ~~~~~~~~~~^^^^^
KeyError: dbus.String('Performance')

DBusException error

Hi,
After update of asusctl (and installing supercgfxctl) and then updating asusctltray, I receive this error upon starting asusctltray:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, 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
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'net.hadess.PowerProfiles': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 333, in <module>
    TrayIcon()
  File "/usr/local/bin/asusctltray", line 93, in __init__
    bus.get_object("net.hadess.PowerProfiles", "/net/hadess/PowerProfiles"),
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name net.hadess.PowerProfiles was not provided by any .service files

Did I miss something?

new graphics Dbus interface support

➜  ~ asusctltray
Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 314, in <module>
    TrayIcon()
  File "/usr/local/bin/asusctltray", line 109, in __init__
    self.build_menu()
  File "/usr/local/bin/asusctltray", line 118, in build_menu
    self.add_graphics("Graphics")
  File "/usr/local/bin/asusctltray", line 174, in add_graphics
    current_graphics = self.get_current_graphics()
  File "/usr/local/bin/asusctltray", line 194, in get_current_graphics
    return GFX_MODES[vendor]
KeyError: dbus.UInt32(5)
➜  ~ asusctl --version
App and daemon versions:
      asusctl v4.0.6
        asusd v4.0.6

Component crate versions:
    rog-anime v1.3.0
     rog-aura v1.1.0
     rog-dbus v4.0.2
 rog-profiles v1.1.3
rog-supported v4.0.0

Product family: ROG Zephyrus G14
Board name: GA401QM

Not launching on Hyprland

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

Dbus.string error

Traceback (most recent call last):
File "/home/viciooso/gits/asusctltray/./asusctltray", line 695, in
TrayIcon(loop)
File "/home/viciooso/gits/asusctltray/./asusctltray", line 655, in init
self.build_menu()
File "/home/viciooso/gits/asusctltray/./asusctltray", line 671, in build_menu
FanCurveController().attach(self.menu)
File "/home/viciooso/gits/asusctltray/./asusctltray", line 329, in attach
for item in self.items:
^^^^^^^^^^
File "/home/viciooso/gits/asusctltray/./asusctltray", line 469, in items
return [FAN_CURVES[i] for i in self.proxy.Profiles()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/viciooso/gits/asusctltray/./asusctltray", line 469, in
return [FAN_CURVES[i] for i in self.proxy.Profiles()]
~~~~~~~~~~^^^
File "/home/viciooso/gits/asusctltray/./asusctltray", line 124, in getitem
return self.right[key]
~~~~~~~~~~^^^^^
File "/home/viciooso/gits/asusctltray/./asusctltray", line 80, in getitem
return self._dict[key]
~~~~~~~~~~^^^^^
KeyError: dbus.String('Performance')

Real-time dGPU power status update

On booting the dGPU is active, and then goes to suspended after a short while of the desktop loading. If asusctltray is started during the time when the dGPU is active, then the status line always shows active, even after the dGPU has successfully suspended afterwards (as confirmed by supergfxctl -S). I haven't tested, but presuming that if some task/app managed to wake the dGPU and not successfully suspend it afterwards, asusctltray would always show suspended when it wasn't?

Would it be possible to re-get the status of the dGPU either on a timer, or some onClick event (if there is such a thing) of the asusctltray widget?

Thanks. :)

Boost control

Hello! So, with sway + waybar running on Wayland as per this issue #16 , I got the missing tray icon rendered correctly. Not sure what did that.

However, when I tried enabling/disabling the CPU frequency boost, nothing happens. Upon checking journalctl -f, I got the following error,

Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]: Traceback (most recent call last):
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:   File "/usr/lib64/python3.10/codecs.py", line 310, in __init__
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:     IncrementalDecoder.__init__(self, errors)
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]: RecursionError: maximum recursion depth exceeded
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]: During handling of the above exception, another exception occurred:
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]: Traceback (most recent call last):
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:   File "/usr/local/bin/asusctltray", line 85, in inner
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:     callback(self, widget)
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:   File "/usr/local/bin/asusctltray", line 373, in _disable_boost
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:     if not self._is_boost_enabled():
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:   File "/usr/local/bin/asusctltray", line 357, in _is_boost_enabled
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]:     data = open(self.boost_ctrl["path"], "r").read()[:-1]
Jul 16 06:19:55 rogStrixG15 /usr/libexec/gdm-wayland-session[53233]: RecursionError: maximum recursion depth exceeded while calling a Python object

May I know what should be done to fix this? Your help would be greatly appreciated, and thanks again for developing asusctltray.

asusctl 4.x support

asusctltray wont start after recently update of asusctl

➜  ~ asusctltray
Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 224, in <module>
    TrayIcon()
  File "/usr/local/bin/asusctltray", line 64, in __init__
    self.presets = self.config["power_profiles"].keys()
KeyError: 'power_profiles'

➜  ~ asusctl --version
App and daemon versions:
      asusctl v4.0.3
        asusd v4.0.3

Component crate versions:
    rog-anime v1.1.0
     rog-aura v1.1.0
     rog-dbus v4.0.2
 rog-profiles v1.1.2
rog-supported v4.0.0
  supergfxctl v2.0.0

Product family: ROG Zephyrus G14
Board name: GA401QM

have you any plans to update?

Error on Ubuntu 20.10

Hi there and thank you very much for your work!

Under Ubuntu 20.10 I get this when I want to right click on the icon:

Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 77, in rightclick
    self.get_current_graphics()
  File "/usr/local/bin/asusctltray", line 134, in get_current_graphics
    res = proxy.call_sync("Vendor", None, Gio.DBusCallFlags.NO_AUTO_START, 2000, None)
gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Unknown object '/org/asuslinux/Gfx' (41)
Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 77, in rightclick

Tray icon

It is not really an issue, but more as an idea.

Is it possible to have 3 different color coded tray icons (green, yellow and red, same as asus-notify daemon has) that would change depending which profile is active?

Does not install in ubuntu No such file or directory: '/etc/supergfxd.conf'

Hey, install:

asusctltray$ sudo bash -x ./install.sh 
+ ((  EUID != 0  ))
+ cp asusctltray /usr/local/bin
+ chmod a+x /usr/local/bin/asusctltray
+ cp asusctltray.svg /usr/share/pixmaps
+ cp asusctltray.desktop /usr/share/applications

After running I get:

$ asusctltray 
Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 333, in <module>
    TrayIcon()
  File "/usr/local/bin/asusctltray", line 84, in __init__
    with open(GFX_CONF, "r") as file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/supergfxd.conf'

Versions

$ asusctl --version

App and daemon versions:
     asusctl v3.5.1
       asusd v3.7.2

Component crate versions:
   rog-anime v1.0.5
    rog-aura v1.1.0
    rog-dbus v3.5.1
rog-profiles v0.1.2
   rog-types v3.2.0

Unrecognised graphics mode with index (int(vendor)).

Message was "Please open a new issue on Github with this bug report!"

OS: Garuda Linux x86_64
Host: ROG Flow X13 GV301QH_GV301QH 1.0
Kernel: 5.15.14-xanmod1-rog-1
DE: Plasma 5.23.5 (Wayland)

g14/asusctl 4.0.7.r0.gba40c3f-2 [0B 9.82MiB] [Installed]
Asus laptop control utilities

Missing tray icon on sway + waybar

Hello! Thanks for working on this program.

I am currently using sway + waybar on Fedora 36, and when I have asusctltray running, the ROG icon isn't displayed. May I ask how can I resolve this?

image

asusctltray is the one on the right of Discord. Thanks

Nothing happened when run. Fedora 34

try run after install, but nothing happened.

When run /usr/local/bin/asusctltray got messages:

/usr/local/bin/asusctltray:64: DeprecationWarning: Gtk.StatusIcon.set_visible is deprecated
  self.icon.set_visible(True)
/usr/local/bin/asusctltray:68: DeprecationWarning: Gtk.StatusIcon.set_from_pixbuf is deprecated
  self.icon.set_from_pixbuf(self.image_pixbuf)

another DBus exception error.

Hi, I saw that you add support for newest supegfxctl, but upon installlation when I run program I got this:

Traceback (most recent call last):
  File "/usr/local/bin/asusctltray", line 335, in <module>
    TrayIcon()
  File "/usr/local/bin/asusctltray", line 109, in __init__
    self.build_menu()
  File "/usr/local/bin/asusctltray", line 118, in build_menu
    self.add_graphics("Graphics")
  File "/usr/local/bin/asusctltray", line 174, in add_graphics
    current_graphics = self.get_current_graphics()
  File "/usr/local/bin/asusctltray", line 194, in get_current_graphics
    mode = self.gfx_proxy.Mode()
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Unknown method 'Mode'

Did I miss something again?

Environment:
OS: Debian GNU/Linux bookworm/sid x86_64
Host: ROG Zephyrus G14 GA401QM_GA401QM 1.0
Kernel: 5.15.0-3-amd64
DE: Plasma 5.23.5
WM: KWin

supergfxctl 4.x support

Just a reminder for myself to add support for the latest major version of supergfxctl. The dbus API has changed a lot so it will take me some time to implement. New release incoming.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.