fcitx/fcitx5

Fcitx5 lagging

Opened this issue · 5 comments

Summary

I have reported this problem before but it seems like the solution doesn't fully fix it. I will leave a link to the video (it is quite big > 30Mbs so I can't put it here). The problem is, every time I use fcitx, the little box displays which kind of input I'm using is flies to the corner of the window, and after that, I will only have one input available to type yet the other one will freeze my input. But when I open OBS to record that, it is just fixed somehow????
Link to the video

Steps to Reproduce

Right after turning on fcitx5

Expected Behavior

One of your inputs will be frozen when the little box to show which input you are using will fly to the corner of the window

Output of fcitx5-diagnose command

System Info:

  1. uname -a:

    Linux arch 6.9.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 x86_64 GNU/Linux
    
  2. lsb_release:

    lsb_release not found.

  3. /etc/lsb-release:

    /etc/lsb-release not found.

  4. /etc/os-release:

    NAME="Arch Linux"
    PRETTY_NAME="Arch Linux"
    ID=arch
    BUILD_ID=rolling
    ANSI_COLOR="38;2;23;147;209"
    HOME_URL="https://archlinux.org/"
    DOCUMENTATION_URL="https://wiki.archlinux.org/"
    SUPPORT_URL="https://bbs.archlinux.org/"
    BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
    PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
    LOGO=archlinux-logo
    
  5. Desktop Environment:

    Cannot determine desktop environment.

  6. XDG SESSION TYPE:

    XDG_SESSION_TYPE='wayland'
    
  7. Bash Version:

    BASH_VERSION='5.2.26(1)-release'
    

Environment:

  1. DISPLAY:

    DISPLAY=':1'
    
    
    WAYLAND_DISPLAY='wayland-1'
    
  2. Keyboard Layout:

    1. setxkbmap:

      WARNING: Running setxkbmap against an Xwayland server
      xkb_keymap {
      	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
      	xkb_types     { include "complete"	};
      	xkb_compat    { include "complete"	};
      	xkb_symbols   { include "pc+us+inet(evdev)"	};
      	xkb_geometry  { include "pc(pc105)"	};
      };
      
    2. xprop:

      _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""
      
  3. Locale:

    1. All locales:

      C
      C.utf8
      en_US.utf8
      POSIX
      
    2. Current locale:

      LANG=en_US.UTF-8
      LC_CTYPE="en_US.UTF-8"
      LC_NUMERIC="en_US.UTF-8"
      LC_TIME="en_US.UTF-8"
      LC_COLLATE="en_US.UTF-8"
      LC_MONETARY="en_US.UTF-8"
      LC_MESSAGES="en_US.UTF-8"
      LC_PAPER="en_US.UTF-8"
      LC_NAME="en_US.UTF-8"
      LC_ADDRESS="en_US.UTF-8"
      LC_TELEPHONE="en_US.UTF-8"
      LC_MEASUREMENT="en_US.UTF-8"
      LC_IDENTIFICATION="en_US.UTF-8"
      LC_ALL=
      
  4. Directories:

    1. Home:

      /home/duckgogo
      
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is not set.

      Current value of XDG_CONFIG_HOME is ~/.config (/home/duckgogo/.config).

    3. Fcitx5 Settings Directory:

      Current fcitx5 settings directory is ~/.config/fcitx5 (/home/duckgogo/.config/fcitx5).

  5. Current user:

    The script is run as duckgogo (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.1.10

  3. process:

    Found 1 fcitx5 process:

      96495 fcitx5
    
  4. fcitx5-remote:

    fcitx5-remote works properly.

  5. DBus interface:

    Using dbus-send to check dbus.

    Owner of DBus name org.fcitx.Fcitx5 is :1.15.

    PID of DBus name org.fcitx.Fcitx5 owner is 96495.

    Debug information from dbus:

       Group [x11::1] has 3 InputContext(s)
      IC [9e77f86f79d242738cc12f6918a9d661] program:discord frontend:dbus cap:6000000032 focus:0
      IC [2c76df287ba04d4aae455eb64640a4e1] program:microsoft-edge frontend:dbus cap:6000000032 focus:0
      IC [0f70d3c1bcdd443fa1163708ab6ef459] program:microsoft-edge frontend:dbus cap:6000000032 focus:0
    Group [wayland:] has 4 InputContext(s)
      IC [9fe4df3e5dde4453b796183b2cec0fe5] program:kitty frontend:wayland_v2 cap:100000072 focus:1
      IC [b0012025a0e84ac397597ffa6c7c4cf4] program:jetbrains-studio frontend:wayland_v2 cap:100000072 focus:0
      IC [892fd0558da4477294c3009135b7159c] program:Microsoft-edge frontend:wayland_v2 cap:100000072 focus:0
      IC [229ae47e660a4999bc9095bcafb458f4] program: frontend:wayland_v2 cap:100000072 focus:0
    Input Context without group
    

Fcitx Configure UI:

  1. Config Tool Wrapper:

    Found fcitx5-configtool at /usr/bin/fcitx5-configtool.

  2. Config GUI for qt:

    Found fcitx5-config-qt at /usr/bin/fcitx5-config-qt.

  3. Config GUI for kde:

    kcmshell5 not found.

Frontends setup:

The environment variable checked by this script only shows the environment under current shell. It is still possible that you did not set the environment to the whole graphic desktop session. You may inspect the actual environment variable of a certain process by using xargs -0 -L1 /proc/$PID/environ for a certain process that you find not working.

Xim:

  1. ${XMODIFIERS}:

    XMODIFIERS is not set

    Please set environment variable XMODIFIERS to "@im=fcitx" using the tool your distribution provides or add export XMODIFIERS=@im=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: XMODIFIERS.
    Xim Server Name from Environment variable is fcitx.

  2. XIM_SERVERS on root window:

    Xim server name is the same with that set in the environment variable.

Qt:

  1. qt4 - ${QT4_IM_MODULE}:

    Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: QT_IM_MODULE.

    fcitx5-qt4-immodule-probing not found.

  2. qt5 - ${QT_IM_MODULE}:

    Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: QT_IM_MODULE.

    It is OK to use qt5 built-in Wayland im module if your compositor fully supports text-input protocol used by qt5.

    Using fcitx5-qt5-immodule-probing to check the actual im module to be used under current environment:

    QT_QPA_PLATFORM=wayland
    QT_IM_MODULE=
    IM_MODULE_CLASSNAME=QComposeInputContext
    
  3. qt6 - ${QT_IM_MODULE}:

    Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: QT_IM_MODULE.

    It is OK to use qt6 built-in Wayland im module if your compositor fully supports text-input protocol used by qt6.

    Using fcitx5-qt6-immodule-probing to check the actual im module to be used under current environment:

    QT_QPA_PLATFORM=wayland
    QT_IM_MODULE=
    IM_MODULE_CLASSNAME=QtWaylandClient::QWaylandInputContext
    
  4. Qt IM module files:

    Found fcitx5 qt5 module: /usr/lib/fcitx5/qt5/libfcitx-quickphrase-editor5.so.
    Found fcitx5 qt6 module: /usr/lib/fcitx5/qt6/libfcitx-quickphrase-editor5.so.
    Found unknown fcitx qt module: /usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_fcitx5.so.
    Found fcitx5 im module for qt6: /usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Found fcitx5 im module for qt: /usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.

    Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
    Cannot find fcitx5 input method module for Qt4.

Gtk:

  1. gtk - ${GTK_IM_MODULE}:

    Please set environment variable GTK_IM_MODULE to "fcitx" using the tool your distribution provides or add export GTK_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: GTK_IM_MODULE.

    It is OK to use gtk built-in Wayland im module if your compositor fully supports text-input protocol used by gtk.

    Using fcitx5-gtk2-immodule-probing to check the actual im module to be used under current environment:

    Using fcitx5-gtk3-immodule-probing to check the actual im module to be used under current environment:

    GTK_IM_MODULE=wayland
    

    Using fcitx5-gtk4-immodule-probing to check the actual im module to be used under current environment:

    GTK_IM_MODULE=wayland
    
  2. gtk-query-immodules:

    1. gtk 2:

      Cannot find gtk-query-immodules for gtk 2

      Cannot find fcitx5 im module for gtk 2.

    2. gtk 3:

      Found gtk-query-immodules for gtk 3.24.42 at /usr/bin/gtk-query-immodules-3.0.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.42
      

      Found fcitx5 im modules for gtk 3.24.42.

      "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      
  3. Gtk IM module cache:

    1. gtk 2:

      Cannot find immodules cache for gtk 2

      Cannot find fcitx5 im module for gtk 2 in cache.

    2. gtk 3:

      Found immodules cache for gtk 3.24.42 at /usr/lib/gtk-3.0/3.0.0/immodules.cache.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.42
      

      Found fcitx5 im modules for gtk 3.24.42.

      "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      
  4. Gtk IM module files:

    1. gtk 2:

      All found Gtk 2 immodule files exist.

    2. gtk 3:

      All found Gtk 3 immodule files exist.

    3. gtk 4:

      All found Gtk 4 immodule files exist.

Configuration:

Fcitx Addons:

  1. Addon Config Dir:

    Found fcitx5 addon config directory: /usr/share/fcitx5/addon.

  2. Addon List:

    1. Found 21 enabled addons:

      Bamboo Wrapper For Fcitx 1.0.6
      Classic User Interface 5.1.10
      Clipboard 5.1.10
      DBus 5.1.10
      DBus Frontend 5.1.10
      Emoji 5.1.10
      Fcitx4 Frontend 5.1.10
      IBus Frontend 5.1.10
      Input method selector 5.1.10
      Keyboard 5.1.10
      KDE Input Method Panel 5.1.10
      Status Notifier 5.1.10
      Notification 5.1.10
      Quick Phrase 5.1.10
      Spell 5.1.10
      Unicode 5.1.10
      DBus Virtual Keyboard 5.1.10
      Wayland 5.1.10
      Wayland Input method frontend 5.1.10
      XCB 5.1.10
      X Input Method Frontend 5.1.10
      
    2. Found 0 disabled addons:

  3. Addon Libraries:

    All libraries for all addons are found.

  4. User Interface:

    Found 3 enabled user interface addons:

    Classic User Interface
    KDE Input Method Panel
    DBus Virtual Keyboard
    

Input Methods:

  1. /home/duckgogo/.config/fcitx5/profile:

    [Groups/0]
    # Group Name
    Name=Default
    # Layout
    Default Layout=us
    # Default Input Method
    DefaultIM=bamboo
    
    [Groups/0/Items/0]
    # Name
    Name=keyboard-us
    # Layout
    Layout=
    
    [Groups/0/Items/1]
    # Name
    Name=bamboo
    # Layout
    Layout=
    
    [GroupOrder]
    0=Default
    

Log:

  1. date:

    Thu Jun 13 11:41:37 AM +07 2024
    
  2. /home/duckgogo/.config/fcitx5/crash.log:

    =========================
    Fcitx 5.1.10 -- Get Signal No.: 6
    Date: try "date -d @1716257918" if you are using GNU date ***
    ProcessID: 740
    fcitx5(+0xecc4)[0x56f441706cc4]
    /usr/lib/libc.so.6(+0x3cae0)[0x7ab747a50ae0]
    /usr/lib/libc.so.6(+0x94e44)[0x7ab747aa8e44]
    /usr/lib/libc.so.6(gsignal+0x20)[0x7ab747a50a30]
    /usr/lib/libc.so.6(abort+0xdf)[0x7ab747a384c3]
    /usr/lib/libstdc++.so.6(_ZNSt6chrono3_V212system_clock3nowEv+0x0)[0x7ab747cd2d60]
    /usr/lib/fcitx5/libwaylandim.so(+0x28142)[0x7ab745bcb142]
    /usr/lib/fcitx5/libwaylandim.so(+0x38883)[0x7ab745bdb883]
    /usr/lib/libffi.so.8(+0x7596)[0x7ab747109596]
    /usr/lib/libffi.so.8(+0x400e)[0x7ab74710600e]
    /usr/lib/libffi.so.8(ffi_call+0x123)[0x7ab747108bd3]
    /usr/lib/libwayland-client.so.0(+0x7645)[0x7ab747173645]
    /usr/lib/libwayland-client.so.0(+0x7e73)[0x7ab747173e73]
    /usr/lib/libwayland-client.so.0(wl_display_dispatch_queue_pending+0x7c)[0x7ab74717413c]
    /usr/lib/fcitx5/libwayland.so(+0x1cf6a)[0x7ab7471b9f6a]
    /usr/lib/libFcitx5Utils.so.2(+0x3c0ac)[0x7ab7481010ac]
    /usr/lib/libFcitx5Utils.so.2(+0x32021)[0x7ab7480f7021]
    /usr/lib/libsystemd.so.0(+0x8459a)[0x7ab747f9e59a]
    /usr/lib/libsystemd.so.0(sd_event_dispatch+0x13b)[0x7ab747f9e90b]
    /usr/lib/libsystemd.so.0(sd_event_run+0x119)[0x7ab747fa0f29]
    /usr/lib/libsystemd.so.0(sd_event_loop+0x68)[0x7ab747fa1108]
    /usr/lib/libFcitx5Utils.so.2(_ZN5fcitx9EventLoop4execEv+0x16)[0x7ab7480f3326]
    /usr/lib/libFcitx5Core.so.7(_ZN5fcitx8Instance4execEv+0x64)[0x7ab7481cd234]
    fcitx5(+0xd134)[0x56f441705134]
    /usr/lib/libc.so.6(+0x25c88)[0x7ab747a39c88]
    /usr/lib/libc.so.6(__libc_start_main+0x8c)[0x7ab747a39d4c]
    fcitx5(+0xe565)[0x56f441706565]
    

Warning: the output of fcitx5-diagnose contains sensitive information, including the distribution name, kernel version, name of currently running programs, etc.

Though such information can be helpful to developers for diagnostic purpose, please double check and remove as necessary before posting it online publicly.

I think the problem is fcitx5 conflicts with cliphist from hyprland

Nah that isn't the problem

Can you update to stable 5.1.10 and test again? From your backtrace I think you might be running the your own fcitx5-git or sth.

Ye I'm currently using version 5.1.10. But I reinstalled the system and removed cliphist then it works smoothly although sometimes it also breaks down.

wengxt commented

I'm not sure how cliphist may affect here, but fcitx does also monitor clipboard (Only one way monitoring) for its own clipboard history feature.

If somehow, due to cliphist there was a message loop, that might be the cause.
But based on the protocol, I currently do not have an idea on how that could happen. You may want to run WAYLAND_DEBUG=1 fcitx5 and see if there's any suspicious message loop. (Including other issues you saw, mainly focus on the data offer, text_input messages)