Skip to content

fix(hook): carry the mouse's vendor/product ID onto its uinput mirror - #1453

Open
4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/uinput-virtual-mouse-input-id
Open

4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/uinput-virtual-mouse-input-id

Conversation

@4ni1ak

@4ni1ak 4ni1ak commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • On Linux, OpenLogi grabs each physical mouse exclusively and re-injects its events through a paired uinput virtual device. build_virtual_device() never set that virtual device's input_id, so it kept evdev's default sample ID (bus USB, vendor 0x1234, product 0x5678) instead of the real hardware's.
  • libinput and desktop environments (e.g. GNOME's per-device mouse settings) key pointer-acceleration profile and remembered pointer speed off the reported vendor/product ID. Every re-injected Logitech mouse looked identical and unrecognized under that ID, so those settings silently fell back to their defaults instead of the ones configured for the actual hardware — matching the "cursor speed too slow, ignores system sensitivity" symptom in [Bug]: MX Master cursor speed is too slow and ignores system sensitivity on Linux #1075.

Changes

  • crates/openlogi-hook: build_virtual_device() now copies device.input_id() (bus type, vendor, product, version) onto the VirtualDeviceBuilder instead of leaving it at the uinput default.

Testing

  • cargo fmt --all -- --check
  • cargo clippy -p openlogi-hook -p openlogi-agent -p openlogi-agent-core -p openlogi-desktop -p openlogi-overlay --all-targets -- -D warnings
  • cargo test -p openlogi-hook -p openlogi-agent -p openlogi-agent-core -p openlogi-desktop -p openlogi-overlay
  • Not runtime-tested on real Logitech hardware or against a live libinput/GNOME pointer-speed setting — that verification is the maintainer's call; to confirm, grab a mouse under OpenLogi and check udevadm info / libinput list-devices on /dev/input/eventN for "OpenLogi virtual mouse" reports the same vendor/product as the physical device, then compare pointer speed with a per-device system sensitivity setting applied.

Fixes #1075

…ut mirror

build_virtual_device() left the re-injecting uinput device on evdev's
default sample ID (bus USB, vendor 0x1234, product 0x5678) instead of the
grabbed mouse's own. libinput and desktop environments key per-device
settings — pointer acceleration profile, remembered pointer speed — off
the reported vendor/product ID, so every re-injected Logitech mouse
looked identical and unrecognized, silently falling back to default
acceleration instead of what the user configured for that hardware.

Fixes AprilNEA#1075
@4ni1ak
4ni1ak requested a review from AprilNEA as a code owner September 17, 2026 03:49
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the identifier change preserves the existing protection against capturing OpenLogi's own virtual mouse.

Summary

Updates the Linux uinput mouse mirror to copy the physical device's bus type, vendor, product, and version instead of retaining the default identifier.

  • Preserves the virtual-device name and existing self-capture exclusion.
  • Leaves event capabilities and passthrough handling unchanged.
  • No actionable issues identified. Hardware/libinput behavior was not independently runtime-tested during this review.

Reviews (1) · Last reviewed commit: "fix(hook): carry the physical mouse's ve..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: MX Master cursor speed is too slow and ignores system sensitivity on Linux

1 participant