How to Fix High Mouse Sensitivity on Linux (Cinnamon / X11 Startup Bug)

If you use a wireless USB mouse—such as a Tecknet receiver—on Linux Mint or EndeavourOS Cinnamon, you might encounter an annoying glitch upon boot. The mouse cursor feels wildly sensitive, and the only way to fix it is manually opening Settings → Mouse, toggling Acceleration to Device Default, and then switching it back to Constant.

This happens because the desktop settings daemon (csd-mouse) fails to properly apply the libinput pointer acceleration profile during session startup.

Here is a quick script to automate this toggle on login so your mouse works correctly every time you boot.

The Fix: Create an Automated XInput Toggle Script

Instead of manually toggling settings every time you start your PC, we can write a small Bash script that uses xinput to cycle the mouse acceleration profile automatically behind the scenes.

Step 1: Identify Your Mouse Device Name

Open your terminal and run:

Bash

xinput list

Look under Virtual core pointer for your mouse. For Tecknet and standard 2.4G dongles, it often appears as Compx 2.4G Receiver Mouse. Note down the exact name in quotes.

Step 2: Create the Fix Script

In your terminal, create a script file in your local bin directory:

Bash

nano ~/.local/bin/fix-mouse.sh

Paste the following logic into the file:

Bash

#!/bin/bash
# Wait for Cinnamon and xinput to initialize the USB device
sleep 3

DEVICE="Compx 2.4G Receiver Mouse"

# Verify device is present
if xinput list --name-only | grep -q "$DEVICE"; then
    # Grab property ID for libinput Accel Profile Enabled
    PROP=$(xinput list-props "$DEVICE" | grep "libinput Accel Profile Enabled (" | grep -oP '\(\K[0-9]+')

    if [ -n "$PROP" ]; then
        # Toggle to Adaptive (Device Default)
        xinput set-prop "$DEVICE" "$PROP" 1 0
        sleep 0.5
        # Toggle back to Flat (Constant)
        xinput set-prop "$DEVICE" "$PROP" 0 1
    fi
fi

Note: Replace "Compx 2.4G Receiver Mouse" with your exact device name if it differs.

Step 3: Make the Script Executable

Save and close the file (Ctrl+O, Enter, Ctrl+X), then set executable permissions:

Bash

chmod +x ~/.local/bin/fix-mouse.sh

Step 4: Add to Startup Applications

  1. Open Startup Applications from your application menu.
  2. Click Add (+) -> Custom command.
  3. Name: Fix Wireless Mouse Acceleration
  4. Command: /home/YOUR_USERNAME/.local/bin/fix-mouse.sh
  5. Delay: Set to 2 or 3 seconds.

Now, whenever you log into your desktop, the system will silently refresh the pointer acceleration property, restoring your preferred flat/constant speed without any manual intervention!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.