Open bam80 opened 2 years ago
I can guess that API is compatible with the latest devices. I tried to fix it. You can confirm if it works. Also please test reading and writing alert level and sleep timeout options.
Now it shows correct charge, thanks. About alert levels, I don't see 75% as an option, it was available before. How can I test sleep timeout, should it apply to BT connection also, or only to RF one?
You can't set alert level higher than 50% as far as I remember. It looks pointless to have an alert on such high charge level, because mouse could drop from 100% to 75% really fast and stay at 75% for longer period.
Sleep timeout applies to any wireless types of connection.
75% was definitely an option, I set it in orig Windows app for testing purposes and your app displayed it as such. Then I lowered the level at some point (via your app) and now can't see the 75% any more.
I have sleep timeout set to 2 min but can't see any evidence of sleepiness even for RF mode.
Could I resurrect the report?
Battery status doesn't work for me again:
Also setting sleep timeouts doesn't seem to have any affect and doesn't preserve between the app rerun:
$ rogdrv --debug
[2023-04-05 19:28:40,921] [DEBUG] Loading drivers
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'etekcity'
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'sinowealth'
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'gskill'
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'logitech_g300'
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'logitech_g600'
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'sinowealth_nubwo'
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'roccat-kone-emp'
[2023-04-05 19:28:40,973] [ERROR] Unable to find driver 'roccat-kone-pure'
[2023-04-05 19:28:40,974] [ERROR] Unable to find driver 'steelseries'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/rog/ui/handler.py", line 246, in on_battery_choice
_, charge, alert = self._device.get_sleep_charge_alert()
AttributeError: 'NoneType' object has no attribute 'get_sleep_charge_alert'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/rog/ui/handler.py", line 246, in on_battery_choice
_, charge, alert = self._device.get_sleep_charge_alert()
AttributeError: 'NoneType' object has no attribute 'get_sleep_charge_alert'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/rog/ui/handler.py", line 246, in on_battery_choice
_, charge, alert = self._device.get_sleep_charge_alert()
AttributeError: 'NoneType' object has no attribute 'get_sleep_charge_alert'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/rog/ui/handler.py", line 221, in on_sleep_choice
sleep, _, _ = self._device.get_sleep_charge_alert()
AttributeError: 'NoneType' object has no attribute 'get_sleep_charge_alert'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/rog/ui/handler.py", line 233, in on_sleep
sleep_old, _, alert = self._device.get_sleep_charge_alert()
AttributeError: 'NoneType' object has no attribute 'get_sleep_charge_alert'
PS: I use master, issued install commands from Readme again for the update
UPDATE:
the reason might be ratbagcli
doesn't see the device:
$ ratbagcli list
ERROR: ratbag: Unable to find driver 'etekcity'
ERROR: ratbag: Unable to find driver 'sinowealth'
ERROR: ratbag: Unable to find driver 'gskill'
ERROR: ratbag: Unable to find driver 'logitech_g300'
ERROR: ratbag: Unable to find driver 'logitech_g600'
ERROR: ratbag: Unable to find driver 'sinowealth_nubwo'
ERROR: ratbag: Unable to find driver 'roccat-kone-emp'
ERROR: ratbag: Unable to find driver 'roccat-kone-pure'
ERROR: ratbag: Unable to find driver 'steelseries'
# No supported devices available
Thoughts? @kyokenn
@kyokenn friendly ping :)
Battery status doesn't work for me again
It's not implemented in ratbag-python so it will not be available in rogdrv. I want to move the battery settings and battery status to the kernel module - https://github.com/kyokenn/hid-asus-mouse . So the battery status will be available in any DE like GNOME and others.
the reason might be ratbagcli doesn't see the device:
Can you run "sudo ratbagd --console-log-level debug" and show the output?
So the battery status will be available in any DE like GNOME and others.
Right now I see some evidence of the mouse discharge in Gnome Settings: It probably is not precise because it jumped from 100 to 75 suddenly. But still, it can work somehow without your driver?
Can you run "sudo ratbagd --console-log-level debug" and show the output?
$ sudo ratbagd --console-log-level debug
[sudo] password for bam:
D|ratbag.driver: Loading drivers
Traceback (most recent call last):
File "/usr/local/bin/ratbagd", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/ratbag/cli/ratbagd_dasbus.py", line 603, in main
ratbagd.start()
File "/usr/local/lib/python3.10/dist-packages/ratbag/cli/ratbagd_dasbus.py", line 521, in start
self.bus.register_service(NAME_PREFIX)
File "/usr/local/lib/python3.10/dist-packages/dasbus/connection.py", line 259, in register_service
result = self.proxy.RequestName(service_name, flags)
File "/usr/local/lib/python3.10/dist-packages/dasbus/client/handler.py", line 450, in _call_method
return self._get_method_reply(
File "/usr/local/lib/python3.10/dist-packages/dasbus/client/handler.py", line 483, in _get_method_reply
return self._handle_method_error(error)
File "/usr/local/lib/python3.10/dist-packages/dasbus/client/handler.py", line 509, in _handle_method_error
raise exception from None
dasbus.error.DBusError: Connection ":1.29717" is not allowed to own the service "org.freedesktop.ratbag1" due to security policies in the configuration file
But still, it can work somehow without your driver?
Is it connected via bluetooth? ASUS mice can actually send the battery info over bluetooth, they are using HID-compatible protocol.
If the mouse is connected via cable or RF then it sends the battery info using it's own protocol. I haven't seen the other cases yet.
dasbus.error.DBusError: Connection ":1.29717" is not allowed to own the service "org.freedesktop.ratbag1" due to security policies in the configuration file
You need to copy dbus config file:
sudo cp -fv ./ratbag-python/dbus/org.freedesktop.ratbag1.conf /etc/dbus-1/system.d/
Is it connected via bluetooth? ASUS mice can actually send the battery info over bluetooth, they are using HID-compatible protocol.
Yes, it is. What is the point in your hid-asus-mouse
driver then (for this particular mouse)?
You need to copy dbus config file: sudo cp -fv ./ratbag-python/dbus/org.freedesktop.ratbag1.conf /etc/dbus-1/system.d/
Still doesn't seem to work:
$ sudo ratbagd --console-log-level debug
D|ratbag.driver: Loading drivers
no more output here.
If I run the ratbagcli
in the other console, nothing changes:
bam@Feedme:~/tmp/rogdrv/ratbag-python$ ratbagcli list
D|ratbag.driver: Loading drivers
E|ratbag: Unable to find driver 'etekcity'
E|ratbag: Unable to find driver 'sinowealth'
E|ratbag: Unable to find driver 'gskill'
E|ratbag: Unable to find driver 'logitech_g300'
E|ratbag: Unable to find driver 'logitech_g600'
E|ratbag: Unable to find driver 'sinowealth_nubwo'
E|ratbag: Unable to find driver 'roccat-kone-emp'
E|ratbag: Unable to find driver 'roccat-kone-pure'
E|ratbag: Unable to find driver 'steelseries'
# No supported devices available
bam@Feedme:~/tmp/rogdrv/ratbag-python$ sudo ratbagcli list
[sudo] password for bam:
D|ratbag.driver: Loading drivers
E|ratbag: Unable to find driver 'etekcity'
E|ratbag: Unable to find driver 'sinowealth'
E|ratbag: Unable to find driver 'gskill'
E|ratbag: Unable to find driver 'logitech_g300'
E|ratbag: Unable to find driver 'logitech_g600'
E|ratbag: Unable to find driver 'sinowealth_nubwo'
E|ratbag: Unable to find driver 'roccat-kone-emp'
E|ratbag: Unable to find driver 'roccat-kone-pure'
E|ratbag: Unable to find driver 'steelseries'
# No supported devices available
Yes, it is. What is the point in your hid-asus-mouse driver then (for this particular mouse)?
This driver can be used with USB/RF connection only. Also both rogdrv + ratbag-python and libratbag can be used when the mouse is connected over USB or RF.
No supported devices available
Make sure that you have connected your mouse via USB or RF.
Make sure that you have connected your mouse via USB or RF.
Oh, can we make it explicitly clear from the Readme, please? I can assure you it's not obvious even for those who used the driver in the past (so I completely forgot about it after a year of not using it)
You need to copy dbus config file: sudo cp -fv ./ratbag-python/dbus/org.freedesktop.ratbag1.conf /etc/dbus-1/system.d/
This should also be made more clear in Readme, IMO. Right now it's mentioned in "See also" chapter and perceived as something auxiliary and not strictly needed to run the app.
Battery status doesn't work for me again
It's not implemented in ratbag-python so it will not be available in rogdrv. I want to move the battery settings and battery status to the kernel module - https://github.com/kyokenn/hid-asus-mouse . So the battery status will be available in any DE like GNOME and others.
What about sleep settings? I do not see them in the new app version too.
Oh, can we make it explicitly clear from the Readme, please? I can assure you it's not obvious even for those who used the driver in the past (so I completely forgot about it after a year of not using it)
Done.
This should also be made more clear in Readme, IMO. Right now it's mentioned in "See also" chapter and perceived as something auxiliary and not strictly needed to run the app.
Yes, it's not needed for the main app rogdrv/rogdrv-config. But if you want to use ratbagd, then you will need it.
What about sleep settings? I do not see them in the new app version too.
It's not implemented yet.
I fully charged the mouse as seen in Gnome's Power Setting for Bluetooth devices, still get 0% charge in Battery menu when in RF mode: