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

Split into system and user processes #2573

Open
gudvinr opened this issue Aug 6, 2024 · 1 comment
Open

Split into system and user processes #2573

gudvinr opened this issue Aug 6, 2024 · 1 comment

Comments

@gudvinr
Copy link

gudvinr commented Aug 6, 2024

Information

  • Solaar version: 1.1.13
  • Distribution: Arch Linux
  • Kernel version: Linux 6.10.3-arch1-1 x86_64 GNU/Linux
  • Output of solaar show for the target device:
solaar version 1.1.13

Unifying Receiver
  Device path  : /dev/hidraw5
  USB id       : 046d:C52B
  Serial       : F014961D
  C Pending    : ff
    Firmware   : 12.11.B0032
    Bootloader : 04.16
    Other      : AA.AA
  Has 1 paired device(s) out of a maximum of 6.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=1

  1: MX Master 3 Wireless Mouse
     Device path  : /dev/hidraw6
     WPID         : 4082
     Codename     : MX Master 3
     Kind         : mouse
     Protocol     : HID++ 4.5
     Report Rate : 8ms
     Serial number: 2831232F
     Model ID:      B02340820000
     Unit ID:       2831232F
                 1: BOT 95.00.B0013
                 0: MPM 19.00.B0013
                 3: 
     The power switch is located on the base.
     Supports 34 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BOT 95.00.B0013 0000D8279515
            Firmware: Firmware MPM 19.00.B0013 4082D8279515
            Firmware: Other   
            Unit ID: 2831232F  Model ID: B02340820000  Transport IDs: {'btleid': 'B023', 'wpid': '4082'}
         3: DEVICE NAME            {0005} V0     
            Name: Wireless Mouse MX Master 3
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
            Configuration: 11000000000000000000000000000000
         6: CRYPTO ID              {0021} V1     
         7: BATTERY STATUS         {1000} V1     
            Battery: 100%, discharging, next level 50%.
         8: REPROG CONTROLS V4     {1B04} V4     
            Key/Button Actions (saved): {Left Button:Left Click, Right Button:Right Click, Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, Mouse Gesture Button:Gesture Button Navigation, Smart Shift:Smart Shift}
            Key/Button Actions        : {Left Button:Left Click, Right Button:Right Click, Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, Mouse Gesture Button:Gesture Button Navigation, Smart Shift:Smart Shift}
            Key/Button Diversion (saved): {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Mouse Gesture Button:Diverted, Smart Shift:Regular}
            Key/Button Diversion        : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Mouse Gesture Button:Diverted, Smart Shift:Regular}
         9: CHANGE HOST            {1814} V1     
            Change Host        : 1:hades-desktop
        10: XY STATS               {2250} V1     
        11: ADJUSTABLE DPI         {2201} V1     
            Sensitivity (DPI) (saved): 3200
            Sensitivity (DPI)        : 3200
        12: SMART SHIFT            {2110} V0     
            Scroll Wheel Ratcheted (saved): Ratcheted
            Scroll Wheel Ratcheted        : Ratcheted
            Scroll Wheel Ratchet Speed (saved): 12
            Scroll Wheel Ratchet Speed        : 12
        13: HIRES WHEEL            {2121} V1     
            Multiplier: 15
            Has invert: Normal wheel motion
            Has ratchet switch: Normal wheel mode
            High resolution mode
            HID notification
            Scroll Wheel Direction (saved): False
            Scroll Wheel Direction        : False
            Scroll Wheel Resolution (saved): True
            Scroll Wheel Resolution        : True
            Scroll Wheel Diversion (saved): False
            Scroll Wheel Diversion        : False
        14: THUMB WHEEL            {2150} V0     
            Thumb Wheel Direction (saved): False
            Thumb Wheel Direction        : False
            Thumb Wheel Diversion (saved): False
            Thumb Wheel Diversion        : False
        15: WHEEL STATS            {2251} V0     
        16: DFUCONTROL SIGNED      {00C2} V0     
        17: DEVICE RESET           {1802} V0    internal, hidden 
        18: unknown:1803           {1803} V0    internal, hidden 
        19: CONFIG DEVICE PROPS    {1806} V5    internal, hidden 
        20: unknown:1813           {1813} V0    internal, hidden 
        21: OOBSTATE               {1805} V0    internal, hidden 
        22: unknown:1830           {1830} V0    internal, hidden 
        23: unknown:1890           {1890} V5    internal, hidden 
        24: unknown:1891           {1891} V5    internal, hidden 
        25: unknown:18A1           {18A1} V0    internal, hidden 
        26: unknown:1DF3           {1DF3} V0    internal, hidden 
        27: unknown:1E00           {1E00} V0    hidden 
        28: unknown:1EB0           {1EB0} V0    internal, hidden 
        29: unknown:1861           {1861} V0    internal, hidden 
        30: unknown:9001           {9001} V0    internal, hidden 
        31: unknown:9203           {9203} V0    internal, hidden 
        32: unknown:9205           {9205} V0    internal, hidden 
        33: unknown:9300           {9300} V0    internal, hidden 
     Has 8 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click                
             mse, analytics key events, pos:0, group:1, group mask:g1
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click               
             mse, 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, 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, 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, pos:0, group:2, group mask:g1,g2
             reporting: default
         5: Mouse Gesture Button      , default: Gesture Button Navigation   => Gesture Button Navigation 
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             reporting: diverted
         6: Smart Shift               , default: Smart Shift                 => Smart Shift               
             mse, reprogrammable, divertable, raw XY, analytics key events, pos:0, group:3, group mask:g1,g2,g3
             reporting: default
         7: 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, next level 50%.

Is your feature request related to a problem? Please describe.

Since solaar process runs as user process, its settings not being applied in contexts when there is no user being logged in.
Obvious one is login manager (like SDDM/GDM/lightdm/etc).

In this case, if you set up DPI that is not a default, it'll get reset and mouse will behave very different from what you'd expect.
Same with other settings.

Describe the solution you'd like

Instead of running solely as user process, split solaar into 2 processes. In that case, one can be ran as system daemon and another one can connect to it via through dbus/unix socket/whatever. Then you can apply settings ASAP.

There could be issues when multiple users connect to same daemon but I believe there would be issues when you run multiple instances of solaar on the same system at the same time as well.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@pfps
Copy link
Collaborator

pfps commented Aug 6, 2024

This is a long-term goal for Solaar. One problem is that Solaar is written in Python, which may not be suitable for use in system projects. Another problem is what to do for shared stations - if the last user's preferences are very unusual, it may be difficult for the next user to login.

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

No branches or pull requests

2 participants