V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
wniming
V2EX  ›  Linux

Linux 如何限制笔记本电脑触摸板的大小?

  •  
  •   wniming · 1 天前 · 1843 次点击

    我在 m2 的 macbook air 上使用 asahi linux ,打字时右手手掌经常会因为触摸到触摸板导致光标移动,这部分区域在 macos 系统下之所以不会在打字时误触是因为 macos 使用了一种神经网络算法来判断用户是否在操作触摸板,asahi linux 不太可能开发一套类似效果的算法来解决误触的问题。所以我想通过禁用掉容易误触的这 1/3 的触摸板空间来避免误触。

    PS: 虽然可以在 kde 里设置打字时禁用触摸板,但这会导致触摸板的响应略微变慢

    16 条回复    2025-02-01 15:44:37 +08:00
    wniming
        1
    wniming  
    OP
       1 天前
    我 google 搜到的基本只有一条命令,但是这条命令还报错:

    d@d-macbookair:~$ libinput measure touchpad-size
    libinput: measure is not installed
    d@d-macbookair:~$

    这个报错我搜不到任何相关的帖子,难道就没人研究过怎么更改 linux 笔记本上的触摸板大小吗?
    ronen
        2
    ronen  
       1 天前 via Android
    wniming
        3
    wniming  
    OP
       1 天前
    @ronen 感谢回复,因为 asahi linux 只能使用 wayland ,不支持 x11 ,所以上面的方法不管用
    kagenomirai
        4
    kagenomirai  
       1 天前   ❤️ 1
    @wniming 可选依赖没装完吧,我用 arch 使用 libinput measure 至少要装 libinput python-libevdev 这两个包。
    关于调整 touchpad size : https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html#debugging-touch-size-ranges
    wniming
        5
    wniming  
    OP
       1 天前
    @kagenomirai 感谢回复,我安装了
    libinput-1.27.1-1.fc41.aarch64
    python3-libevdev-0.11-10.fc41.noarch
    这 2 个包,还是一样的报错
    kagenomirai
        6
    kagenomirai  
       1 天前   ❤️ 1
    @wniming 在自己电脑上尝试了一下,还需要安装 libinput-pyudev 。
    不过这和 measure 不能用应该没关系,libinput measure 是到一个编译时的宏 LIBINPUT_TOOL_PATH 下寻找 libinput-measure 这个可执行文件来执行的。在我的电脑上 LIBINPUT_TOOL_PATH 就是 /usr/lib/libinput 。你可搜索一下看看系统有没有 libinput-measure 这个可执行文件。
    不过 libinput measure 只是个 debug 工具,似乎做不到调整触摸板的大小,我没细读 libinput 的文档。感觉有点太折腾了,我是直接开启输入时禁用触摸板,swaywm 下没有感觉响应变慢,可能是 kde 的 bug 。
    whenov
        7
    whenov  
       1 天前 via Android
    libinput 有个选项叫 DisableWhileTyping 你可以查查
    whenov
        8
    whenov  
       1 天前 via Android
    cond0r
        9
    cond0r  
       1 天前
    问一句题外话 asahi linux 表现咋样,有没有啥 bug ,gpu 加速啥的能正常用么 跑 ollama 啥的
    wniming
        10
    wniming  
    OP
       1 天前
    @kagenomirai 确实是缺少 libinput-measure 这个导致的,安装 libinput-utils 就好了。

    触摸板反应慢这个不是 kde 的 bug ,是因为输入时禁用触摸板这种做法本身就需要短暂的禁用触摸板,而我在快速操作时能感觉出来触摸板被禁用了,有些影响使用体验。
    wniming
        11
    wniming  
    OP
       1 天前   ❤️ 1
    @cond0r 我不玩 ai ,没试过能不能跑 ollama ,现在最新的 asahi linux 的 gpu 驱动运行 kde 桌面是很流畅的,23 年的时候还会时不时因为 gpu 驱动的问题导致整个系统卡死,现在至少没有这种严重的问题了,目前最影响我使用体验的是缺少 gpu 硬件编解码加速支持,这会导致在使用 moonlight 串流时的表现不好,也无法用 sunshine 来让其他的机器串流到 asahi linux 机器上。

    asahi linux 我遇到的问题主要有这些:

    无线网卡用时间长了还是会遇到断网问题,必须关闭 wifi 再打开,不过不是很常遇到,这种情况发生时内核也会报错:
    [ 1393.733134] ieee80211 phy0: brcmf_p2p_set_firmware: failed to update device address ret -52
    [ 1393.733822] ieee80211 phy0: brcmf_p2p_create_p2pdev: set p2p_disc error
    [ 1393.733827] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlp1s0f type 10 failed: err=-52


    屏幕从睡眠状态下唤醒后有时会卡住几秒,内核也会有一些报错信息,但不严重,不影响使用。


    内核会有一些我也不知道是啥问题的报错,我没管这些,不影响使用,比如:
    [ 12.669278] apple-drm soc:display-subsystem: Plane operation would have crashed DCP! Rejected!
    DCP requires 32x32 of every plane to be within screen space.
    Your compositor asked to overlay [952x1583, 1008x1600] on 2560x1600.
    This is not supported, and your compositor should have
    switched to software compositing when this operation failed.
    You should not have noticed this at all. If your screen
    froze/hitched, or your compositor crashed, please report
    this to the your compositor's developers. We will not
    throw this error again until you next reboot.
    wniming
        12
    wniming  
    OP
       1 天前
    @wniming #11 补充一点:

    合盖状态下待机时的功耗也比 macos 高了不少,但还处在能接受的范围内
    SiLenceControL
        13
    SiLenceControL  
       1 天前
    (侧面衬托 macOS 这个设计真的好
    cond0r
        14
    cond0r  
       1 天前
    @wniming #12 明白了 感谢
    james122333
        15
    james122333  
       23 小时 40 分钟前 via Android
    不要使用触摸板 全禁
    位置本来就很尴尬
    gogocome
        16
    gogocome  
       4 小时 15 分钟前
    我在 Mac 里也经常误触啊
    之前用 air 还好,换成了 16 寸 pro,经常误触而且没找到软件办法
    后来买了一些绝缘贴纸遮住了一部分
    但是还是没 air 好用.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1998 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:00 · PVG 20:00 · LAX 04:00 · JFK 07:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.