Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S Solaar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pwr-Solaar
  • Solaar
  • Issues
  • #1541
Closed
Open
Issue created Apr 05, 2022 by Administrator@rootContributor

CLI version no longer interacts with udev properly

Created by: S3NTYN3L

Information

  • Solaar version (solaar --version or git describe --tags if cloned from this repository): solaar 1.1.2
  • Distribution: Linux Mint 20.3 Cinnamon
  • Kernel version (ex. uname -srmo): Linux 5.4.0-107-generic x86_64 GNU/Linux
  • Output of solaar show:
Solaar version 1.1.2

Unifying Receiver
  Device path  : /dev/hidraw0
  USB id       : 046d:C52B
  Serial       : A4DE9A0E
    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=155

  1: Wireless Touch Keyboard K400 Plus
     Device path  : /dev/hidraw1
     WPID         : 404D
     Codename     : K400 Plus
     Kind         : keyboard
     Protocol     : HID++ 4.1
     Polling rate : 8 ms (125Hz)
     Serial number: 70CE825C
     Model ID:      404D00000000
     Unit ID:       563AF230
        Bootloader: BOT 22.02.B0002
          Firmware: RQK 63.02.B0016
             Other: 
     The power switch is located on the top edge.
     Supports 24 HID++ 2.0 features:
         0: ROOT                   {0000}   
         1: FEATURE SET            {0001}   
         2: DEVICE FW VERSION      {0003}   
            Firmware: Bootloader BOT 22.02.B0002 404D6217AD40
            Firmware: Firmware RQK 63.02.B0016 404D6217AD40
            Firmware: Other   
            Unit ID: 563AF230  Model ID: 404D00000000  Transport IDs: {'wpid': '404D'}
         3: DEVICE NAME            {0005}   
            Name: Wireless Touch Keyboard K400 Plus
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B}   
         5: RESET                  {0020}   
         6: BATTERY STATUS         {1000}   
            Battery: 50%, discharging, next level 20%.
         7: REPROG CONTROLS V4     {1B04}   
            Key/Button Diversion (saved): {Volume Up:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular, Volume Down:Regular, Mute:Regular, My Home:Regular, Play/Pause:Regular, Media Player:Regular, Next:Regular, Previous:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Application Switcher:Regular, Back:Regular}
            Key/Button Diversion        : {Volume Up:Regular, Show Desktop:Regular, Maximize Window:Regular, Switch Screen:Regular, Fn Left Click:Regular, Second Left Click:Regular, Volume Down:Regular, Mute:Regular, My Home:Regular, Play/Pause:Regular, Media Player:Regular, Next:Regular, Previous:Regular, Search:Regular, Sleep:Regular, Contextual Menu:Regular, Application Switcher:Regular, Back:Regular}
         8: SWAP BUTTON CANCEL     {2005}   
         9: NEW FN INVERSION       {40A2}   
            Fn-swap: enabled
            Fn-swap default: enabled
            Swap Fx function (saved): False
            Swap Fx function        : True
        10: ENCRYPTION             {4100}   
        11: KEYBOARD DISABLE KEYS  {4521}   
            Disable keys (saved): {Caps Lock:False, Win:False, Scroll Lock:False, Insert:False}
            Disable keys        : {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False}
        12: TOUCHPAD RAW XY        {6100}   
        13: GESTURE 2              {6501}   
            Gestures (saved): {'1': True, '10': True, '2': True, '30': True, '34': False, '42': True, '43': True, '45': False, '64': False, '65': False, '67': False, '84': True}
            Gestures        : {'1': True, '2': True, '30': True, '10': True, '45': False, '42': True, '43': True, '64': False, '65': False, '67': False, '84': True, '34': False}
            Gestures Diversion (saved): {'1': False, '10': False, '100': False, '2': False, '44': False, '64': False, '65': False, '67': False, '84': False, '85': False}
            Gestures Diversion        : {'1': False, '2': False, '10': False, '44': False, '64': False, '65': False, '67': False, '84': False, '85': False, '100': False}
            Gesture params (saved): {'4': {'scale': 256}}
            Gesture params        : {'4': {'scale': 256}}
        14: DFUCONTROL UNSIGNED    {00C1}   
        15: unknown:1811           {1811}   internal, hidden
        16: unknown:1830           {1830}   internal, hidden
        17: unknown:1890           {1890}   internal, hidden
        18: unknown:1DF3           {1DF3}   internal, hidden
        19: unknown:1E00           {1E00}   hidden
        20: unknown:1EB0           {1EB0}   internal, hidden
        21: unknown:1861           {1861}   internal, hidden
        22: unknown:18B0           {18B0}   internal, hidden
        23: unknown:1F11           {1F11}   internal, hidden
     Has 20 reprogrammable keys:
         0: Second Left Click         , default: Left Click                  => Left Click                
             mse, divertable, pos:0, group:0, group mask:empty
             reporting: default
         1: Back                      , default: Mouse Back Button           => Mouse Back Button         
             is FN, FN sensitive, reprogrammable, divertable, pos:1, group:0, group mask:empty
             reporting: default
         2: My Home                   , default: HomePage                    => HomePage                  
             is FN, FN sensitive, reprogrammable, divertable, pos:2, group:0, group mask:empty
             reporting: default
         3: Application Switcher      , default: Application Switcher        => Application Switcher      
             is FN, FN sensitive, reprogrammable, divertable, pos:3, group:0, group mask:empty
             reporting: default
         4: Contextual Menu           , default: Right Click                 => Right Click               
             is FN, FN sensitive, reprogrammable, divertable, pos:4, group:0, group mask:empty
             reporting: default
         5: Search                    , default: Search Files                => Search Files              
             is FN, FN sensitive, reprogrammable, divertable, pos:5, group:0, group mask:empty
             reporting: default
         6: Show Desktop              , default: Show Desktop                => Show Desktop              
             is FN, FN sensitive, reprogrammable, divertable, pos:6, group:0, group mask:empty
             reporting: default
         7: Maximize Window           , default: Maximize Window             => Maximize Window           
             is FN, FN sensitive, reprogrammable, divertable, pos:7, group:0, group mask:empty
             reporting: default
         8: Switch Screen             , default: Switch Presentation/Switch Screen => Switch Presentation/Switch Screen
             is FN, FN sensitive, reprogrammable, divertable, pos:8, group:0, group mask:empty
             reporting: default
         9: Media Player              , default: Music                       => Music                     
             is FN, FN sensitive, reprogrammable, divertable, pos:9, group:0, group mask:empty
             reporting: default
        10: Previous                  , default: Previous                    => Previous                  
             is FN, FN sensitive, divertable, pos:10, group:0, group mask:empty
             reporting: default
        11: Play/Pause                , default: Play/Pause                  => Play/Pause                
             is FN, FN sensitive, divertable, pos:11, group:0, group mask:empty
             reporting: default
        12: Next                      , default: Next                        => Next                      
             is FN, FN sensitive, divertable, pos:12, group:0, group mask:empty
             reporting: default
        13: Fn Left Click             , default: ShowUI                      => ShowUI                    
             divertable, pos:0, group:0, group mask:empty
             reporting: default
        14: Left Button               , default: Left Click                  => Left Click                
             mse, pos:0, group:0, group mask:empty
             reporting: default
        15: Right Button              , default: Right Click                 => Right Click               
             mse, pos:0, group:0, group mask:empty
             reporting: default
        16: Mute                      , default: Mute                        => Mute                      
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        17: Volume Up                 , default: Volume Up                   => Volume Up                 
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        18: Volume Down               , default: Volume Down                 => Volume Down               
             nonstandard, divertable, pos:0, group:0, group mask:empty
             reporting: default
        19: Sleep                     , default: Sleep                       => Sleep                     
             reprogrammable, divertable, pos:0, group:0, group mask:empty
             reporting: default
     Has 17 gesture(s), 1 param(s) and 5 spec(s):
        Track1Finger               Enabled(None): None   Diverted:(None) None
        TapGestures                Enabled(None): None   Diverted:(None) None
        Tap1Finger                 Enabled(   0): True   Diverted:(   0) False
        Tap2Finger                 Enabled(   1): True   Diverted:(   1) False
        TapDrag1Finger             Enabled(   2): True   Diverted:(None) None
        DoubleTap1Finger           Enabled(   3): True   Diverted:(   2) False
        Scroll2FingerStateless     Enabled(None): None   Diverted:(   3) False
        NaturalScrolling           Enabled(   4): False  Diverted:(None) None
        Scroll2FingerHoriz         Enabled(   5): True   Diverted:(None) None
        Scroll2FingerVert          Enabled(   6): True   Diverted:(None) None
        LeftEdgeSwipe1Finger2      Enabled(   7): False  Diverted:(   4) False
        RightEdgeSwipe1Finger2     Enabled(   8): False  Diverted:(   5) False
        TopEdgeSwipe1Finger2       Enabled(   9): False  Diverted:(   6) False
        Zoom2FingerStateless       Enabled(  10): True   Diverted:(   7) False
        FnClickGestureSuppression  Enabled(  11): False  Diverted:(None) None
        TwoFingersPresent          Enabled(None): None   Diverted:(   8) False
        DeviceSpecificRawData      Enabled(None): None   Diverted:(   9) False
        ScaleFactor                Value  (   0): 256 [Default: 256]
        period unit                Spec   (   3): 2048
        DVI field width            Spec   (   1): 8
        field widths               Spec   (   2): 8
        multiplier                 Spec   (   5): None
        resolution                 Spec   (   4): 4
     Battery: 50%, discharging, next level 20%.

Describe the bug While Issue #1535 (closed) seems to have been fixed with PR #1536 my udev rule no longer reapplies settings upon keyboard power cycle.

To Reproduce Steps to reproduce the behavior:

  1. Create a script at /usr/local/bin/forcesolaarconfig.sh with the contents
#!/bin/bash
solaar config 1 fn-swap 0
echo "Solaar configuration applied at: $(date)" >> /tmp/solaar.log

Be sure to make it executable with chmod 0755 forcesolaarconfig.sh

  1. Create a udev rule at /etc/udev/rules.d/99-forcesolaarconfig.rules with the contents
ACTION=="change", SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_SERIAL_NUMBER}=="404d*", RUN+="/usr/local/bin/forcesolaarconfig.sh"

Where ENV{POWER_SUPPLY_SERIAL_NUMBER}=="404d*" can be found by running udevadm monitor -u -p -s power_supply and power cycling the keyboard or using the first bit from MODEL ID in solaar show output.

  1. Reload udev rules with udevadm control --reload-rules
  2. Now run solaar config 1 fn-swap 0 and press an F key, say F3, to trigger its functionality. Eg; F3 = find
  3. Power cycle the keyboard.
  4. Notice that pressing F3 no longer triggers the find dialog but (as in my case) the system's application window switcher.
  5. Navigating to /tmp confirms udev was indeed triggered as solaar.log was created containing a timestamp but Solaar settings were not reapplied.

Additional context I know I was running version 1.0.6 last summer and the above was working as intended. IIRC, Solaar had a few minor updates between then and a week or so ago and the above was still working just fine. I think I might have been on 1.1.1 from January up until about a week ago, but I'm not really sure so I can't confirm if above works there or not. Apt didn't have it listed when I was playing around with downgrading and whatnot yesterday. At any rate, something in the code changed and I'm eager to get it sorted. Thanks in advance.

Assignee
Assign to
Time tracking