feat: Add PRO X 2 Superstrike mouse support with HITS tuning settings#3132
feat: Add PRO X 2 Superstrike mouse support with HITS tuning settings#3132caioquirino wants to merge 6 commits intopwr-Solaar:masterfrom
Conversation
… and rapid trigger config support
Logitech PRO X 2 Superstrike - Solaar CLI ReferenceThis document describes all available settings for the Logitech PRO X 2 Superstrike mouse via the Solaar CLI. Device Identification
General CLI Syntax# List all settings for device
solaar config <device>
# Read a specific setting
solaar config <device> <setting-name>
# Write a specific setting
solaar config <device> <setting-name> <value>The
Available Settings1. Onboard ProfilesControls whether the device uses its onboard profile or host-controlled settings.
Commands: # Read current value
solaar config 1 onboard_profiles
# Set to disabled (allows host control of DPI, report rate, etc.)
solaar config 1 onboard_profiles Disabled
# Set to Profile 1 (use onboard profile)
solaar config 1 onboard_profiles "Profile 1"Note: Many settings require 2. Report RateControls the frequency of device movement reports.
Commands: # Read current value
solaar config 1 report_rate_extended
# Set to 1ms (1000Hz)
solaar config 1 report_rate_extended 1ms
# Set to 500us (2000Hz)
solaar config 1 report_rate_extended 500us
# Set to 125us (8000Hz)
solaar config 1 report_rate_extended 125usPolling Rate Reference:
3. Sensitivity (DPI)Controls mouse movement sensitivity.
Commands: # Read current value
solaar config 1 dpi_extended
# Set DPI (format: {X:<value>, Y:<value>, LOD:<value>})
solaar config 1 dpi_extended "{X:800, Y:800, LOD:HIGH}"
# Set to 1600 DPI
solaar config 1 dpi_extended "{X:1600, Y:1600, LOD:HIGH}"
# Set different X and Y sensitivity
solaar config 1 dpi_extended "{X:800, Y:1600, LOD:LOW}"HITS Tuning Settings (Hall-Effect Inductive Trigger Switch)These settings control the advanced click behavior of the PRO X 2 Superstrike's hall-effect switches. 4. Actuation PointControls how deep the button must be pressed to register a click.
Value Interpretation:
Commands: # Read left button actuation
solaar config 1 superstrike-tuning_actuation-0
# Read right button actuation
solaar config 1 superstrike-tuning_actuation-1
# Set left button to shallow actuation (hair trigger)
solaar config 1 superstrike-tuning_actuation-0 1
# Set left button to deep actuation
solaar config 1 superstrike-tuning_actuation-0 10
# Set right button to medium actuation
solaar config 1 superstrike-tuning_actuation-1 55. Rapid Trigger LevelControls the rapid trigger sensitivity, which allows the button to re-actuate quickly after partial release.
Value Interpretation:
Note: Rapid trigger cannot be disabled on this device. The minimum level is 1. Commands: # Read left button rapid trigger level
solaar config 1 superstrike-tuning_rapid-trigger-level-0
# Read right button rapid trigger level
solaar config 1 superstrike-tuning_rapid-trigger-level-1
# Set left button to fastest rapid trigger
solaar config 1 superstrike-tuning_rapid-trigger-level-0 1
# Set left button to slowest rapid trigger
solaar config 1 superstrike-tuning_rapid-trigger-level-0 5
# Set right button to medium rapid trigger
solaar config 1 superstrike-tuning_rapid-trigger-level-1 36. Click HapticsControls the intensity of the haptic feedback when clicking.
Value Interpretation:
Commands: # Read left button haptics level
solaar config 1 superstrike-tuning_haptics-0
# Read right button haptics level
solaar config 1 superstrike-tuning_haptics-1
# Disable haptics on left button
solaar config 1 superstrike-tuning_haptics-0 0
# Set left button to maximum haptics
solaar config 1 superstrike-tuning_haptics-0 5
# Set right button to medium haptics
solaar config 1 superstrike-tuning_haptics-1 3Complete Settings Summary
Batch Configuration ExamplesGaming Profile (Fast Response)#!/bin/bash
# Gaming profile: fast actuation, sensitive rapid trigger, medium haptics
solaar config 1 onboard_profiles Disabled
solaar config 1 report_rate_extended 125us
solaar config 1 dpi_extended "{X:800, Y:800, LOD:HIGH}"
# Left button - hair trigger
solaar config 1 superstrike-tuning_actuation-0 1
solaar config 1 superstrike-tuning_rapid-trigger-level-0 1
solaar config 1 superstrike-tuning_haptics-0 3
# Right button - hair trigger
solaar config 1 superstrike-tuning_actuation-1 1
solaar config 1 superstrike-tuning_rapid-trigger-level-1 1
solaar config 1 superstrike-tuning_haptics-1 3Productivity Profile (Comfortable)#!/bin/bash
# Productivity profile: deeper actuation, slower rapid trigger, strong haptics
solaar config 1 onboard_profiles Disabled
solaar config 1 report_rate_extended 1ms
solaar config 1 dpi_extended "{X:1600, Y:1600, LOD:HIGH}"
# Left button - comfortable click
solaar config 1 superstrike-tuning_actuation-0 7
solaar config 1 superstrike-tuning_rapid-trigger-level-0 4
solaar config 1 superstrike-tuning_haptics-0 5
# Right button - comfortable click
solaar config 1 superstrike-tuning_actuation-1 7
solaar config 1 superstrike-tuning_rapid-trigger-level-1 4
solaar config 1 superstrike-tuning_haptics-1 5Silent Profile (No Haptics)#!/bin/bash
# Silent profile: no haptic feedback
solaar config 1 superstrike-tuning_haptics-0 0
solaar config 1 superstrike-tuning_haptics-1 0Programmatic UsageReading All Settings (JSON-like parsing)# Get all settings as output
solaar config 1 2>/dev/null | grep "^[a-z]" | while read line; do
setting=$(echo "$line" | cut -d'=' -f1 | tr -d ' ')
value=$(echo "$line" | cut -d'=' -f2 | tr -d ' ')
echo "{\"setting\": \"$setting\", \"value\": \"$value\"}"
doneReading a Single Setting Value# Extract just the value
solaar config 1 superstrike-tuning_actuation-0 2>/dev/null | grep "^superstrike" | cut -d'=' -f2 | tr -d ' 'Error Handling# Check if command succeeded
if solaar config 1 superstrike-tuning_actuation-0 5 2>/dev/null; then
echo "Setting applied successfully"
else
echo "Failed to apply setting"
fiExit Codes
Notes
|
|
The only thing I am not sure yet, is if I should make this similar to what we currently have on G Hub (with the quantized multiples), or if I simply keep it raw, with all the levels. Any thoughts? |
Is it possible to have an "advanced" flag? E.g. replicate the G Hub value steps 1:1, and offer raw with all levels with an "advance" toggle checked. I just got this mouse and have never used solaar before, excited for this to get merged and the mouse to be supported, thx a ton :)! |
Give me a few more minutes with it 😄 Here is a PKGBUILD for this PR for the fellow arch users based on the existing aur/solaar-git. Probably not worth to put it in AUR as this should get merged right away! 😄 |
|
How did you find the names of the two features? Please provide the output of |
|
Did you find any documentation of the features? |
|
Couldn't agree more, the 🖱️ 🪨s! |
|
Thanks for the output of |
|
@pfps I have added some info to the PR: docs/features.md — Added 6 new entries:
docs/devices.md — Added PRO X 2 Superstrike (WPID 40BD, HID++ 4.2) to the Mice (Lightspeed) table. docs/capabilities.md — Added three new sections before "Onboard Profiles":
|
|
The feature IDs were discovered by running solaar show on the unmodified codebase — at that point the device was partially recognized but unsupported features appeared as unknown:1B0C, unknown:2202, etc. The feature IDs themselves are reported by the device via HID++ feature enumeration. Most of the feature names (EXTENDED_ADJUSTABLE_DPI, EXTENDED_ADJUSTABLE_REPORT_RATE, etc.) were already defined in hidpp20_constants.py before this PR, added by previous contributors who had documented the feature IDs without implementing them. SUPERSTRIKE_TUNING (0x1B0C) was new — the name was chosen descriptively based on what the feature controls (the HITS switch tuning: actuation, rapid trigger, haptics). |
|
@caioquirino Thanks. I'll see if I can find some external documentation. If so, I'll update your documentation. If not, I'll have to take a close look at the code you provided. One potential issue is that your code may only work for the PRO X 2 Superstrike. (Of course, these features might only be implemented in this mouse.) |
|
The two EXTENDED features already have settings. Hopefully what you did doesn't interfere with the existing settings. |
|
@pfps I am happy to do any kind of changes necessary to make this PR the way it should be :) Just let me know, and thanks for looking at it :) |
|
Thank you for your work @caioquirino ! I need this. i hope getting merged soon |
|
Testing on NixOS now, will edit this comment with feedback on how it went. So, I had to boot into Windows to set the mouse to on-board profile mode, then I didn't just have a read-only one in Solaar. But otherwise the settings work, except for poll rate and dpi. |
|
Testing on Fedora 43 for a week now. Seems stable, I haven't got any problems with the build or the app. |
This can also be done with this solaar branch. I don't even have Windows and everything works just fine. But setting the profile is the first thing you have to do, as written in the PR. |
There was a problem hiding this comment.
Great work! A few comments and changes.
Solaar doesn't need device descriptors for most newer devices. Also, some newer devices have different names and short names but the same WPID or USB ID. So the descriptor should be removed from descriptors.py.
The button feature is not unique to the Superstrike. A better name is ANALOG_BUTTONS.
No _ after the setting class.
The trigger switch might not be hall-effect in the future, so maybe use a better name, but only if you can think of one.
Do you have information on the bunny hop feature? I'm pretty sure that its not the hidden feature that you assign it to, but is instead 0x80E0. I may be able to help you to get it to work. As far as I can tell what it does is ignore second scroll movements for a little while after a scroll movement. So to see what it does use command 2 with the first byte a large number, like 250. Then try scrolling, wait a little bit, and then scroll again. But let's get this PR in before doing anything else.
Thanks for the valuable feedback @pfps ! I will try to work on the points you have mentioned this evening or at the weekend latest. I have a question regarding the quantization I am doing: I am wondering if I should just remove/drop it or if I should keep it as is (consistency with Windows' G Hub vs fidelity with the hardware and better capability?), should I remove the quantization or keep it? Thanks! |
|
In general I would go with the hardware capabilities, and not with the Logitech software. |
|
Hi @pfps , good evening! I have been testing the mouse without the quantized multipliers and I noticed that eve though the mouse can be used with the raw numbers instead of the quantized ones, there are two situations:
I think Logitech simply used the quantized numbers but made the mouse itself capable to recognize only the X steps they wanted. I am not sure if this is a firmware thingy or really baked into its hardware. So, the question is:
|
# Conflicts: # lib/logitech_receiver/hidpp20_constants.py

Summary
Add support for the Logitech PRO X 2 Superstrike gaming mouse, including HITS (Hall-Effect Inductive Trigger Switch) tuning settings for actuation point, rapid trigger sensitivity, and click haptics.
Changes
SUPERSTRIKE_TUNING(0x1B0C) feature constantAll settings are available per-button (left and right) and grouped by feature type in the UI.
Technical Details
The HITS tuning feature (0x1B0C) protocol:
[flags, button_count, max_actuation, max_rt, max_haptics, ...][button_index] -> [index, actuation, rapid_trigger, haptics, ...][button_index, actuation, rapid_trigger, haptics]Device value ranges and quantization:
Testing
Tested on PRO X 2 Superstrike mouse:
solaar config)Notes
SUPERSTRIKE_HAPTICSfeature (0x80E0), but testing revealed it's a non-functional stub that only echoes parameters. Haptics is actually controlled via byte 3 of the TUNING feature.