-
Notifications
You must be signed in to change notification settings - Fork 39
Fix MSI Claw Device Issues #217
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
base: master
Are you sure you want to change the base?
Conversation
Shouldn't closing the fd descriptor automatically do that? |
| d_kbd_2.dev.grab() | ||
| d_kbd_2_grabbed = True | ||
| except Exception: | ||
| pass # Ignore grab failures, continue without grabbing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would there be a grab failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just referenced Ally's implementation.
| # If no specific devices to reload but we removed rules, reload all input devices | ||
| if removed and not _hidden: | ||
| subprocess.run(["udevadm", "trigger", "--subsystem-match=input"], capture_output=True) | ||
| subprocess.run(["udevadm", "settle"], capture_output=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does settle do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waits for all events to finish
| "MSI Claw A8", | ||
| "Claw A8 BZ2EM", | ||
| type="only_press", | ||
| phys=["gpio-keys", "LNXPWRBN", "PNP0C0C"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does grabbing gpio-keys break the volume buttons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does grabbing gpio-keys break the volume buttons?
will not
But according to my tests, without adding it, the MSI Xbox device cannot ungrab properly. Perhaps I haven't found the right reason ? |
If not it means the device wasnt closed properly and there is a descriptor leak. Perhaps during init. Otherwise, there is a chance the overlay has temporarily grabbed it because it is open. |
Then I probably haven't found the root cause. |
Fix unhide_all() to trigger udev reload even when _hidden list is empty. Resolves devices remaining with 000 permissions after HHD stops.
Fix MSI Claw Device Issues
Problem
Solution
ungrab()inGenericGamepadEvdev.close()to prevent resource leaksunhide_all()to trigger udev reload even when device tracking list is emptygpio-keysidentifier for MSI Claw A8 power buttonResolves critical usability issues for MSI Claw users including XInput mode startup and proper device cleanup.