Skip to content

[Bug] Chat Composer stops accepting keyboard input after second generation (Wayland + WebKitGTK) #10012

Closed

Description

@turnpa

Environment

Where are you using Unsloth?

  • Unsloth desktop application
  • Unsloth web UI (unsloth studio)
  • Unsloth CLI
  • Python package or notebook
  • Colab or Kaggle

Operating system and version:
Fedora Linux 44, Wayland session (XDG_SESSION_TYPE=wayland). AppImage build.
webkit2gtk4.1-2.52.5-1.fc44.x86_64
GTK_IM_MODULE and XMODIFIERS are both unset (Fedora default, no ibus configured).

GPU model(s) and accelerator backend:
AMD Radeon RX 9060 XT 16 GiB — AMD ROCm 7.13.99004

Versions:

  • Unsloth: v0.1.804-beta
  • Unsloth package: 2026.8.22
  • Desktop application: 0.1.804-beta
  • llama.cpp: b10687-mix-67dfc8b

What happened?

Steps to reproduce:

  1. Open Unsloth Desktop and start a new chat.
  2. Send any message (e.g. test) and wait for the generation to complete. The Chat Composer still accepts input normally.
  3. Send a second message and wait for that generation to complete.
  4. Try to type in the Chat Composer — keyboard input is no longer registered.
  5. Press Ctrl+V to paste any text — the paste succeeds, and typing works again from that point on.
  6. Alternatively, switch to another conversation in the sidebar and come back — the Composer is usable again.

Expected behavior:
The Chat Composer should keep accepting keyboard input after every completed generation.

Actual behavior:
After the second completed generation in the same conversation, the Composer stops receiving typed characters. It is not disabled: pasting works and restores normal typing, and so does switching conversations and returning. No restart or model reload is required.

The behavior is independent of message size, context length, and model.

Model and operation involved:
Model: unsloth/Qwen3.5-9B-GGUF:UD-Q4_K_XL
Operation: GGUF inference (chat generation via llama.cpp).

Diagnostics and logs

Desktop application

Copy Diagnostics is unavailable — no error, startup, or update screen appears. The application keeps running normally; only keyboard input to the Composer stops working.

tauri.log contains no errors around the failure. The only entries are unrelated warnings (missing HF_TOKEN, ROCm architecture detection, optional torchao libraries). As explained below, the failure happens in the GTK input-method layer beneath the webview and does not surface in Tauri's logs.

Model-specific logs, if applicable

~/.unsloth/studio/logs/llama-server/*.log shows both generations completing cleanly (stop processing for both tasks, normal timings, no errors). The second generation — after which the Composer becomes unusable — behaves identically to the first. This confirms the problem is front-end rather than inference-related.

Additional context

Possibly related to existing work in the project:

The changelog mentions "IME composer hardening", and recent releases include
WebKitGTK workarounds gated by GPU vendor (e.g. disabling the dmabuf renderer on
NVIDIA, and Wayland interface freeze fixes). This report is on an AMD GPU under
Wayland, which may fall outside those existing guards. It may be worth checking
whether the IME composer hardening covers the case where the Composer is
re-rendered at the end of a generation, and whether the Wayland-specific
workarounds should apply regardless of GPU vendor.

This appears to be a WebKitGTK input-method problem on Wayland rather than a Composer state issue.

Pasting works while typing does not. Paste goes through the clipboard and bypasses the GTK input-method layer entirely, so the Composer element is editable in the DOM and the failure is in key event delivery, not a stuck disabled / isGenerating flag.

Two environment variables independently eliminate the bug:

Launch Result
Default (Wayland, no IM module set) Bug reproduces
GTK_IM_MODULE=gtk-im-context-simple No bug
GDK_BACKEND=x11 No bug

That narrows it to the Wayland text-input path in WebKitGTK 2.52.5 — most likely an input-method context that is not reattached after the DOM changes at the end of streaming. It would also explain why switching conversations fixes it: that unmounts and remounts the Composer, forcing a new IM context.

Workaround for other Fedora/Wayland users:

GTK_IM_MODULE=gtk-im-context-simple /path/to/unsloth.appimage

Possible direction for a fix: check whether the Composer element is replaced or re-rendered when a generation completes. Explicitly blurring and refocusing it after generation, or avoiding node replacement in that transition, may be enough to force WebKitGTK to re-establish the input context.

Activity

  1. added
    feature request
    on Aug 30, 2026
  2. danielhanchen commented on Oct 10, 2026

    @danielhanchen
    Member

    Fixed! Sorry on the delay. On Wayland, WebKitGTK delivers every typed key to the page as an input method commit, and a check that stops a just-sent message from reappearing in the chat box treated those keystrokes as leftover text and dropped them until a paste reset it. That check now only applies when an input method word was actually being composed at the moment of sending, fixed in #13222.
    To update: Unsloth Desktop will have an update banner. For Studio, use unsloth studio update. For Docker, use docker exec <container> unsloth-studio-update. Reopen if it still happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfeature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions