pwr-Solaar / Solaar

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

PermissionError when resuming with a different receiver then at suspend time #2369

Closed rathann closed 8 months ago

rathann commented 8 months ago

Information

``` $ solaar -d show solaar version 1.1.9 Bolt Receiver Device path : /dev/hidraw3 USB id : 046d:C548 Serial : 43424146413130454345384635363338 Has 1 paired device(s) out of a maximum of 6. Notifications: wireless (0x000100) Device activity counters: 1=66 1: MX Mechanical Mini Device path : None WPID : B367 Codename : MX MCHNCL M Kind : keyboard Protocol : HID++ 4.5 Serial number: 7E51D9ED Model ID: B36700000000 Unit ID: 7E51D9ED Bootloader: BL1 50.00.B0010 Firmware: RBK 72.01.B0011 Other: The power switch is located on the (unknown). Supports 33 HID++ 2.0 features: 0: ROOT {0000} V0 1: FEATURE SET {0001} V0 2: DEVICE FW VERSION {0003} V4 Firmware: Bootloader BL1 50.00.B0010 B367A91B7FC8 Firmware: Firmware RBK 72.01.B0011 B3679386D010 Firmware: Other Unit ID: 7E51D9ED Model ID: B36700000000 Transport IDs: {'btleid': 'B367'} 3: DEVICE NAME {0005} V0 Name: MX Mechanical Mini Kind: keyboard 4: WIRELESS DEVICE STATUS {1D4B} V0 5: CONFIG CHANGE {0020} V0 6: DEVICE FRIENDLY NAME {0007} V0 Friendly Name: MX MCHNCL M 7: UNIFIED BATTERY {1004} V3 Battery: 80%, discharging. 8: REPROG CONTROLS V4 {1B04} V5 Key/Button Diversion (saved): {MultiPlatform Search:Regular, Backlight Down:Regular, Backlight Up:Regular, Mute Fn:Regular, Volume Down Fn:Regular, Volume Up Fn:Regular, Voice Dictation:Regular, Open Emoji Panel:Regular, Snipping Tool:Regular, Grave Accent:Regular, Tab Key:Regular, Caps Lock:Regular, Left Shift:Regular, Left Control:Regular, Left Option/Start:Regular, Left Command/Alt:Regular, Right Command/Alt:Regular, Right Shift:Regular, Delete:Regular, Home:Regular, End:Regular, Page Up:Regular, Page Down:Regular, Mute Microphone:Regular, Backslash:Regular, Right Option/Start/2:Regular, Play Pause:Regular} Key/Button Diversion : {MultiPlatform Search:Regular, Backlight Down:Regular, Backlight Up:Regular, Mute Fn:Regular, Volume Down Fn:Regular, Volume Up Fn:Regular, Voice Dictation:Regular, Open Emoji Panel:Regular, Snipping Tool:Regular, Grave Accent:Regular, Tab Key:Regular, Caps Lock:Regular, Left Shift:Regular, Left Control:Regular, Left Option/Start:Regular, Left Command/Alt:Regular, Right Command/Alt:Regular, Right Shift:Regular, Delete:Regular, Home:Regular, End:Regular, Page Up:Regular, Page Down:Regular, Mute Microphone:Regular, Backslash:Regular, Right Option/Start/2:Regular, Play Pause:Regular} 9: CHANGE HOST {1814} V1 Change Host : 1:modthms01 10: HOSTS INFO {1815} V2 Host 0 (paired): modthms01 Host 1 (unpaired): Host 2 (unpaired): 11: BACKLIGHT2 {1982} V2 Backlight (saved): False Backlight : False 12: K375S FN INVERSION {40A3} V0 Swap Fx function (saved): False Swap Fx function : False 13: LOCK KEY STATE {4220} V0 14: KEYBOARD DISABLE KEYS {4521} V0 Disable keys (saved): {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False} Disable keys : {Caps Lock:False, Scroll Lock:False, Insert:False, Win:False} 15: MULTIPLATFORM {4531} V1 Set OS (saved): Windows Set OS : Windows 16: KEYBOARD LAYOUT 2 {4540} V0 17: DFUCONTROL {00C3} V0 18: DEVICE RESET {1802} V0 internal, hidden, unknown:000010 19: unknown:1803 {1803} V0 internal, hidden, unknown:000010 20: CONFIG DEVICE PROPS {1806} V8 internal, hidden, unknown:000010 21: unknown:1816 {1816} V0 internal, hidden, unknown:000010 22: OOBSTATE {1805} V0 internal, hidden 23: unknown:1830 {1830} V0 internal, hidden, unknown:000010 24: unknown:1891 {1891} V7 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:1602 {1602} V0 29: unknown:1EB0 {1EB0} V0 internal, hidden, unknown:000010 30: unknown:1861 {1861} V1 internal, hidden, unknown:000010 31: unknown:1A20 {1A20} V0 internal, hidden, unknown:000010 32: unknown:18B0 {18B0} V0 internal, hidden, unknown:000010 Has 32 reprogrammable keys: 0: Host Switch Channel 1 , default: HostSwitch Channel 1 => HostSwitch Channel 1 is FN, FN sensitive, analytics key events, pos:1, group:0, group mask:empty reporting: default 1: Host Switch Channel 2 , default: HostSwitch Channel 2 => HostSwitch Channel 2 is FN, FN sensitive, analytics key events, pos:2, group:0, group mask:empty reporting: default 2: Host Switch Channel 3 , default: HostSwitch Channel 3 => HostSwitch Channel 3 is FN, FN sensitive, analytics key events, pos:3, group:0, group mask:empty reporting: default 3: Backlight Down , default: Backlight Down => Backlight Down is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:4, group:0, group mask:empty reporting: default 4: Backlight Up , default: Backlight Up => Backlight Up is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:5, group:0, group mask:empty reporting: default 5: Voice Dictation , default: Voice Dictation => Voice Dictation is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:6, group:0, group mask:empty reporting: default 6: Open Emoji Panel , default: Open Emoji Panel => Open Emoji Panel is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:7, group:0, group mask:empty reporting: default 7: Snipping Tool , default: Snipping Tool => Snipping Tool is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:8, group:0, group mask:empty reporting: default 8: Mute Microphone , default: Mute Microphone => Mute Microphone is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:9, group:0, group mask:empty reporting: default 9: MultiPlatform Search , default: Multiplatform Search => Multiplatform Search is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:10, group:0, group mask:empty reporting: default 10: Play Pause , default: unknown:00FD => unknown:00FD is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:11, group:0, group mask:empty reporting: default 11: Mute Fn , default: Mute => Mute is FN, FN sensitive, reprogrammable, divertable, analytics key events, pos:12, group:0, group mask:empty reporting: default 12: Volume Down Fn , default: Volume Down => Volume Down nonstandard, reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 13: Volume Up Fn , default: Volume Up => Volume Up nonstandard, reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 14: Grave Accent , default: Grave Accent => Grave Accent reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 15: Tab Key , default: Standard Tab Key => Standard Tab Key reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 16: Caps Lock , default: Caps Lock => Caps Lock reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 17: Left Shift , default: Left Shift => Left Shift reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 18: Left Control , default: Left Control => Left Control reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 19: Left Option/Start , default: Left Option/Start => Left Option/Start reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 20: Left Command/Alt , default: Left Command/Alt => Left Command/Alt reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 21: Right Command/Alt , default: Right Command/Alt => Right Command/Alt reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 22: Right Option/Start/2 , default: Right Option/Start/2 => Right Option/Start/2 reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 23: Right Shift , default: Right Shift => Right Shift reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 24: Backslash , default: Backslash => Backslash reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 25: Delete , default: Delete => Delete reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 26: Home , default: Home => Home reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 27: End , default: End => End reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 28: Page Up , default: Page Up => Page Up reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 29: Page Down , default: Page Down => Page Down reprogrammable, divertable, analytics key events, pos:0, group:0, group mask:empty reporting: default 30: F Lock , default: Do Nothing One => Do Nothing One is FN, analytics key events, pos:0, group:0, group mask:empty reporting: default 31: FN Key , default: Do Nothing One => Do Nothing One nonstandard, analytics key events, pos:0, group:0, group mask:empty reporting: default Battery: 80%, discharging. Unifying Receiver Device path : /dev/hidraw1 USB id : 046d:C52B Serial : AF18D9F6 Firmware : 24.10.B0036 Bootloader : 01.08 Other : AA.AD Has 6 paired device(s) out of a maximum of 6. Notifications: wireless (0x000100) Device activity counters: 4=24 1: Marathon Mouse M705 (M-R0009) Device path : /dev/hidraw4 WPID : 101B Codename : M705 (M-R0009) Kind : mouse Protocol : HID++ 1.0 Polling rate : 8 ms (125Hz) Serial number: 4A11C59E The power switch is located on the base. Battery: unknown (device is offline). 2: MX Anywhere 3 Device path : /dev/hidraw5 WPID : 4090 Codename : MX Anywhere 3 Kind : mouse Protocol : unknown (device is offline) Polling rate : 8 ms (125Hz) Serial number: 42198C84 The power switch is located on the base. Battery: unknown (device is offline). 3: MX Master 3 Wireless Mouse Device path : /dev/hidraw6 WPID : 4082 Codename : MX Master 3 Kind : mouse Protocol : HID++ 4.5 Polling rate : 8 ms (125Hz) Serial number: C046BB48 The power switch is located on the base. Battery: unknown (device is offline). 4: MX Master 3 Wireless Mouse Device path : /dev/hidraw7 WPID : 4082 Codename : MX Master 3 Kind : mouse Protocol : HID++ 4.5 Polling rate : 8 ms (125Hz) Serial number: 48F6344A Model ID: B02340820000 Unit ID: 48F6344A Bootloader: BOT 95.01.B0015 Firmware: MPM 19.01.B0015 Other: The power switch is located on the base. Supports 35 HID++ 2.0 features: 0: ROOT {0000} V0 1: FEATURE SET {0001} V0 2: DEVICE FW VERSION {0003} V3 Firmware: Bootloader BOT 95.01.B0015 00006A9CA89D Firmware: Firmware MPM 19.01.B0015 40826A9CA89D Firmware: Other Unit ID: 48F6344A 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 6: CRYPTO ID {0021} V1 7: DEVICE FRIENDLY NAME {0007} V0 Friendly Name: MX Master 3 8: BATTERY STATUS {1000} V1 Battery: 20%, discharging, next level 5%. 9: 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:Regular, Smart Shift:Regular} Key/Button Diversion : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, Mouse Gesture Button:Regular, Smart Shift:Regular} 10: CHANGE HOST {1814} V1 Change Host : 1:modthms01 11: XY STATS {2250} V1 12: ADJUSTABLE DPI {2201} V1 Sensitivity (DPI) (saved): 1000 Sensitivity (DPI) : 1000 13: SMART SHIFT {2110} V0 Scroll Wheel Ratcheted (saved): Ratcheted Scroll Wheel Ratcheted : Ratcheted Scroll Wheel Ratchet Speed (saved): 10 Scroll Wheel Ratchet Speed : 10 14: 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 15: THUMB WHEEL {2150} V0 Thumb Wheel Direction (saved): False Thumb Wheel Direction : False Thumb Wheel Diversion (saved): False Thumb Wheel Diversion : False 16: WHEEL STATS {2251} V0 17: DFUCONTROL SIGNED {00C2} V0 18: DEVICE RESET {1802} V0 internal, hidden 19: unknown:1803 {1803} V0 internal, hidden 20: CONFIG DEVICE PROPS {1806} V6 internal, hidden 21: unknown:1813 {1813} V0 internal, hidden 22: OOBSTATE {1805} V0 internal, hidden 23: unknown:1830 {1830} V0 internal, hidden 24: unknown:1890 {1890} V5 internal, hidden 25: unknown:1891 {1891} V5 internal, hidden 26: unknown:18A1 {18A1} V0 internal, hidden 27: unknown:1DF3 {1DF3} V0 internal, hidden 28: unknown:1E00 {1E00} V0 hidden 29: unknown:1EB0 {1EB0} V0 internal, hidden 30: unknown:1861 {1861} V0 internal, hidden 31: unknown:9001 {9001} V0 internal, hidden 32: unknown:9203 {9203} V0 internal, hidden 33: unknown:9205 {9205} V0 internal, hidden 34: 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: default 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: 20%, discharging, next level 5%. 5: MX Keys Keyboard Device path : /dev/hidraw8 WPID : 408A Codename : MX Keys Kind : keyboard Protocol : HID++ 4.5 Polling rate : 20 ms (50Hz) Serial number: E6EFAD59 The power switch is located on the edge of top right corner. Battery: unknown (device is offline). 6: MX Keys Keyboard Device path : /dev/hidraw9 WPID : 408A Codename : MX Keys Kind : keyboard Protocol : HID++ 4.5 Polling rate : 20 ms (50Hz) Serial number: 96DB682C The power switch is located on the edge of top right corner. Battery: unknown (device is offline). ```
``` N/A ```

Describe the bug Solaar is throwing a PermissionError exception after resuming a machine with a different receiver than the one present at suspend.

To Reproduce Steps to reproduce the behavior:

  1. Connect a bolt receiver to an external USB Hub.
  2. Suspend.
  3. Connect a different USB hub with a different bolt receiver.
  4. Resume.
  5. Error appears.

Screenshots N/A

Additional context Downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2208009 .

pfps commented 8 months ago

Solaar depends on being able to write to /dev/hidrawN nodes. This is done by the Solaar udev rule that needs to be installed. One possible diagnosis is that at resume time the rule did not run. Validating this diagnosis would require being able to set up conditions for the situation to reliably occur and then monitoring udev rule processing. The other possible diagnosis is that Solaar is using a handle left over from before the suspend. Validating this diagnosis would also require being able to recreate the situation.

Was Solaar able to recover from this error? Did the new receiver show up?

rathann commented 8 months ago

Unfortunately, the original reporter cannot reproduce this anymore, so let's close for now. I'll ask reporters of all open bugs we have in Fedora at the moment to re-test with 1.1.11 before forwarding any more reports here.