psm(4): Disabled IMEX side-buttons by default.#388
Merged
Conversation
This is a workaround. At least two hypervisors (QEMU and VBox) are detected to be using this mouse model by default and they send superfluous side button key events when using the scroll wheel. Added a runtime rw sysctl that disables the side buttons on this specific model to workaround this issue. Signed-off-by: b-aaz <b-aazbsd@proton.me>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a tunable/sysctl to control Intellimouse Explorer side-button handling and defaults it to disabled to work around spurious side-button events from some hypervisors, altering the packet-processing path for that mouse model. Sequence diagram for runtime control of explorer_sidebuttons via sysctlsequenceDiagram
actor Admin
participant SysctlInterface
participant Kernel_psm as Kernel_psm
Admin->>SysctlInterface: sysctl hw.psm.explorer_sidebuttons=1
SysctlInterface->>Kernel_psm: update explorer_sidebuttons
Admin->>Kernel_psm: mouse input arrives
Kernel_psm->>Kernel_psm: psmsoftintr processes Explorer packet
Kernel_psm-->>Admin: side button events generated (if explorer_sidebuttons != 0)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Thank you for taking the time to contribute to FreeBSD!
Please review CONTRIBUTING.md, then update and push your branch again. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- To match nearby sysctl usage and keep this tunable controllable both at boot and at runtime, consider using CTLFLAG_RWTUN for
explorer_sidebuttonsinstead of plain CTLFLAG_RW. - Align the
if (!explorer_sidebuttons)brace style with the file’s KNF convention (opening brace on the same line as theif) for consistency with surrounding code.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- To match nearby sysctl usage and keep this tunable controllable both at boot and at runtime, consider using CTLFLAG_RWTUN for `explorer_sidebuttons` instead of plain CTLFLAG_RW.
- Align the `if (!explorer_sidebuttons)` brace style with the file’s KNF convention (opening brace on the same line as the `if`) for consistency with surrounding code.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
ericbsd
approved these changes
Jun 15, 2026
Contributor
|
This will need to be tested before back-porting to releng/15.1. |
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.
This is a workaround.
At least two hypervisors (QEMU and VBox) are detected to be using this mouse model by default and they send superfluous side button key events when using the scroll wheel.
Added a runtime rw sysctl that disables the side buttons on this specific model to workaround this issue.
This issue was also mentioned by users in discussions.
Links to some of other mentions of this issue I have found:
https://forums.freebsd.org/threads/gnome3-weird-scroll-wheel-behaviour.78532/
https://www.reddit.com/r/freebsd/comments/o8k71l/anyone_else_having_weird_behaviour_with_scrolling/
Summary by Sourcery
Disable Intellimouse Explorer side buttons by default via a runtime sysctl to avoid spurious button events from this mouse model.
Bug Fixes:
Enhancements: