Check Mouse DPI

Mouse Sensitivity Linux

Adjust pointer speed, configure acceleration profiles, and build persistent sensitivity settings for any Linux distribution. Supports X11, Wayland, GNOME, KDE, and XFCE.

X11 & Wayland · All desktops · Free tool
Linux Sensitivity Command Builder
LINUX
0.0
-1.0 (Slowest)0.01.0 (Fastest)
Relative Speed
0.5×1.0×2.0×
Generated Commands
# Loading...
Quick Reference
List Devices
xinput list
Show Properties
xinput list-props
Reset Defaults
xset m default
Disable Accel
xset m 1 0

Understanding Pointer Acceleration on Linux

Linux pointer acceleration determines how cursor speed relates to physical mouse movement speed. libinput provides 2 acceleration modes.

Pointer acceleration on Linux is handled by the libinput library (on modern distributions) or the older evdev driver. The acceleration algorithm takes raw mouse sensor counts and applies a mathematical transformation before passing cursor coordinates to the application. The transformation depends on the acceleration profile and speed setting.

How Acceleration Changes Cursor Behavior

Without acceleration (flat profile), 1 inch of mouse travel always moves the cursor the same distance, regardless of how fast you move the mouse. With acceleration (adaptive profile), fast movements produce proportionally more cursor distance than slow movements. The ratio between slow and fast movements depends on the speed parameter.

Why Acceleration Exists

Acceleration lets users navigate large screens with small mousepads. Without acceleration, a low-DPI mouse on a 4K display requires massive arm movements. Acceleration compresses the physical space needed for fast navigation while preserving precision for slow, deliberate movements.

The Speed Parameter

libinput's speed parameter ranges from -1.0 to 1.0. At 0.0, the default acceleration or flat speed is applied. Negative values reduce cursor speed; positive values increase it. The speed parameter interacts with the acceleration profile — adaptive and flat profiles interpret it differently.

Flat vs Adaptive Acceleration Profiles

libinput offers 2 acceleration profiles with fundamentally different behaviors.

Flat Profile (No Acceleration)

The flat profile applies a constant multiplier to raw sensor counts. Fast and slow movements produce proportionally identical cursor distances. The speed parameter scales the multiplier linearly: 0.0 = 1.0× multiplier, -0.5 = 0.5× multiplier, 1.0 = 2.0× multiplier. Preferred for gaming.

Adaptive Profile (Default)

The adaptive profile applies a velocity-dependent curve. Below a speed threshold, cursor mapping is decelerated (sub-linear). Above the threshold, mapping is accelerated (super-linear). The speed parameter shifts the entire curve — positive values lower the threshold (acceleration kicks in sooner), negative values raise it.

Choosing the Right Profile

Use flat profile for: gaming, design work, and any task where consistent cursor distance matters. Use adaptive profile for: desktop navigation, web browsing, and multi-monitor setups where you need both precision and speed without changing DPI.

Setting Sensitivity with xset and xinput

xset and xinput are 2 command-line tools that adjust mouse sensitivity on X11-based Linux systems.

xset (Legacy Method)

xset sets the X11 pointer acceleration and threshold. 'xset m 1 0' disables acceleration (1× multiplier, 0 threshold). 'xset m 3 4' applies 3× acceleration after 4 pixels of movement. The 'acceleration' value is the multiplier; 'threshold' is the minimum pixel delta before acceleration engages.

xset m <acceleration> <threshold>

xinput Speed Property

Sets the libinput acceleration speed for a specific device. Range: -1.0 to 1.0. At 0.0, default speed applies. At -1.0, cursor moves at minimum speed. At 1.0, cursor moves at maximum speed. Works with both flat and adaptive profiles.

xinput set-prop <id> 'libinput Accel Speed' <value>

xinput Coordinate Transformation

Applies a 3×3 transformation matrix to cursor coordinates. The diagonal values (1.5, 1.5) act as X and Y sensitivity multipliers. This bypasses the acceleration system entirely and scales raw coordinates directly. Useful for fine-tuning beyond the -1.0 to 1.0 speed range.

xinput set-prop <id> 'Coordinate Transformation Matrix' 1.5 0 0 0 1.5 0 0 0 1

libinput Pointer Speed Configuration

libinput is the default input driver on modern Linux distributions. It provides 3 configurable properties for mouse sensitivity.

Accel Speed

The primary speed adjustment. Range: -1.0 to 1.0. Applied on top of the selected acceleration profile. At 0.0, the profile's default speed is used. Each 0.1 increment adjusts speed by approximately 10%. Set via xinput on X11 or gsettings on Wayland.

Accel Profile

Selects between flat (no acceleration) and adaptive (velocity-dependent acceleration). Set via xinput property 'libinput Accel Profile Enabled' as a bitmask: '0 1' for flat, '1 0' for adaptive. KDE System Settings provides a GUI dropdown.

Scroll Method and Speed

Scroll sensitivity is separate from pointer sensitivity. libinput provides natural scrolling, button-based scrolling, and edge scrolling options. Configure via xinput property 'libinput Natural Scrolling Enabled' or desktop environment settings.

Per-Device Sensitivity for Multi-Mouse Setups

Linux supports independent sensitivity configuration for each connected mouse using device-specific xinput commands.

Each connected input device gets a unique device ID assigned by X11. Run 'xinput list' to see all devices. Apply xinput set-prop commands to specific device IDs to configure each mouse independently. A gaming mouse can use flat profile at -0.3 speed while a work mouse uses adaptive profile at 0.0 speed.

Identifying Devices

Filters the device list to show only mouse devices. Each device shows its name (e.g., 'Logitech G Pro X Superlight') and ID (e.g., 'id=12'). Use this ID in all subsequent xinput commands.

xinput list | grep -i mouse

Per-Device Configuration Script

Create a shell script that sets different xinput properties for each device ID. Add this script to your desktop environment's autostart directory. The script runs after login and applies per-device settings automatically.

Hot-Plugging Detection

When a mouse is disconnected and reconnected, it may get a new device ID. Use udev rules to detect specific mice by vendor:product ID and trigger configuration scripts. This ensures settings reapply even when device IDs change.

Gaming Sensitivity Tuning on Linux

Linux gaming requires flat acceleration, proper DPI configuration, and game-specific raw input settings.

01

Step 1: Set Flat Acceleration Profile

Run 'xinput set-prop <id> "libinput Accel Profile Enabled" 0 1' to disable acceleration. Cursor speed becomes linearly proportional to mouse movement.

02

Step 2: Adjust Speed to Match Your DPI

If your hardware DPI is high (1600+), set speed to a negative value: 'xinput set-prop <id> "libinput Accel Speed" -0.4'. If your DPI is low (400), consider speed 0.0 or a slight positive value.

03

Step 3: Configure Game Raw Input

CS2: set m_rawinput 1 in console. Proton games: set the flat profile before launching — Proton reads the X11 cursor by default. Native SDL2 games: most support raw input via SDL_HINT_MOUSE_RELATIVE_MODE.

04

Step 4: Make Settings Persistent

Create /etc/X11/xorg.conf.d/50-mouse-gaming.conf with Section "InputClass" → MatchDriver "libinput" → Option "AccelProfile" "flat" → Option "AccelSpeed" "-0.4". This survives reboots and applies to all libinput mice.

Frequently Asked Questions

Common questions about configuring mouse sensitivity on Linux, acceleration profiles, and persistent settings.

01How do I change mouse sensitivity on Linux without a GUI?

Use xinput in the terminal. First find your device ID: 'xinput list'. Then set speed: 'xinput set-prop <id> "libinput Accel Speed" 0.3'. Range is -1.0 (slowest) to 1.0 (fastest). For Wayland GNOME, use: 'gsettings set org.gnome.desktop.peripherals.mouse speed 0.3'.

02What is the default mouse sensitivity on Linux?

The default libinput acceleration speed is 0.0 with the adaptive profile enabled. This provides moderate velocity-dependent acceleration — slow movements are precise, fast movements are amplified. The default feels similar to macOS default mouse behavior.

03How do I set mouse sensitivity to be exactly 1:1 on Linux?

Enable the flat profile: 'xinput set-prop <id> "libinput Accel Profile Enabled" 0 1'. Set speed to 0.0: 'xinput set-prop <id> "libinput Accel Speed" 0.0'. This provides approximately 1:1 mapping — cursor distance is linearly proportional to physical mouse distance.

04Does libinput work on both X11 and Wayland?

Yes. libinput is the input library used by both X11 and Wayland compositors. The difference is the configuration method: X11 uses xinput commands and xorg.conf files. Wayland uses compositor-specific tools — gsettings for GNOME, System Settings for KDE Plasma.

05Can I use different sensitivity for gaming and desktop on Linux?

Yes, through 3 methods: (1) Create a shell script that changes sensitivity before launching a game and restores it afterward. (2) Use per-application libinput profiles (supported on some compositors). (3) Use game-specific raw input settings that bypass the OS sensitivity entirely.

06Why does my mouse feel different on Linux compared to Windows?

Linux (libinput) and Windows use different acceleration algorithms. Even with both set to 'no acceleration,' the base sensitivity curves differ slightly. The libinput flat profile at 0.0 speed produces a 1:1 mapping. Windows notch 6 with acceleration disabled also produces 1:1. With matching hardware DPI, both should feel identical — but Linux Wayland compositors may add a small additional multiplier.

07How do I make xinput sensitivity settings permanent?

xinput settings reset on reboot. To make them permanent: (1) Create an Xorg config file at /etc/X11/xorg.conf.d/50-mouse.conf with your settings. (2) Add xinput commands to a .desktop autostart file in ~/.config/autostart/. (3) Use a udev rule for per-device persistence.

08What does the Coordinate Transformation Matrix do for mouse sensitivity?

The 3×3 Coordinate Transformation Matrix scales and rotates cursor coordinates. Setting diagonal values above 1.0 (e.g., '1.5 0 0 0 1.5 0 0 0 1') increases sensitivity by 50% in both X and Y axes. This bypasses the libinput acceleration system and directly scales raw coordinates.