我发现了问题,Ubuntu24.04安装inputLeap或者deskFlow这类一套键盘和鼠标,控...

Создано: 26 декабря 2025 г.

Отвечено с использованием GPT-5.2 Thinking от Chat01

Вопрос

我发现了问题,Ubuntu24.04安装inputLeap或者deskFlow这类一套键盘和鼠标,控制两台电脑的软件,点击软件中的reload时会让Ubuntu崩溃 桌面无响应,但是我使用XUbuntu24.04就没有这个问题.是兼容性问题么

Мысль

Clarifying crash reasons and session type

GitHub discussions mention that libportal 0.7 lacks input capture on Wayland, and libportal 0.8 could solve it. The crash is likely tied to GNOME's Wayland session, rather than compatibility issues. When "reload" is clicked, it restarts processes, causing a freeze. I'll suggest switching to Xorg and verify the session type.

Providing alternatives and stability tips

To keep stability in GNOME, switching to Xorg or installing XFCE works best. For Deskflow, using the latest flatpak might offer better stability and Wayland support, but it still uses portals. Alternatively, using Barrier with Xorg can help, or even a hardware KVM. I also suggest disabling GNOME extensions to avoid conflicts. It’s a compatibility issue between GNOME Wayland and certain apps on Ubuntu 24.04, but Xubuntu works fine with Xorg.

Explaining crash and offering simple steps

The crash happens due to GNOME on Wayland. To fix it, use the Xorg session on Ubuntu 24.04. You can select "Ubuntu on Xorg" during login or disable Wayland (WaylandEnable=false). On Wayland, input injection is restricted, so apps need updated protocols, which aren’t fully supported. Reloading may cause GNOME to freeze, so check logs with journalctl and report upstream.

I’ll make sure to cite sources where necessary for this information.

Final answer without questioning

For Ubuntu 24.04 Desktop (GNOME), the default session is Wayland, but InputLeap/Deskflow rely on X11. Wayland's support is still incomplete/experimental, which can cause crashes.

To resolve:

  1. Confirm session type with echo $XDG_SESSION_TYPE.
  2. Switch to Xorg: Log out > Gear icon > "Ubuntu on Xorg" or disable Wayland through /etc/gdm3/custom.conf and reboot.
  3. If keeping Wayland, try Deskflow flatpak or continuous build. Ensure required libraries are installed.

Thought for 57s

Ответ

很像是 Wayland / Xorg 的兼容性差异,而不单纯是“Ubuntu 24.04 不兼容”这种泛泛的说法。

为什么 Ubuntu 24.04(GNOME)会崩、Xubuntu 24.04(XFCE)却没事?

  • Ubuntu 24.04 桌面版(GNOME)默认登录的是 Wayland
  • Xubuntu 24.04 基本上是 Xorg (X11) 会话。
  • 这类“共享一套键鼠控制多台电脑”的软件(InputLeap/Deskflow/Barrier/Synergy 系)在 Wayland 下要么不工作、要么依赖较新的 portal/libei/libportal 组件,而且不少情况下仍处于“能跑但不稳/功能不全”的状态;甚至有人反馈在 Ubuntu 24.04 的 Wayland 下会把系统/会话搞挂。(Ubuntu Handbook)
  • Deskflow 官方也明确提到:如果要 Wayland 支持,会受到 libportal 版本、以及 Input Capture / Remote Desktop portal 是否可用的影响;他们在讨论里还提到 Ubuntu 24.04 的 libportal(0.7)缺少 input capture 等能力,因此需要额外处理/静态链接更高版本 libportal 才能完整支持。(GitHub)

你描述的“点软件里的 reload 之后 GNOME 桌面无响应”,非常符合:Wayland 会话下重新初始化输入注入/捕获链路时触发 GNOME/Mutter/portal 侧的 bug 或崩溃(表现为桌面卡死或整段会话挂掉)。


最直接的解决办法(推荐)

方案 A:在 Ubuntu 24.04 上改用 Xorg 会话

  1. 先确认你现在是不是 Wayland:

    bash
    echo $XDG_SESSION_TYPE

    输出 wayland 就是 Wayland,会更容易踩到这类问题。

  2. 切换到 Xorg:

    • 注销(Log out)
    • 在登录界面选用户后,点右下角/齿轮图标
    • “Ubuntu on Xorg” 再登录

很多人对 InputLeap 的建议就是:Ubuntu 24.04+ 用 Xorg 更稳,Wayland 可能直接崩。(Ubuntu Handbook)

方案 B:彻底禁用 Wayland(可选)

如果你希望“以后都别进 Wayland”:

bash
sudo nano /etc/gdm3/custom.conf

把(或新增)这一行取消注释并设为:

ini
WaylandEnable=false

保存后重启。


如果你坚持要用 Wayland:现实情况 & 可尝试方向

Wayland 下要“正经做键鼠共享”,通常需要:

  • 桌面环境/合成器支持(GNOME、KDE 有各自进展)
  • 正确的 xdg-desktop-portal 后端
  • Deskflow 这类软件还需要较新的 libportal / libei 与 Input Capture / Remote Desktop portal 配合
    这些限制在 Deskflow 的 Wayland 讨论与已知问题里写得很直白。(GitHub)

可以尝试的方向(不保证一定稳):

  • Flatpak 版 Deskflow(有时比 .deb 更容易把依赖对齐)(Flathub - Apps for Linux)
  • 用 Deskflow 的较新版本/持续构建版(他们在讨论里提到过不同版本与依赖的取舍)(GitHub)

但就“稳定性/省心”来说:多机键鼠共享在 Linux 上目前仍是 Xorg 更稳


建议你顺手做一次定位(方便确认就是它导致的)

崩溃/卡死后重启,马上看上一轮启动的错误日志:

bash
journalctl -b -1 -p err..alert --no-pager | tail -n 200

如果看到 gnome-shell / mutter / xdg-desktop-portal / libei 相关报错,基本就坐实是 Wayland 输入链路被“reload”触发的问题。


如果你告诉我:你用的是 InputLeap 还是 Deskflow、安装来源(apt / deb / flatpak)以及 echo $XDG_SESSION_TYPE 的输出,我可以按你的具体组合给你一个“最稳配置清单”(比如:Xorg + 哪个版本更不容易出事、哪些设置先关掉)。

Поделиться этим Q&A