Ubuntu 16.04下如何让鼠标指针如Mac般流畅?解决鼠标闪烁问题
Hey there, let's fix that jittery mouse issue on your Ubuntu 16.04 (Intel i5 + 8GB RAM) setup and get it feeling as smooth as a Mac's pointer! I've got a few tried-and-true methods to walk you through:
First, let's make sure your system has the latest input drivers—outdated software is a common culprit for pointer glitches.
- Open a terminal (press Ctrl+Alt+T) and run this to update your system packages:
sudo apt update && sudo apt upgrade -y - Install the
libinputdriver, which is more reliable than the oldevdevfor modern mice and offers better smoothness controls:sudo apt install xserver-xorg-input-libinput
Mac uses a linear mouse acceleration profile (no sudden speed jumps based on movement), which is key to that smooth feel. We'll force this via an Xorg config file:
- Create a new config file with nano:
sudo nano /usr/share/X11/xorg.conf.d/90-mouse-smooth.conf - Paste these lines into the editor (you can adjust the values later to match your preference):
Section "InputClass" Identifier "mouse" MatchIsPointer "yes" Driver "libinput" Option "AccelProfile" "flat" # Enables linear acceleration (like Mac) Option "AccelSpeed" "0.0" # Disables extra acceleration tweaks Option "ConstantDeceleration" "1.5" # Adjusts base speed (1.0 = default, higher = slower) Option "VelocityScale" "1.0" EndSection - Save and exit: Press Ctrl+O, hit Enter, then Ctrl+X.
- Restart the display manager to apply changes. For Ubuntu 16.04's default Unity desktop, run:
(If you're using GNOME, replacesudo systemctl restart lightdmlightdmwithgdm.)
Now let's align the system settings with our low-level tweaks:
- Open System Settings → Mouse & Touchpad
- Drag the Mouse Acceleration slider all the way to the left (disable it entirely—our Xorg config handles acceleration now)
- Adjust the Mouse Speed slider to a comfortable level. You might need to tweak this alongside the
ConstantDecelerationvalue in the Xorg config to get the exact Mac-like feel.
Ubuntu 16.04 uses Compiz as its window compositor. Poor compositor settings can cause mouse flickering or tearing:
- Install the Compiz config tool if you don't have it:
sudo apt install compizconfig-settings-manager - Open it, navigate to General → Compositor
- Set Refresh Rate to your monitor's native rate (usually 60Hz)
- Enable VSync (vertical sync) to eliminate screen tearing and smooth out mouse movement
- If you still see flickering, try disabling unnecessary visual effects (like window animations) to reduce system load—this can help on older hardware even with 8GB RAM.
Give these steps a try one by one, and tweak the values until you get that buttery-smooth Mac-like mouse feel. Most users find the Xorg config adjustment to be the biggest game-changer!
内容的提问来源于stack exchange,提问作者Mazhar Ahmed

