Repository navigation
hidpp, userspace: add Logitech RS H-Shifter support, desktop routing, and UI gate monitor - #140
Open
gonzaloadrio wants to merge 2 commits into
Open
gonzaloadrio wants to merge 2 commits into
gonzaloadrio wants to merge 2 commits into
Conversation
In Desktop mode (profile 0), the RS50 base suppresses accessory gate reporting for gears 1-6 and Reverse on interface 0 unless G HUB's slot routing, sync, and accessory activation sequence is sent. Add discovery for GAMING_ATTACHMENTS (0x8120) and RS_H_SHIFTER (0x812D), and invoke hidpp_dd_enable_desktop_shifter() when entering or detecting Desktop mode to ensure full 8-gate functionality without requiring G HUB. Signed-off-by: Gonzalo Adrio <[email protected]>
Signed-off-by: Gonzalo Adrio <[email protected]>
|
mescon
requested changes
Nov 2, 2026
mescon
left a comment
Owner
There was a problem hiding this comment.
Thanks for this, the H-shifter has been on the list for a while and the onboard-versus-desktop finding is new to me. Four things before it can go in:
- Gear decoding must be gated per wheel.
gear_from_wheel_coderuns for every model. On the G923 PS edition 0x2c3/0x2c4 are Plus and Minus; on the G923 Xbox edition 0x12b to 0x2c1 are already Shifter R and 1 to 6 (seeG923_XBOX_BUTTONS) and 0x2c2 to 0x2c4 are Plus, Minus and the dial. With this change a G923 owner pressing Plus sees "shifter connected, Reverse". Apply the RS50 map only for RS50 and G PRO, keep the G923 tables as they are, and restore the G923 test you rewrote. - Kernel: gate the enablement on the shifter being present.
hidpp_dd_enable_desktop_shifterruns on every desktop-mode wheel, so every RS50 and G PRO owner now gets the 0x8120 and 0x1BC0 writes and an info line at each settings query. Run it only whenh_shifter_dev_idxwas found, and make the completion linedd_dbg. - Evidence for the sequence. The 0x8120 fn2 slot list matches what G HUB sends at start-up in our captures. 0x80B1 fn8 = 1 and the 0x1BC0 fn2 on the sub-device I have no capture for. Where do they come from? If from a Windows capture, attach it:
tools\windows-usb-capture.bat
Otherwise the dmesg of a probe with the shifter attached (the new "RS H-Shifter at dev" line) and a note of what else was on the base, since the 0x812D discovery skips shifter_dev_idx.
4. Docs: write "1 to 7" rather than "1–7"; this repo keeps dashes out of prose.
#139 stacks on this branch, so it will need a rebase once this changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This PR adds complete support for the Logitech G RS H-Shifter (
046d:c26b) across both the kernel driver and the userspace desktop stack (supersedes and resolves #138).Problem & Root Cause
When the RS H-Shifter is connected via the accessory port of direct-drive wheel bases (such as the RS50
046d:c276or G PRO):0x0F(GAMING_ATTACHMENTS), which reset the base's attachment routing table if called after configuration.Changes
Kernel driver (
mainline/hid-logitech-hidpp.c):0x8120(GAMING_ATTACHMENTS) and0x812D(RS_H_SHIFTER).hidpp_dd_enable_desktop_shifter()sending the 5-step slot routing and enablement sequence.hidpp_dd_ff_query_settings()when entering or detecting Desktop mode (current_mode == 0).ff->idx_attachments(0x0F) fromdesktop_sync_zonesso LIGHTSYNC LED updates do not wipe out attachment routing.scripts/checkpatch.pl: 0 errors, 0 warnings,Signed-off-by).Userspace (
logi-wheel-core&logi-wheel-gui):discover_shifter_input,gear_from_wheel_code,gear_from_standalone_code).info_page.slint) showing live gate engagement and neutral rail.LSBbutton (0x12b).cargo test --workspace: 219 passed, 0 failed).Documentation:
docs/PROTOCOL_SPECIFICATION.md(Report 0x08, Byte 2 bits 0–6 for Gears 1–7, Byte 3 bit 0 for Reverse).docs/BUTTON_MAPPING.md.Hardware Verification
046d:c276) with the RS H-Shifter (046d:c26b) under Fedora Linux (kernel 7.2.x).