pwr-Solaar / Solaar

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

LIFT Vertical Ergonomic mouse - Erratic DPI change #1680

Closed GTRONICK closed 2 years ago

GTRONICK commented 2 years ago

Hi, first of all thanks for this awesome work! it is great to have this on my Linux system and be able to use some of the capabilities of my new mouse :)

Changing the DPI with the middle button, sometimes works, sometimes does not. Sometimes Solaar shows the notification on change, but sometimes it doesn't. I have started solaar with solaar -dd -w show, but I do not see any errors when I press the DPI button, I can notice however when the DPI changes and the terminal updates, but most of the times it is ignored and thus no updates in the terminal are shown. Below the information I can gather for the moment:

Solaar version 1.1.4

Bolt Receiver
  Device path  : /dev/hidraw4
  USB id       : 046d:C548
  Serial       : 39453943413246424137353331303735
  Has 1 paired device(s) out of a maximum of 6.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 2=25

  2: LIFT VERTICAL ERGONOMIC MOUSE
     Device path  : None
     WPID         : B031
     Codename     : LIFT
     Kind         : mouse
     Protocol     : HID++ 4.5
     Serial number: E86E35D0
     Model ID:      B03100000000
     Unit ID:       E86E35D0
        Bootloader: BL1 56.00.B0008
          Firmware: RBM 21.00.B0008
             Other: 
     The power switch is located on the (unknown).
     Supports 31 HID++ 2.0 features:
         0: ROOT                   {0000}   
         1: FEATURE SET            {0001}   
         2: DEVICE FW VERSION      {0003}   
            Firmware: Bootloader BL1 56.00.B0008 B0317599BD37
            Firmware: Firmware RBM 21.00.B0008 B0317599BD37
            Firmware: Other   
            Unit ID: E86E35D0  Model ID: B03100000000  Transport IDs: {'btleid': 'B031'}
         3: DEVICE NAME            {0005}   
            Name: LIFT VERTICAL ERGONOMIC MOUSE
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B}   
         5: RESET                  {0020}   
         6: CRYPTO ID              {0021}   
         7: DEVICE FRIENDLY NAME   {0007}   
            Friendly Name: LIFT
         8: UNIFIED BATTERY        {1004}   
         9: REPROG CONTROLS V4     {1B04}   
            DPI Sliding Adjustment (saved): DPI Switch
            DPI Sliding Adjustment        : Off
            Mouse Gestures (saved): Off
            Mouse Gestures        : Off
            Key/Button Actions (saved): {Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, DPI Switch:DPI Switch}
            Key/Button Actions        : {Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, DPI Switch:DPI Switch}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, DPI Switch:Diverted}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, DPI Switch:Diverted}
        10: CHANGE HOST            {1814}   
            Change Host        : 1:gtronick
        11: HOSTS INFO             {1815}   
            Host 0 (paired): gtronick
            Host 1 (paired): LAP0707
            Host 2 (unpaired): 
        12: XY STATS               {2250}   
        13: LOWRES WHEEL           {2130}   
            Wheel Reports: HID
            Scroll Wheel Diversion (saved): False
            Scroll Wheel Diversion        : False
        14: ADJUSTABLE DPI         {2201}   
            Sensitivity (DPI) (saved): 2400
            Sensitivity (DPI)        : 2400
        15: DFUCONTROL             {00C3}   
        16: DEVICE RESET           {1802}   internal, hidden, unknown:000010
        17: unknown:1803           {1803}   internal, hidden, unknown:000010
        18: CONFIG DEVICE PROPS    {1806}   internal, hidden, unknown:000010
        19: unknown:1816           {1816}   internal, hidden, unknown:000010
        20: OOBSTATE               {1805}   internal, hidden
        21: unknown:1830           {1830}   internal, hidden, unknown:000010
        22: unknown:1891           {1891}   internal, hidden, unknown:000008
        23: unknown:18A1           {18A1}   internal, hidden, unknown:000010
        24: unknown:1E00           {1E00}   hidden
        25: unknown:1E02           {1E02}   internal, hidden
        26: unknown:1E22           {1E22}   internal, hidden, unknown:000010
        27: unknown:1602           {1602}   
        28: unknown:1EB0           {1EB0}   internal, hidden, unknown:000010
        29: unknown:1861           {1861}   internal, hidden, unknown:000010
        30: unknown:18B1           {18B1}   internal, hidden, unknown:000010
     Has 7 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click                
             mse, analytics key events, pos:0, group:1, group mask:empty
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click               
             mse, analytics key events, pos:0, group:1, group mask:empty
             reporting: default
         2: Middle Button             , default: Mouse Middle Button         => Mouse Middle Button       
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             reporting: default
         3: Back Button               , default: Mouse Back Button           => Mouse Back Button         
             mse, reprogrammable, divertable, raw XY, analytics key events, unknown:000800, pos:0, group:2, group mask:g1,g2
             reporting: default
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, raw XY, analytics key events, unknown:000800, pos:0, group:2, group mask:g1,g2
             reporting: default
         5: DPI Switch                , default: DPI Switch                  => DPI Switch                
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             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:4, group mask:empty
             reporting: default
     Battery: 100%, discharging.
OS: Arch Linux
KDE 5.96.0 / Plasma 5.25.3
Kernel: x86_64 Linux 5.18.14-arch1-1
pfps commented 2 years ago

I'm assuming that you change the DPI with the DPI Switch button not the middle button itself.

If you run as solaar -ddd you will see a lot of debugging output, including all the messages sent to and from the mouse. If DPI Sliding is working you should see something like the following each time you press the DPI Sliding button:

12:16:44,781    DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) => r[11 01 0900 00C40000000000000000000000000000]
12:16:44,782    DEBUG [ReceiverListener:hidraw0] logitech_receiver.notifications: <Device(1,4082,MX Master 3 Wireless Mouse,198E3EB8)>: notification for feature REPROG CONTROLS V4, report 0, data 00C40000000000000000000000000000
12:16:44,782    DEBUG [ReceiverListener:hidraw0] logitech_receiver.notifications: <Device(1,4082,MX Master 3 Wireless Mouse,198E3EB8)>: diverted controls pressed: 0xc4, 0x0, 0x0, 0x0
12:16:44,921    DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) => r[11 01 0900 00000000000000000000000000000000]
12:16:44,922    DEBUG [ReceiverListener:hidraw0] logitech_receiver.settings: dpi: settings read NamedInt(2450, '2450') from <Device(1,4082,MX Master 3 Wireless Mouse,198E3EB8)>
12:16:44,922    DEBUG [ReceiverListener:hidraw0] logitech_receiver.settings: dpi: setting write NamedInt(1650, '1650') to <Device(1,4082,MX Master 3 Wireless Mouse,198E3EB8)>
12:16:44,923    DEBUG [ReceiverListener:hidraw0] logitech_receiver.settings: dpi: settings prepare write(1650) => b'\x00\x06r'
12:16:44,923    DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (17) <= w[11 01 0C3D 00067200000000000000000000000000]
12:16:44,945    DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (17) => r[11 01 0C3D 00067200000000000000000000000000]

The first line is the notification from the mouse that the DPI Sliding button has been pressed. It might look a bit different but the third group of numbers has to read 0900 (for your mouse). If you don't see this then the mouse did not send a message that can be used to start DPI Sliding. The next two lines are Solaar responding to the message. The second-last line is the command Solaar sends to the mouse to change the DPI and the last line is the response from the mouse.

Please post the lines that you see.

GTRONICK commented 2 years ago

Thanks for the quick response! I can see the events, but it always seems to send the same DPI value:

12:08:27,273    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0900 00FD0000000000000000000000000000]
12:08:27,273    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: notification for feature REPROG CONTROLS V4, report 0, data 00FD0000000000000000000000000000
12:08:27,273    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: diverted controls pressed: 0xfd, 0x0, 0x0, 0x0
12:08:27,281    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0910 FE9000A4000000000000000000000000]
12:08:27,281    DEBUG [ReceiverListener:hidraw3] logitech_receiver.settings: dpi: settings read 2400 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,281    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: notification for feature REPROG CONTROLS V4, report 0, data FE9000A4000000000000000000000000
12:08:27,281    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: rawXY dx=-368 dy=164
12:08:27,371    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0900 00000000000000000000000000000000]
12:08:27,371    DEBUG [ReceiverListener:hidraw3] logitech_receiver.settings: dpi: setting write NamedInt(2400, '2400') to <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,371    DEBUG [ReceiverListener:hidraw3] logitech_receiver.settings: dpi: settings prepare write(2400) => b'\x00\t`'
12:08:27,371    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) <= w[11 02 0E3B 00096000000000000000000000000000]
12:08:27,386    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0E3B 00096000000000000000000000000000]
12:08:27,386    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: notification for feature REPROG CONTROLS V4, report 0, data 00000000000000000000000000000000
12:08:27,386    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: diverted controls pressed: 0x0, 0x0, 0x0, 0x0
12:08:27,386    DEBUG [MainThread] solaar.ui: status changed: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)> (NONE) None
12:08:27,386    DEBUG [MainThread] solaar.ui.icons: battery icon for 100:False = battery-full
12:08:27,386    DEBUG [MainThread] solaar.ui.tray: picked device with lowest battery: ('/dev/hidraw7', 255, 'Bluetooth Multi-Device Keyboard K380', {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None, 'NOTIFICATION FLAGS': False})
12:08:27,386    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
12:08:27,387    DEBUG [MainThread] solaar.ui.icons: battery icon for 100:False = battery-full
12:08:27,387    DEBUG [MainThread] solaar.ui.icons: battery icon for 100:False = battery-full
12:08:27,387    DEBUG [AsyncUI] logitech_receiver.settings: lowres-scroll-mode: settings read False from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,387    DEBUG [AsyncUI] logitech_receiver.settings: dpi: settings read 2400 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,387    DEBUG [AsyncUI] logitech_receiver.settings: dpi-sliding: settings read 253 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,387    DEBUG [AsyncUI] logitech_receiver.settings: mouse-gestures: settings read 0 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,387    DEBUG [AsyncUI] logitech_receiver.settings: reprogrammable-keys: settings read {82: 82, 83: 83, 86: 86, 253: 253} from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,387    DEBUG [AsyncUI] logitech_receiver.settings: divert-keys: settings read {82: 0, 83: 0, 86: 0, 253: 1} from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:27,387    DEBUG [AsyncUI] logitech_receiver.settings: change-host: settings read NamedInt(0, '1:gtronick') from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>

12:08:32,816    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0900 00FD0000000000000000000000000000]
12:08:32,816    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: notification for feature REPROG CONTROLS V4, report 0, data 00FD0000000000000000000000000000
12:08:32,816    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: diverted controls pressed: 0xfd, 0x0, 0x0, 0x0
12:08:32,823    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0910 FEA0FFC2000000000000000000000000]
12:08:32,823    DEBUG [ReceiverListener:hidraw3] logitech_receiver.settings: dpi: settings read 2400 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,823    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: notification for feature REPROG CONTROLS V4, report 0, data FEA0FFC2000000000000000000000000
12:08:32,824    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: rawXY dx=-352 dy=-62
12:08:32,921    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0900 00000000000000000000000000000000]
12:08:32,921    DEBUG [ReceiverListener:hidraw3] logitech_receiver.settings: dpi: setting write NamedInt(2400, '2400') to <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,921    DEBUG [ReceiverListener:hidraw3] logitech_receiver.settings: dpi: settings prepare write(2400) => b'\x00\t`'
12:08:32,921    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) <= w[11 02 0E39 00096000000000000000000000000000]
12:08:32,936    DEBUG [ReceiverListener:hidraw3] logitech_receiver.base: (13) => r[11 02 0E39 00096000000000000000000000000000]
12:08:32,936    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: notification for feature REPROG CONTROLS V4, report 0, data 00000000000000000000000000000000
12:08:32,936    DEBUG [ReceiverListener:hidraw3] logitech_receiver.notifications: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>: diverted controls pressed: 0x0, 0x0, 0x0, 0x0
12:08:32,936    DEBUG [MainThread] solaar.ui: status changed: <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)> (NONE) None
12:08:32,937    DEBUG [MainThread] solaar.ui.icons: battery icon for 100:False = battery-full
12:08:32,937    DEBUG [MainThread] solaar.ui.tray: picked device with lowest battery: ('/dev/hidraw7', 255, 'Bluetooth Multi-Device Keyboard K380', {'BATTERY LEVEL': 50, 'BATTERY STATUS': NamedInt(0, 'discharging'), 'BATTERY NEXT LEVEL': 20, 'BATTERY VOLTAGE': None, 'BATTERY CHARGING': False, 'ERROR': None, 'NOTIFICATION FLAGS': False})
12:08:32,938    DEBUG [MainThread] solaar.ui.icons: battery icon for 50:False = battery-good
12:08:32,938    DEBUG [MainThread] solaar.ui.icons: battery icon for 100:False = battery-full
12:08:32,938    DEBUG [MainThread] solaar.ui.icons: battery icon for 100:False = battery-full
12:08:32,938    DEBUG [AsyncUI] logitech_receiver.settings: lowres-scroll-mode: settings read False from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,938    DEBUG [AsyncUI] logitech_receiver.settings: dpi: settings read 2400 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,939    DEBUG [AsyncUI] logitech_receiver.settings: dpi-sliding: settings read 253 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,939    DEBUG [AsyncUI] logitech_receiver.settings: mouse-gestures: settings read 0 from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,939    DEBUG [AsyncUI] logitech_receiver.settings: reprogrammable-keys: settings read {82: 82, 83: 83, 86: 86, 253: 253} from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,939    DEBUG [AsyncUI] logitech_receiver.settings: divert-keys: settings read {82: 0, 83: 0, 86: 0, 253: 1} from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>
12:08:32,939    DEBUG [AsyncUI] logitech_receiver.settings: change-host: settings read NamedInt(0, '1:gtronick') from <Device(2,B031,LIFT VERTICAL ERGONOMIC MOUSE,E86E35D0)>

If I start Solaar in normal mode, from the applications menu, I can switch between two DPIs with a single click in the DPI button, but It only works sometimes. If I start Solaar from the terminal with -ddd, that function seems not to work at all, and just always sends the same DPI value.

Using the sliding feature to change the DPI works pretty well when started from the terminal, showing the notification an all, but if I start it from the applications menu, the sliding feature still seems to work, but the notification does not appear, maybe I'm using the application in the wrong way?

For the moment, I have edited the application entry modifying the command as: solaar -ddd --window=hide, the notification when sliding showed up the first time, but then It stopped showing up.

Thanks in advance!

pfps commented 2 years ago

Solaar normally has both a window and an icon in the system tray (assuming that you have a working system tray). You can use the system tray icon to open the Solaar window and Solaar will continue to run even when its window is closed.

As Solaar depends on the system tray and the notification server it is sensitive to problems in both of them. Some system trays interact badly with Solaar.

Note that Solaar tries to reuse notifications so that if you change the DPI several times in quick succession only one notification will appear.

What I see from your two log examples is that they both are changing the DPI to 2400. It also looks as if your mouse reports an initial large movement, which does not correspond to any actual movement of the mouse and may be causing problems. Try actually moving the mouse to change the DPI and see whether you experience problems there. You could also try looking at issue #1662 and running the PR mentioned there.

Solaar should not be sensitive to from where it is being invoked, except that there may be multiple versions of Solaar installed on your machine and different invocation methods may end up running different versions. You do need to run Solaar with your UID, and maybe from your login session, as the system tray and notifications may be sensitive to UID or login session.

GTRONICK commented 2 years ago

Thank you so much for the help!. I'll check it out. Testing again with your recommendations I can see that the DPI change using the sliding method works nice, so I'll close the issue as this is enough for me to make the system usable. I also want to report that the horizontal scrolling works perfectly using the default configuration (back or forward button + wheel). Thanks a lot and keep the good work!