Skip to content

fcitx5-lotus không tự kích hoạt uinput server sau khi cài đặt trên Ubuntu 24.04 (X11), gây lỗi duplicate/delay ký tự khi gõ #274

@risky2k1

Description

@risky2k1

Mô tả lỗi

Sau khi cài đặt fcitx5-lotus theo hướng dẫn chính thức, bộ gõ hoạt động không ổn định trên X11.

Khi gõ tiếng Việt bằng Telex:

  • ký tự bị nhân đôi
  • commit bị delay
  • nhấn space không commit ngay
  • một phần text xuất hiện muộn

Ví dụ:

Khi gõ:

test thu phat xem sao

kết quả thực tế:

tessttét thuwwrrử phassttát xem sao

Qua debug thì nguyên nhân có vẻ là fcitx5-lotus-server không tự được enable/start sau khi cài package .deb, mặc dù docs có ghi post-install script sẽ tự kích hoạt server.

Frontend Lotus vẫn load bình thường nhưng không thể connect tới uinput server.

Các bước tái hiện

  1. Cài đặt fcitx5-lotus theo docs:
    CODENAME=$(grep '^UBUNTU_CODENAME=' /etc/os-release | cut -d'=' -f2)

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://fcitx5-lotus.pages.dev/pubkey.gpg
| sudo gpg --dearmor -o /etc/apt/keyrings/fcitx5-lotus.gpg

echo "deb [signed-by=/etc/apt/keyrings/fcitx5-lotus.gpg] https://fcitx5-lotus.pages.dev/apt/$CODENAME $CODENAME main"
| sudo tee /etc/apt/sources.list.d/fcitx5-lotus.list

sudo apt update
sudo apt install -y fcitx5-lotus

  1. Restart fcitx5:
    fcitx5 -r

  2. add biến vào bash script + logout -> Chuyển sang bộ gõ Lotus

  3. Gõ:

test thử phát xem sao

  1. Lỗi xuất hiện:

duplicate ký tự
commit delay
Telex hoạt động không ổn định

Kết quả mong đợi

Sau khi cài package:

  • fcitx5-lotus-server nên tự được enable/start
  • typing hoạt động bình thường
  • Telex commit realtime và không duplicate ký tự

Kết quả thực tế

fcitx5-lotus-server không chạy sau khi cài package.

Debug log:

Failed to connect to socket: Connection refused
Cannot connect to uinput server
Replacement timeout (200ms). Falling back to commit.

Typing bị:

  • duplicate key
  • delayed commit
  • fallback commit không ổn định

Sau khi manually chạy:

sudo systemctl enable --now fcitx5-lotus-server@$(whoami).service

và add thủ công user vào group

sudo usermod -aG input $USER

và reboot thì lỗi biến mất.

Có vẻ post-install script không enable được user service trong môi trường của mình.

Phiên bản fcitx5-lotus

v3.0.3

Cách cài đặt

AUR (fcitx5-lotus)

Hệ điều hành / Distro

Ubuntu 24.04 LTS

Môi trường Desktop

GNOME

Kiểu gõ

Telex

Diagnose

fcitx5-diagnose cho thấy Lotus đã được add đúng vào profile:

DefaultIM=lotus

Nhưng:

systemctl --user list-units | grep lotus

không trả về service nào sau khi cài package.

Log của Uinput server

Không có vì service không tự start.

Log của fcitx5

Relevant errors:

Failed to connect to socket: Connection refused
Cannot connect to uinput server
Need fallback commit
Replacement timeout (200ms). Falling back to commit.

Thông tin bổ sung

/dev/uinput tồn tại:

crw-rw----+ root input

Sau khi add user vào group input và manually enable service thì mọi thứ hoạt động bình thường.

Có thể post-install script chưa handle đúng systemd user session trên Ubuntu GNOME X11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions