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

G Pro X Superlight 2 invalid LOD setting breaks all DPI settings #2785

Open
bliepp opened this issue Jan 24, 2025 · 5 comments · May be fixed by #2806
Open

G Pro X Superlight 2 invalid LOD setting breaks all DPI settings #2785

bliepp opened this issue Jan 24, 2025 · 5 comments · May be fixed by #2806
Labels

Comments

@bliepp
Copy link

bliepp commented Jan 24, 2025

Information

  • Solaar version: solaar 1.1.13
  • Distribution: Manjaro
  • Kernel version (ex. uname -srmo): Linux 6.1.119-1-MANJARO x86_64 GNU/Linux
  • Output of solaar show:
solaar version 1.1.13

Receiver
  Device path  : /dev/hidraw3
  USB id       : 046d:C54D
  Serial       : D8EBA91B
  C Pending    : ff
    Firmware   : 07.00.B0008
    Bootloader : 00.08
    Other      : B4.A1
  Has 1 paired device(s) out of a maximum of 2.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=216

  1: PRO X 2
     Device path  : None
     WPID         : 40A9
     Codename     : PRO X 2
     Kind         : mouse
     Protocol     : HID++ 4.2
     Report Rate : 1ms
     Serial number: 44C5D16D
     Model ID:      40A9C09B0000
     Unit ID:       44C5D16D
                 1: BL1 71.00.B0012
                 0: MPM 32.00.B0012
     Supports 32 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V4     
            Firmware: Bootloader BL1 71.00.B0012 AB1CDBC0A7D9
            Firmware: Firmware MPM 32.00.B0012 40A9DBC0A7D9
            Unit ID: 44C5D16D  Model ID: 40A9C09B0000  Transport IDs: {'wpid': '40A9', 'usbid': 'C09B'}
         3: DEVICE NAME            {0005} V2     
            Name: PRO X 2
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
            Configuration: 11000000000000000000000000000000
         6: UNIFIED BATTERY        {1004} V3     
            Battery: 54%, discharging.
         7: XY STATS               {2250} V1     
         8: WHEEL STATS            {2251} V0     
         9: EXTENDED ADJUSTABLE DPI {2202} V0     
            Empfindlichkeit (DPI) (saved): {X:1400, Y:1400, LOD:HIGH}
            Empfindlichkeit (DPI)        : {X:1400, Y:1400, LOD:HIGH}
        10: MODE STATUS            {8090} V2     
        11: EXTENDED ADJUSTABLE REPORT RATE {8061} V0     
            Report Rate: 1ms
            Report Rate (saved): 1ms
            Report Rate        : 1ms
        12: ONBOARD PROFILES       {8100} V0     
            Device Mode: Host
            Onboard-Profile (saved): Disabled
            Onboard-Profile        : Disabled
        13: MOUSE BUTTON SPY       {8110} V0     
        14: FORCE PAIRING          {1500} V0     
        15: unknown:1801           {1801} V0    internal, hidden, unknown:000010 
        16: DEVICE RESET           {1802} V0    internal, hidden, unknown:000010 
        17: unknown:1803           {1803} V0    internal, hidden, unknown:000010 
        18: CONFIG DEVICE PROPS    {1806} V8    internal, hidden, unknown:000010 
        19: unknown:1817           {1817} V0    internal, hidden, unknown:000010 
        20: OOBSTATE               {1805} V0    internal, hidden 
        21: unknown:1830           {1830} V0    internal, hidden, unknown:000010 
        22: unknown:1875           {1875} V0    internal, hidden, unknown:000010 
        23: unknown:1861           {1861} V1    internal, hidden, unknown:000010 
        24: unknown:1890           {1890} V9    internal, hidden, unknown:000008 
        25: unknown:18A1           {18A1} V0    internal, hidden, unknown:000010 
        26: unknown:1E00           {1E00} V0    hidden 
        27: unknown:1E02           {1E02} V0    internal, hidden 
        28: unknown:1E22           {1E22} V1    internal, hidden, unknown:000010 
        29: unknown:1602           {1602} V0     
        30: unknown:1EB0           {1EB0} V0    internal, hidden, unknown:000010 
        31: unknown:18B1           {18B1} V0    internal, hidden, unknown:000010 
     Battery: 54%, discharging.
  • Contents of ~/.config/solaar/config.yaml (or ~/.config/solaar/config.json if ~/.config/solaar/config.yaml not present):
- 1.1.13
- _NAME: PRO X 2
  _absent: [hi-res-scroll, lowres-scroll-mode, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, scroll-ratchet, smart-shift, thumb-scroll-invert,
    thumb-scroll-mode, report_rate, pointer_speed, dpi, speed-change, backlight, backlight_level, backlight_duration_hands_out, backlight_duration_hands_in,
    backlight_duration_powered, backlight-timed, led_control, led_zone_, rgb_control, rgb_zone_, brightness_control, per-key-lighting, fn-swap, reprogrammable-keys,
    persistent-remappable-keys, divert-keys, disable-keyboard-keys, crown-smooth, divert-crown, divert-gkeys, m-key-leds, mr-key-led, multiplatform, change-host,
    gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer, adc_power_management]
  _battery: 4100
  _modelId: 40A9C09B0000
  _sensitive: {dpi_extended: true}
  _serial: 44C5D16D
  _unitId: 44C5D16D
  _wpid: 40A9
  dpi_extended: {0: 1400, 1: 1400, 2: 100}
  onboard_profiles: 0
  report_rate_extended: 3

  • Errors or warrnings from Solaar:
2025-01-24 21:48:04,924,924     INFO [MainThread] solaar.gtk: version 1.1.13, language de_DE (UTF-8)
2025-01-24 21:48:04,930,930     INFO [MainThread] solaar.dbus: connected to system dbus, watching for suspend/resume events
2025-01-24 21:48:04,957,957     INFO [MainThread] solaar.ui.notify: starting desktop notifications
2025-01-24 21:48:05,013,013     INFO [MainThread] solaar.listener: starting receiver listening threads
2025-01-24 21:48:05,187,187     INFO [MainThread] hidapi.udev: Found device /dev/hidraw3 BID 0003 VID 0000046D PID 0000C54D HID++ True True USB 2 None
2025-01-24 21:48:05,188,188     INFO [MainThread] solaar.listener: receiver event add DeviceInfo(path='/dev/hidraw3', bus_id=3, vendor_id='046D', product_id='C54D', interface=2, driver='hid-generic', manufacturer=None, product=None, serial='357937753433', release=None, isDevice=False, hidpp_short=True, hidpp_long=True)
2025-01-24 21:48:05,188,188     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw3
2025-01-24 21:48:05,242,242  WARNING [MainThread] logitech_receiver.receiver: Unknown receiver type: C54D
2025-01-24 21:48:05,242,242     INFO [MainThread] logitech_receiver.base: New lock 13
2025-01-24 21:48:05,244,244     INFO [SolaarListener:hidraw3] logitech_receiver.listener: started with <Receiver(/dev/hidraw3,T13)> (13)
2025-01-24 21:48:05,244,244     INFO [SolaarListener:hidraw3] solaar.listener: <Receiver(/dev/hidraw3,T13)>: notifications listener has started (13)
2025-01-24 21:48:05,244,244     INFO [SolaarListener:hidraw3] logitech_receiver.base: New lock <_ThreadedHandle(/dev/hidraw3)>
2025-01-24 21:48:05,246,246     INFO [SolaarListener:hidraw3] logitech_receiver.receiver: <Receiver(/dev/hidraw3,T13)>: receiver notifications enabled => ('wireless', 'software present')
2025-01-24 21:48:05,251,251     INFO [SolaarListener:hidraw3] solaar.listener: status_changed <Receiver(/dev/hidraw3,T13)>: present (0) 
2025-01-24 21:48:06,316,316     INFO [SolaarListener:hidraw3] logitech_receiver.receiver: <Receiver(/dev/hidraw3,T13)>: found new device 1 (40A9)
2025-01-24 21:48:06,316,316     INFO [SolaarListener:hidraw3] solaar.listener: connection Notification(10,1,41,11,32A940) for device wpid 40A9 kind mouse serial 44C5D16D
2025-01-24 21:48:06,316,316     INFO [SolaarListener:hidraw3] solaar.listener: status_changed <Receiver(/dev/hidraw3,T13)>: present (0) 
2025-01-24 21:48:06,519,519     INFO [SolaarListener:hidraw3] logitech_receiver.device: <Device(1,40A9,PRO X 2,44C5D16D)> pushing device settings [<Setting([Feature:choice] PRO X 2:onboard_profiles=None)>, <Setting([Feature:choice] PRO X 2:report_rate_extended=None)>, <Setting([Feature:map choice] PRO X 2:dpi_extended=None)>]
2025-01-24 21:48:06,590,590     INFO [SolaarListener:hidraw3] solaar.listener: status_changed <Device(1,40A9,PRO X 2,44C5D16D)>: paired online (0) 
2025-01-24 21:48:06,599,599     INFO [SolaarListener:hidraw3] solaar.listener: status_changed <Device(1,40A9,PRO X 2,44C5D16D)>: paired online (0) 
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/solaar/ui/config_panel.py", line 285, in map_value_notify_key
    self.map_populate_value_box(key_choice)
  File "/usr/lib/python3.12/site-packages/solaar/ui/config_panel.py", line 276, in map_populate_value_box
    self.valueBox.remove_all()
    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ChoiceControlBig' object has no attribute 'remove_all'
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/solaar/ui/config_panel.py", line 61, in _do_write
    v = setting.write_key_value(key, v)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/logitech_receiver/settings_templates.py", line 1020, in write_key_value
    result = self.write(self._value, save)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/logitech_receiver/settings.py", line 181, in write
    data_bytes = self._validator.prepare_write(value, current_value)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/logitech_receiver/settings_templates.py", line 1070, in prepare_write
    raise ValueError(f"invalid value {new_value!r}")
ValueError: invalid value {0: 1400, 1: 1400, 2: 100}

Describe the bug
Hey guys, so tried to use Solaar with my brand new Logitech G Pro X Superlight 2. When playing around with the DPI settings, I accidentally set "LOD" to 100. As you can see from the log it says that the value {0: 1400, 1: 1400, 2: 100} is invalid (obviously, duh). So i tried to change it back to 2, but i can't as the triangle says it's incomplete (see first screenshot). Since this whole value is invalid now, I cannot change any other DPI setting either (see second screenshot). A workaround is to delete the current config.yaml and restart.

Also, when changing the dropdown to "LOD", the console says AttributeError: 'ChoiceControlBig' object has no attribute 'remove_all', I don't know if this is related or not.

To Reproduce

  1. Go to 'Receiver' -> 'Pro X 2'
  2. Unlock the DPI settings
  3. Click on the dropdown that shows 'X' and change to 'LOD'
  4. Set it to anything invalid
  5. A triangle appears that says "Read/Write operation failed"
  6. If you try to set it back to '2' a little triangle appears that says "Incomplete"

Screenshots
Image
Image

@bliepp bliepp added the bug label Jan 24, 2025
@bliepp bliepp changed the title G Pro X Superlight 2 invalid LOD setting break all DPI settings G Pro X Superlight 2 invalid LOD setting breaks all DPI settings Jan 24, 2025
@pfps
Copy link
Collaborator

pfps commented Jan 24, 2025

The solution is to quit out of Solaar and remove the entry in ~/.config/solaar/config.yaml for the setting.

Did you change the setting using the Solaar GUI? If so, what did you do to get an invalid entry there?

@bliepp
Copy link
Author

bliepp commented Jan 25, 2025

Sorry, if my issue isn't as clear as I thought. It was late and I was tired, so the phrasing might not be the best.

The solution is to quit out of Solaar and remove the entry in ~/.config/solaar/config.yaml for the setting.

Yeah, removing config.yaml unbricked it, as I already wrote.

Did you change the setting using the Solaar GUI? If so, what did you do to get an invalid entry there?

By changing LOD to anything. Solaar will not let me set a valid value (e.g. the default value of 2) as it is claimed to be incomplete (anything below 100 is considered incomplete by Solaar in my case). If set to 100 and above, the value composed of X DPI, Y DPI and LOD becomes invalid as a whole (the r/w-error / the `ValueError' in the console out).

So basically the DPI settings as a whole become bricked when the LOD is changed to anything, as any input of the LOD is either invalid or incomplete.

As I said, I also see a AttributeError: 'ChoiceControlBig' object has no attribute 'remove_all' in the console when changing the dropdown from X/Y to LOD, but I'm not sure if this is related.

@pfps
Copy link
Collaborator

pfps commented Jan 25, 2025

So you were able to use the Solaar GUI to change the value to an invalid one? That looks like the bug that needs to be fixed.

@bliepp
Copy link
Author

bliepp commented Jan 25, 2025

Exactly. Additionally, I was unable to set a valid one. Sorry if my issue was a bit confusing.

@pfps pfps linked a pull request Feb 8, 2025 that will close this issue
@pfps
Copy link
Collaborator

pfps commented Feb 8, 2025

PR #2806 might help with your problem. Please download the PR, quit out of Solaar, run Solaar, and try to change the LOD value for the DPI. See if you can change the LOD to an invalid number. Check ~/.config/solaar/config.yaml to see if the value you changed to is there. Quit out of Solaar and run it again. If there are problems, run Solaar as solaar -ddd and post the point from startup to when you try to change the LOD.

To clone and use Solar from its GitHub repository

git clone https://github.com/pwr-Solaar/Solaar.git
cd Solaar

Run Solaar as bin/solaar from this directory.

To run PR #2806, first clone Solaar if you have not already done so and cd to the clone directory. The first time you download the pull request, fetch it into a new branch and checkout that branch, as in:

git fetch origin pull/2806/head:pull_2806
git checkout pull_2806

To download a new version of the pull request, fetch it and then set your pull branch to the new fetch, as in:

git checkout pull_2806
git fetch origin pull/2806/head
git reset --hard FETCH_HEAD

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

Successfully merging a pull request may close this issue.

2 participants