Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MX Anywhere 3 shown as keyboard #17

Open
gpolydoros opened this issue Mar 26, 2024 · 16 comments
Open

MX Anywhere 3 shown as keyboard #17

gpolydoros opened this issue Mar 26, 2024 · 16 comments

Comments

@gpolydoros
Copy link

If only my MX Anywhere 3 is connected, UPower correctly shows a mouse icon. The moment I power on my MX Keys, the icon for the MX Anywhere 3 changes from mouse to keyboard:

image

@ppiastucki
Copy link
Contributor

Unfortunately, I cannot reproduce the problem.

Screenshot from 2024-04-09 17-22-42

@HironTez
Copy link

HironTez commented Apr 24, 2024

I have the same problem with MX Master 3S M
image

How can we help you find the problem?

@ppiastucki
Copy link
Contributor

I've made some changes in v18, I am not sure if they fix the problem but please give it a try.

@HironTez
Copy link

HironTez commented Apr 24, 2024

Unfortunately, it didn't help. But here's some additional info:

  • It only happens when the keyboard is connected. It works fine when I don't connect the keyboard.
  • The icon is correct at first, but changes after a second.
  • Once the icon has changed, it stays the same even if the keyboard is disconnected.
Screencast.from.2024-04-24.20-18-14.webm

@ppiastucki
Copy link
Contributor

How is the mouse/keyboard connected? Via bluetooth? Is so, please check what icons are shown in the bluetooth settings.
Screenshot from 2024-04-24 20-40-31

@HironTez
Copy link

Yes. And the icons are correct there

@ppiastucki
Copy link
Contributor

Would you be able to run journalctl /usr/bin/gnome-shell | grep upower-battery and provide the log entries related to the test scenario?

@HironTez
Copy link

Sure. Here I activate Bluetooth, connect the mouse and then the keyboard.

Logs
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Device added
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Refresh
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Found device: input-mouse-symbolic | /org/bluez/hci0/dev_D2_1E_0E_6B_13_C4
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Error Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method Refresh is not implemented on interface org.freedesktop.UPower.Device
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Found device: input-mouse-symbolic | /org/bluez/hci0/dev_D2_1E_0E_6B_13_C4
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Device removed
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Refresh
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Found device: input-mouse-symbolic | hidpp_battery_8
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Error Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method Refresh is not implemented on interface org.freedesktop.UPower.Device
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Found device: input-mouse-symbolic | hidpp_battery_8
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Device added
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Refresh
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Found device: input-mouse-symbolic | hidpp_battery_8
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Error Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method Refresh is not implemented on interface org.freedesktop.UPower.Device
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:11 No-One gnome-shell[20892]: [upower-battery] Found device: input-mouse-symbolic | hidpp_battery_8
Apr 24 21:02:12 No-One gnome-shell[20892]: [upower-battery] Property changed for MX Master 3S M
Apr 24 21:02:12 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:12 No-One gnome-shell[20892]: [upower-battery] Found device: input-keyboard-symbolic | hidpp_battery_8
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Device added
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Refresh
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Found device: input-keyboard-symbolic | hidpp_battery_8
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Found device: input-keyboard-symbolic | /org/bluez/hci0/dev_DE_F9_E0_17_22_84
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Error Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method Refresh is not implemented on interface org.freedesktop.UPower.Device
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Error Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method Refresh is not implemented on interface org.freedesktop.UPower.Device
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Finding devices
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Found device: input-keyboard-symbolic | hidpp_battery_8
Apr 24 21:02:13 No-One gnome-shell[20892]: [upower-battery] Found device: input-keyboard-symbolic | /org/bluez/hci0/dev_DE_F9_E0_17_22_84

@HironTez
Copy link

HironTez commented Apr 24, 2024

I added some logs about devices. Let me know if you need to add other logs

Logs
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicebattery_level - 1
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicecapacity - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicecharge_cycles - -1
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_empty - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_full - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_full_design - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_rate - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicehas_history - true
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicehas_statistics - true
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceicon_name - battery-low-symbolic
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceis_present - true
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceis_rechargeable - true
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicekind - 6
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceluminosity - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicemodel - MX Master 3S M
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicenative_path - hidpp_battery_9
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceonline - false
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicepercentage - 25
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicepower_supply - false
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceserial - d2:1e:0e:6b:13:c4
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicestate - 2
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetechnology - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetemperature - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetime_to_empty - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetime_to_full - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceupdate_time - 1713986369
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicevendor - 
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicevoltage - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicewarning_level - 1

Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicebattery_level - 1
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicecapacity - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicecharge_cycles - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_empty - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_full - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_full_design - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceenergy_rate - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicehas_history - true
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicehas_statistics - false
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceicon_name - battery-missing-symbolic
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceis_present - true
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceis_rechargeable - false
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicekind - 6
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceluminosity - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicemodel - MX Keys Mini
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicenative_path - /org/bluez/hci0/dev_DE_F9_E0_17_22_84
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceonline - false
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicepercentage - 50
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicepower_supply - false
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceserial - DE:F9:E0:17:22:84
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicestate - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetechnology - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetemperature - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetime_to_empty - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicetime_to_full - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] deviceupdate_time - 1713986354
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicevendor - 
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicevoltage - 0
Apr 24 21:19:29 No-One gnome-shell[36826]: [upower-battery] devicewarning_level - 1

@HironTez
Copy link

Btw. i just tried Bluetooth Battery Meter and it shows correct icons

@ppiastucki
Copy link
Contributor

It looks like device kind is returned as 6 (keyboard, see https://lazka.github.io/pgi-docs/UPowerGlib-1.0/enums.html#UPowerGlib.DeviceKind.KEYBOARD) for both MX Keys Mini and MX Master 3S M by UPower. It does not seem to be correct.

@ppiastucki
Copy link
Contributor

Please try upower -d and see what it returns. If your mouse is identified as a keyboard I think you will have to report it to UPower devs. Here is a similarly looking problem: https://gitlab.freedesktop.org/upower/upower/-/issues/128.

@HironTez
Copy link

Sorry, I upgraded to Ubuntu 24 with Gnome 46 and this extension doesn't support it yet. I will be happy to help when Gnome 46 support is added.

@HironTez
Copy link

I don't think this is a problem with your extension.

Screenshot from 2024-04-27 09-53-04
Screenshot from 2024-04-27 09-53-25

Is there another way to get info about devices? Because Bluetooth Battery Meter shows correct icons

@ppiastucki
Copy link
Contributor

ppiastucki commented Apr 27, 2024

As mentioned before, please run upower -d and see what it returns. If the output is incorrect then it means the problem is in UPower and you need to report it there. I believe Bluetooth Battery Meter uses bluetooth manager and reports the info for bluetooth devices only. This extension uses UPower purposely to be able to report the info for USB and other devices too.

@HironTez
Copy link

I reported the issue and it will be resolved. Thanks for your help.

https://gitlab.freedesktop.org/upower/upower/-/issues/268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants