You are not logged in.

#1 2024-03-11 10:06:42

tlss
Member
Registered: 2024-03-11
Posts: 2

[SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

After updating to KDE 6, I switched virtual keyboard from "Fcitx 5" to "Fcitx 5 Wayland Launcher (Experimental)". I found fcitx5 can not input chinese in terminal and brave browser.
After login, Fcitx outputs the infomation:

Fcitx should be launched by KWin under KDE Wayland in order to use Wayland input method frontend. This can improve the experience when using Fcitx on  Wayland. To configure this, you need to go to "System Settings" -> "Virtual keyboard" and select "Fcitx 5" from it. You may also need to disable tools that launches input method, such as imsettings on Fedora, or im-config on Debian/Ubuntu. For more details see https://fcitx-im.org/wiki/Using_Fcitx_5 … KDE_Plasma

Before updating, I use the "Fcitx 5" as virtual keyboard, it works fine in both terminal and brave browser.
I switched to "Fcitx5" and log out, still not working.
I tested in vscode, and found that fcitx5 works fine in vscode.
I tested run brave with "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime", still not working.

Environment variables:
Only set  XMODIFIERS=@im=fcitx
Not set GTK_IM_MODULE & QT_IM_MODULE

fcitx5-diagnose output:

# System Info:
1.  `uname -a`:

        Linux arch 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024 01:59:01 +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:

    Desktop environment is `kde`.

6.  XDG SESSION TYPE:

        XDG_SESSION_TYPE='wayland'

7.  Bash Version:

        BASH_VERSION='5.2.26(1)-release'

# Environment:
1.  DISPLAY:

        DISPLAY=':0'


        WAYLAND_DISPLAY='wayland-0'

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
            POSIX
            en_US.utf8
            zh_CN.utf8

    2.  Current locale:

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

4.  Directories:

    1.  Home:

            /home/tlss

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is set to `/home/tlss/.config`.

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

    3.  Fcitx5 Settings Directory:

        Current fcitx5 settings directory is `~/.dotfiles/.config/fcitx5` (`/home/tlss/.config/fcitx5`).

5.  Current user:

    The script is run as tlss (1000).

# Fcitx State:
1.  executable:

    Found fcitx5 at `/usr/bin/fcitx5`.

2.  version:

    Fcitx version: `5.1.8`

3.  process:

    Found 1 fcitx5 process:

          25922 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.240`.

    PID of DBus name `org.fcitx.Fcitx5` owner is `25922`.

    Debug information from dbus:

           Group [wayland:] has 0 InputContext(s)
        Group [x11::0] has 2 InputContext(s)
          IC [9860d847102e45929014130577226f72] program:code frontend:dbus cap:6000000032 focus:0
          IC [324d0e3ef54a4588bb255b903b19c6ec] program:cfw frontend:dbus cap:6000000032 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}`:

    Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
    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.

3.  XIM encoding:

    **Your LC_CTYPE is set to C whose encoding is not UTF-8. You may have trouble committing strings using XIM.**

## 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](http://fcitx-im.org/wiki/Input_method_r … _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](http://fcitx-im.org/wiki/Input_method_r … _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=QtWaylandClient::QWaylandInputContext

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](http://fcitx-im.org/wiki/Input_method_r … _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 im module for qt6: `/usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.
    Found unknown fcitx qt module: `/usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_fcitx5.so`.
    Found fcitx5 im module for qt: `/usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.
    Found fcitx5 qt6 module: `/usr/lib/fcitx5/qt6/libfcitx-quickphrase-editor5.so`.
    Found fcitx5 qt5 module: `/usr/lib/fcitx5/qt5/libfcitx-quickphrase-editor5.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](http://fcitx-im.org/wiki/Input_method_r … _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:



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.41` at `/usr/bin/gtk-query-immodules-3.0`.
        Version Line:

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

        Found fcitx5 im modules for gtk `3.24.41`.

            "/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.41` 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.41

        Found fcitx5 im modules for gtk `3.24.41`.

            "/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 27 enabled addons:

            Simplified and Traditional Chinese Translation 5.1.4
            Classic User Interface 5.1.8
            Clipboard 5.1.8
            Cloud Pinyin 5.1.4
            DBus 5.1.8
            DBus Frontend 5.1.8
            Emoji 5.1.8
            Fcitx4 Frontend 5.1.8
            Full width character 5.1.4
            IBus Frontend 5.1.8
            Input method selector 5.1.8
            Keyboard 5.1.8
            KDE Input Method Panel 5.1.8
            Status Notifier 5.1.8
            Notification 5.1.8
            Pinyin 5.1.4
            Extra Pinyin functionality 5.1.4
            Punctuation 5.1.4
            Quick Phrase 5.1.8
            Spell 5.1.8
            Table 5.1.4
            Unicode 5.1.8
            DBus Virtual Keyboard 5.1.8
            Wayland 5.1.8
            Wayland Input method frontend 5.1.8
            XCB 5.1.8
            X Input Method Frontend 5.1.8

    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/tlss/.config/fcitx5/profile`:

        [Groups/0]
        # Group Name
        Name=默认
        # Layout
        Default Layout=us
        # Default Input Method
        DefaultIM=keyboard-us

        [Groups/0/Items/0]
        # Name
        Name=pinyin
        # Layout
        Layout=

        [Groups/0/Items/1]
        # Name
        Name=keyboard-us
        # Layout
        Layout=

        [GroupOrder]
        0=默认

# Log:
1.  `date`:

        Mon Mar 11 18:03:19 CST 2024

2.  `/home/tlss/.config/fcitx5/crash.log`:

    `/home/tlss/.config/fcitx5/crash.log` not found.

Last edited by tlss (2024-03-11 15:07:02)

Offline

#2 2024-03-11 15:06:24

tlss
Member
Registered: 2024-03-11
Posts: 2

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

I found the solution:
1. Manually close the fcitx5 in the tray.
2. Select "Fcitx 5" as virtual keyboard
3. Log out and log in

Reproduce the problem:
1. Select "None" as virtual keyboard
2. Log out and log in

Offline

#3 2024-03-29 12:18:45

Scarecrow928
Member
Registered: 2021-12-13
Posts: 6

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

+1. I upgrade from kde 5 to 6, and fcitx5 works fine for about 2 weeks? then in this week, after upgrading some packages my fcitx5 is broken in any browser and vscode.

I have tried your solution, select "Fcitx 5" as virtual keyboard and re-login, but no luck. now I can't even reply in Chinese ?

Last edited by Scarecrow928 (2024-03-29 12:20:32)

Offline

#4 2024-03-29 16:02:35

seth
Member
Registered: 2012-09-03
Posts: 51,655

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

This is most likely unrelated and a bug in libx11, https://bbs.archlinux.org/viewtopic.php?id=294301

Online

#5 2024-03-30 01:55:17

Scarecrow928
Member
Registered: 2021-12-13
Posts: 6

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

seth wrote:

This is most likely unrelated and a bug in libx11, https://bbs.archlinux.org/viewtopic.php?id=294301

thanks, downgrade the libx11 to 1.8.7 then input works fine

pacman -U https://archive.archlinux.org/packages/l/libx11/libx11-1.8.7-1-x86_64.pkg.tar.zst

Offline

#6 2024-03-31 23:14:52

yorkz
Member
Registered: 2020-03-22
Posts: 32

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

I can input Chinese in Brave, but not in Firefox

Offline

#7 2024-04-01 14:38:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,768

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

Current version 1.8.8-3 is supposed to contain the revert for the issue.

yorkz assuming a wayland session this will come down to differences on xwayland and wayland and is somewhat out of scope here, I suggest you open a new thread

Offline

#8 2024-04-15 03:48:01

npreining
Member
Registered: 2023-03-06
Posts: 22

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

I just returned form a trip, updated the whole system (lots of bunch after 1 week), and now FCITX5 is dead.
No reaction, despite having libx11 1.8.9 and everything up to date.
Rebooted several times.

This is KDE/PLasma session on top of X11 with nvidia graphics card.

In the terminal konsole nothing works

In kate I can switch to MOZC via the mouse (but not Ctrl-space) but no hiragana/kanji show up, only Roman letters

Offline

#9 2024-04-15 06:33:44

seth
Member
Registered: 2012-09-03
Posts: 51,655

Re: [SOLVED] Fcitx5 can not input chinese in terminal and brave browser.

As pointed out, #3 is unlikely related to the OP

and now FCITX5 is dead

Process/service status?
Errors in the journal?
Does the workaround in #2 work for you as well?

Edit: #8 has a crosspost with actual information in https://bbs.archlinux.org/viewtopic.php?id=294898

Last edited by seth (2024-04-15 06:41:13)

Online

Board footer

Powered by FluxBB