pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.54k stars 409 forks source link

settings not showing up for device #1543

Closed PhlegmaTREEc closed 2 years ago

PhlegmaTREEc commented 2 years ago
Solaar version 1.1.2

Unifying Receiver
  Device path  : /dev/hidraw6
  USB id       : 046d:C52B
  Serial       : 2AD193EA
    Firmware   : 24.11.B0036
    Bootloader : 02.09
    Other      : AA.AC
  Has 1 paired device(s) out of a maximum of 6.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=76

  1: MX Vertical Wireless Mouse
     Device path  : /dev/hidraw8
     WPID         : 407B
     Codename     : MX Vertical
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: C099B318
     Model ID:      B020407BC08A
     Unit ID:       854A0711
        Bootloader: BOT 78.00.B0009
          Firmware: MPM 16.00.B0009
             Other:
     Supports 34 HID++ 2.0 features:
         0: ROOT                   {0000}
         1: FEATURE SET            {0001}
         2: DEVICE FW VERSION      {0003}
            Firmware: Bootloader BOT 78.00.B0009 AAE28E5B17FF
            Firmware: Firmware MPM 16.00.B0009 407B8E5B17FF
            Firmware: Other
            Unit ID: 854A0711  Model ID: B020407BC08A  Transport IDs: {'btleid': 'B020', 'wpid': '407B', 'usbid': 'C08A'}
         3: DEVICE NAME            {0005}
            Name: MX Vertical Advanced Ergonomic Mouse
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B}
         5: RESET                  {0020}
         6: CRYPTO ID              {0021}
         7: DEVICE FRIENDLY NAME   {0007}
            Friendly Name: MX Vertical
         8: BATTERY STATUS         {1000}
            Battery: 90%, discharging, next level 50%.
         9: unknown:1002           {1002}
        10: REPROG CONTROLS V4     {1B04}
        11: PERSISTENT REMAPPABLE ACTION {1C00}
        12: CHANGE HOST            {1814}
        13: HOSTS INFO             {1815}
            Host 0 (unpaired): endeavour-os-kde
            Host 1 (unpaired): DESKTOP-M1K8QL7
            Host 2 (unpaired):
        14: XY STATS               {2250}
        15: unknown:18B1           {18B1}   internal, hidden
        16: VERTICAL SCROLLING     {2100}
            Roller type: standard
            Ratchet per turn: 24
            Scroll lines: 0
        17: LOWRES WHEEL           {2130}
            Wheel Reports: HID
            Scroll Wheel Diversion (saved): False
            Scroll Wheel Diversion        : False
        18: ADJUSTABLE DPI         {2201}
        19: DEVICE RESET           {1802}   internal, hidden
        20: unknown:1803           {1803}   internal, hidden
        21: CONFIG DEVICE PROPS    {1806}   internal, hidden
        22: unknown:1813           {1813}   internal, hidden
        23: OOBSTATE               {1805}   internal, hidden
        24: unknown:1830           {1830}   internal, hidden
        25: unknown:1890           {1890}   internal, hidden
        26: unknown:1891           {1891}   internal, hidden
        27: unknown:18A1           {18A1}   internal, hidden
        28: unknown:1DF3           {1DF3}   internal, hidden
        29: unknown:1E00           {1E00}   hidden
        30: unknown:1EB0           {1EB0}   internal, hidden
        31: unknown:1E22           {1E22}   internal, hidden
        32: unknown:1861           {1861}   internal, hidden
        33: unknown:18C0           {18C0}   internal, hidden
     Has 7 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click
             mse, reprogrammable, analytics key events, pos:0, group:1, group mask:g1
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click
             mse, reprogrammable, analytics key events, pos:0, group:1, group mask:g1
             reporting: default
         2: Middle Button             , default: Mouse Middle Button         => Mouse Middle Button
             mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button
             mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: default
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button
             mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: default
         5: DPI Switch                , default: DPI Switch                  => DPI Switch
             mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2
             reporting: diverted, raw XY diverted
         6: Virtual Gesture Button    , default: Virtual Gesture Button      => Virtual Gesture Button
             divertable, virtual, raw XY, force raw XY, pos:0, group:3, group mask:empty
             reporting: default
     Has 6 persistent remappable keys:
         0: Left Button                => Mouse Button: Mouse Button Left
         1: Right Button               => Mouse Button: Mouse Button Right
         2: Middle Button              => Mouse Button: Mouse Button Middle
         3: Back Button                => Mouse Button: Mouse Button Back
         4: Forward Button             => Mouse Button: Mouse Button Forward
         5: unknown:0000               => None
     Battery: 90%, discharging, next level 50%.

USB and Bluetooth Devices

  1: G512 RGB Mechanical Gaming Keyboard
     Device path  : /dev/hidraw2
     USB id       : 046d:C33C
     Codename     : G512
     Kind         : keyboard
     Protocol     : HID++ 4.2
     Polling rate : 1 ms (1000Hz)
     Serial number:
     Model ID:      C33C00000000
     Unit ID:       32304709
          Firmware: U1  19.01.B0014
        Bootloader: BOT 65.00.B6060
     Supports 20 HID++ 2.0 features:
         0: ROOT                   {0000}
         1: FEATURE SET            {0001}
         2: DEVICE FW VERSION      {0003}
            Firmware: Firmware U1  19.01.B0014 C33C
            Firmware: Bootloader BOT 65.00.B6060 AADC
            Unit ID: 32304709  Model ID: C33C00000000  Transport IDs: {'usbid': 'C33C'}
         3: KEYBOARD DISABLE BY USAGE {4522}
         4: DEVICE NAME            {0005}
            Name: G513 RGB MECHANICAL GAMING KEYBOARD
            Kind: keyboard
         5: unknown:1E00           {1E00}   hidden
         6: KEYBOARD LAYOUT 2      {4540}
         7: unknown:1EB0           {1EB0}   internal, hidden
         8: REPORT RATE            {8060}
            Polling Rate (ms): 1
            Polling Rate (ms) (saved): 1
            Polling Rate (ms)        : 1
         9: DFUCONTROL SIGNED      {00C2}
        10: unknown:1801           {1801}   internal, hidden
        11: DEVICE RESET           {1802}   internal, hidden
        12: PER KEY LIGHTING       {8080}
        13: COLOR LED EFFECTS      {8070}
        14: unknown:1821           {1821}
        15: REPORT HID USAGE       {1BC0}
        16: CONFIG DEVICE PROPS    {1806}   internal, hidden
        17: NEW FN INVERSION       {40A2}
            Fn-swap: disabled
            Fn-swap default: disabled
            Swap Fx function (saved): False
            Swap Fx function        : False
        18: REPROG CONTROLS V4     {1B04}
            Key/Button Diversion (saved): {Next Color Effect:Regular, Increase Color Effect Speed:Regular, Decrease Color Effect Speed:Regular, Load Lighting Custom Profile:Regular}
            Key/Button Diversion        : {Next Color Effect:Regular, Increase Color Effect Speed:Regular, Decrease Color Effect Speed:Regular, Load Lighting Custom Profile:Regular}
        19: RESET                  {0020}
     Has 4 reprogrammable keys:
         0: Next Color Effect         , default: F8                          => F8
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, pos:1, group:0, group mask:empty
             reporting: default
         1: Decrease Color Effect Speed, default: Laser Button                => Laser Button
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, pos:1, group:0, group mask:empty
             reporting: default
         2: Increase Color Effect Speed, default: F1                          => F1
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, pos:1, group:0, group mask:empty
             reporting: default
         3: Load Lighting Custom Profile, default: Laser Button Long Press     => Laser Button Long Press
             is FN, FN sensitive, reprogrammable, divertable, persistently divertable, pos:1, group:0, group mask:empty
             reporting: default
     Battery status unavailable.

Describe the bug Unless I launch Solaar as root, my MX Vertical has access to limited number of options. Launching normally I can toggle Scroll Wheel Diversion, nothing more. Launching as root gives all options (DPI, button mapping, ...). If I am supposed to launch as root, how do I do that automatically?

pfps commented 2 years ago

To optimize startup Solaar keeps track of settings that it thinks are not suitable for devices. It appears that this mechanism has failed here. To correct this problem, remove entries for "_absent" in ~/.config/solaar/config.json. (You need to remove the "_absent" line and all lines up to and including the next line with a ] in it.)

Launching Solaar as root uses configuration files in /root so bypasses the configuration files for you.

PhlegmaTREEc commented 2 years ago

OK, editing the JSON file seems to have fixed the issue. Even after reboot Solaar works as expected. Thank you. Love this piece of SW

archerallstars commented 2 years ago

As of version 1.1.3, the config.json file is replaced with the config.yaml file as shown in the screenshot below:

image

Deleting the _absent line won't work anymore as it will regenerate itself upon opening Solaar.

I am on Fedora 36.

PhlegmaTREEc commented 2 years ago

I may remember this incorrectly, but I think it did the same thing for me with the .json file. I guess that deleting the lines forced it to re-do the process and hopefully fix it self?

archerallstars commented 2 years ago

I deleted the line several times but it keeps coming back every time. I quicked/killed the Solaar process after deleting the line. Nothing worked.

I still don't get the full settings on my MX Vertical.

PhlegmaTREEc commented 2 years ago

@pfps This solution may not be valid anymore, based on what kreaninw said.

archerallstars commented 2 years ago

Here is my screen recording:

https://user-images.githubusercontent.com/1403194/167810878-bb9d8b11-d7df-4717-8f7d-f45d82a0baf9.mp4

It doesn't work at all.

pfps commented 2 years ago

@kreaninw At the beginning of your recording you show the settings for the MX Vertical. That's all the settings that the device supports, so it appears that Solaar is working correctly. The .absent field contains a record of settings that Solaar tried for a device and found not present on the device. Solaar then doesn't try these settings again. So the reappearance of the field is as expected. There have been a few isolated cases where something has gone wrong and Solaar adds too many entries to this field. Removing it causes Solaar to try all settings. There does not appear to be any problem here so removing the field did not cause any change in the settings.

archerallstars commented 2 years ago

@pfps I didn't know that the MX vertical can't even change the Scroll Wheel Resolution. I can barely do anything with this mouse considering all the possible options on this page.

pfps commented 2 years ago

The MX Vertical has a different Logitech HID++ feature for the scroll wheel from many other Logitech mice. This feature does not allow changing the resolution. Solaar can only make changes based on the features a device supports. To see the list of features you can run solaar show.

LeoniePhiline commented 2 years ago

FWIW On my MX Vertical all settings recently disappeared as well. Removing _absent from config.yaml before restarting solaar brought them back.

There's probably a lot more people affected than those who actually find the bug tracker. Is there a chance to auto-migrate that for these people?

Broken configuration that automatically hid all settings since recently:

_absent: [hi-res-scroll, hires-smooth-invert, hires-smooth-resolution, smart-shift, thumb-scroll-mode, thumb-scroll-invert, onboard_profiles, report_rate,
    pointer_speed, speed-change, backlight, backlight-timed, fn-swap, disable-keyboard-keys, divert-crown, crown-smooth, divert-gkeys, m-key-leds, mr-key-led,
    multiplatform, gesture2-gestures, gesture2-divert, gesture2-params, persistent-remappable-keys, dpi-sliding, mouse-gestures, reprogrammable-keys, divert-keys,
    change-host, hires-scroll-mode]

New configuration after removing _absent and having Solaar rewrite it:

_absent: [hi-res-scroll, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, smart-shift, thumb-scroll-mode, thumb-scroll-invert, onboard_profiles,
    report_rate, pointer_speed, speed-change, backlight, backlight-timed, fn-swap, disable-keyboard-keys, divert-crown, crown-smooth, divert-gkeys, m-key-leds,
    mr-key-led, multiplatform, gesture2-gestures, gesture2-divert, gesture2-params]

With the new configuration, I got my settings back.

@pfps Could it be that more than "There have been a few isolated cases" are affected? Or was I just that unlucky?

pfps commented 2 years ago

There does seem to be a problem with Solaar adding too many settings to _absent. It is unclear how often this happens and what causes it. My guess is that once in a while the device isn't ready and Solaar then thinks that many of the settings are not present.

Solaar 1.1.3 does have some code that tries to alleviate this problem by looking to see whether the setting had been found in the past for the device. If you are not running 1.1.3 I suggest upgrading.

I am reluctant to remove the effect of _absent as it can speed up startup and connect time considerably.