用 xinput 微调鼠标速度与加速度

用 xinput 按设备设置 libinput Accel Speed,比桌面滑块更精细地控制指针速度。

Linux桌面xinput 输入设备输入设备鼠标低风险
运行 `xinput set-prop "<设备名>" "libinput Accel Speed" -0.5` 即可调慢指针(取值 -1 到 1)。

01命令

命令
$ xinput set-prop "pointer" "libinput Accel Speed" -0.5

02作用说明

先用 `xinput list` 找到准确的设备名,再运行 `xinput list-props "设备"` 查看所有可调属性——包括 'libinput Accel Speed'(指针速度,-1 慢到 1 快)和 'libinput Natural Scrolling Enabled'(反转滚轮方向)。设置立即生效但不持久,可写入开机自启脚本。注意这是 X11 专属:Wayland 会话下 xinput 无法修改设备属性。

03风险

风险低风险
使用条件xinput and the X11 session (does not affect Wayland, which needs desktop settings or a libinput config). List devices first: `xinput list`; list properties: `xinput list-props "device name"`.
!注意: 在 Wayland(新版 GNOME 的默认)下,xinput list 可能仍显示设备,但 set-prop 无效——请使用桌面设置或改登 Xorg 会话。

04撤销

撤销
$ xinput set-prop "pointer" "libinput Accel Speed" 0

05来源

  • xinput(1) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    依据: xinput set-prop changes an input device property such as libinput Accel Speed; xinput list enumerates devices and list-props shows available properties.

最后验证: 2026-09-18 · 分类: 系统与设置