fcitx / fcitx5

maybe a new fcitx.
1.6k stars 118 forks source link

x11 popup box on wrong display with a dual monitor setup #1093

Closed QiangF closed 2 months ago

QiangF commented 3 months ago

Summary

Look exactly like this issue here

https://github.com/fcitx/fcitx/issues/476

Steps to Reproduce

Unplug and replug the external monitor

Expected Behavior

pop up follow input point

Output of fcitx5-diagnose command

System Info:

  1. uname -a:

    Linux mypc 6.6.14-2-lts #1 SMP PREEMPT_DYNAMIC Wed, 31 Jan 2024 09:27:08 +0000 x86_64 GNU/Linux
  2. lsb_release -a:

    LSB Version:    n/a
    Distributor ID: Arch
    Description:    Arch Linux
    Release:    rolling
    Codename:   n/a
  3. lsb_release -d:

    Description:    Arch Linux
  4. /etc/lsb-release:

    DISTRIB_ID="Arch"
    DISTRIB_RELEASE="rolling"
    DISTRIB_DESCRIPTION="Arch Linux"
  5. /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
  6. Desktop Environment:

    Cannot determine desktop environment.

  7. XDG SESSION TYPE:

    XDG_SESSION_TYPE=''
  8. Bash Version:

    BASH_VERSION='5.2.26(1)-release'

Environment:

  1. DISPLAY:

    DISPLAY=':0'
    
    WAYLAND_DISPLAY=''
  2. Keyboard Layout:

    1. setxkbmap:

      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
      zh_CN.gb18030
      zh_CN.utf8
    2. Current locale:

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

    1. Home:

      /home/q
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is set to /home/q/.config.

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

    3. Fcitx5 Settings Directory:

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

  5. Current user:

    The script is run as q (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.1.10

  3. process:

    Found 1 fcitx5 process:

       1790 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.27.

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

    Debug information from dbus:

       Group [x11::0] has 14 InputContext(s)
      IC [7e41da771eda46c7b8786dce99dd8b94] program:emacs frontend:dbus cap:6000000032 focus:0
      IC [46c1783f1968454687ce18c50305916e] program:emacs frontend:dbus cap:6000000032 focus:0
      IC [7759e1a357ec4d3c993131d91f66fea7] program:emacs frontend:dbus cap:6000000032 focus:0
      IC [80cc1727ac58456da277d1d05732108b] program:firefox-esr frontend:dbus cap:6000000032 focus:0
      IC [8da47f8fdd824226a4d69215e26f295f] program:firefox-esr frontend:dbus cap:6000000072 focus:0
      IC [3c65e544e4414882ae5b0ea12ddd0488] program:firefox-esr frontend:dbus cap:6000000032 focus:0
      IC [c02c3062054942458049a7d50ef36a66] program:emacs-29.3 frontend:xim cap:4000000000 focus:0
      IC [29a36d18bcbe45aeb17584c46109f836] program:emacs frontend:dbus cap:6000000032 focus:0
      IC [4075841161ec45eb8746b2d9820accbf] program:emacs frontend:dbus cap:6000000032 focus:0
      IC [3c4caa52cdb74387a1f3a6cb8c0e11f8] program:emacs frontend:dbus cap:6000000032 focus:0
      IC [102d16ea2a9a49079b5f5d4c218fb6d6] program:emacs frontend:dbus cap:6000000032 focus:0
      IC [24b2ef5b1a394941a326032d06766c0b] program:xfce4-terminal frontend:dbus cap:6000000032 focus:1
      IC [fd53303f46664b5988ddfed6c2405fef] program:firefox-esr frontend:dbus cap:6000000032 focus:0
      IC [43619c419e694aac980bed6eba7472c7] program:emacs 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.

Qt:

  1. qt4 - ${QT4_IM_MODULE}:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

    fcitx5-qt4-immodule-probing not found.

  2. qt5 - ${QT_IM_MODULE}:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

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

    QT_QPA_PLATFORM=xcb
    QT_IM_MODULE=fcitx
    IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext
  3. qt6 - ${QT_IM_MODULE}:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

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

    QT_QPA_PLATFORM=xcb
    QT_IM_MODULE=fcitx
    IM_MODULE_CLASSNAME=fcitx::QFcitxPlatformInputContext
  4. Qt IM module files:

    Found fcitx5 im module for qt: /usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so. 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 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 unknown fcitx qt module: /usr/lib/office6/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.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}:

    Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

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

    GTK_IM_MODULE=fcitx

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

    GTK_IM_MODULE=fcitx

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

    GTK_IM_MODULE=fcitx
  2. gtk-query-immodules:

    1. gtk 2:

      Found gtk-query-immodules for gtk 2.24.33 at /usr/bin/gtk-query-immodules-2.0. Version Line:

      # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

      Found fcitx5 im modules for gtk 2.24.33.

      "/usr/lib/gtk-2.0/2.10.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:*" 
    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:

      Found immodules cache for gtk 2.24.33 at /usr/lib/gtk-2.0/2.10.0/immodules.cache. Version Line:

      # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

      Found fcitx5 im modules for gtk 2.24.33.

      "/usr/lib/gtk-2.0/2.10.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:*" 
    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 29 enabled addons:

      Simplified and Traditional Chinese Translation 5.1.4
      Classic User Interface 5.1.10
      Cloud Pinyin 5.1.4
      DBus 5.1.10
      DBus Frontend 5.1.10
      Emoji 5.1.10
      Fcitx4 Frontend 5.1.10
      Full width character 5.1.4
      IBus Frontend 5.1.10
      Lua IME API 5.0.13
      Input method selector 5.1.10
      Keyboard 5.1.10
      KDE Input Method Panel 5.1.10
      Lua Addon Loader 5.0.13
      Status Notifier 5.1.10
      Notification 5.1.10
      Pinyin 5.1.4
      Extra Pinyin functionality 5.1.4
      Punctuation 5.1.4
      Quick Phrase 5.1.10
      Rime 5.1.5
      Spell 5.1.10
      Table 5.1.4
      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 1 disabled addons:

      Clipboard 5.1.10
  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/q/.config/fcitx5/profile:

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

Log:

  1. date:

    2024年 07月 11日 星期四 17:22:27 CST
  2. /home/q/.config/fcitx5/crash.log:

    =========================
    Fcitx 5.0.18 -- Get Signal No.: 6
    Date: try "date -d @1659016661" if you are using GNU date ***
    ProcessID: 782
    fcitx5(+0x12ccc)[0x56069ff7fccc]
    /usr/lib/libc.so.6(+0x3e8e0)[0x7f7fd7dbb8e0]
    /usr/lib/libc.so.6(+0x8e36c)[0x7f7fd7e0b36c]
    /usr/lib/libc.so.6(raise+0x18)[0x7f7fd7dbb838]
    /usr/lib/libc.so.6(abort+0xcf)[0x7f7fd7da5535]
    /usr/lib/libFcitx5Utils.so.2(+0x2976f)[0x7f7fd824f76f]
    /usr/lib/libsystemd.so.0(+0x36e7d)[0x7f7fd7c85e7d]
    /usr/lib/libsystemd.so.0(+0x4615a)[0x7f7fd7c9515a]
    /usr/lib/libsystemd.so.0(+0x4e098)[0x7f7fd7c9d098]
    /usr/lib/libsystemd.so.0(+0x799fb)[0x7f7fd7cc89fb]
    /usr/lib/libsystemd.so.0(sd_event_dispatch+0x116)[0x7f7fd7cd3056]
    /usr/lib/libsystemd.so.0(sd_event_run+0x119)[0x7f7fd7cd32d9]
    /usr/lib/libsystemd.so.0(sd_event_loop+0x60)[0x7f7fd7cd34b0]
    /usr/lib/libFcitx5Utils.so.2(_ZN5fcitx9EventLoop4execEv+0x16)[0x7f7fd8262eb6]
    /usr/lib/libFcitx5Core.so.7(_ZN5fcitx8Instance4execEv+0x57)[0x7f7fd83280c7]
    fcitx5(+0x10ee0)[0x56069ff7dee0]
    /usr/lib/libc.so.6(+0x29290)[0x7f7fd7da6290]
    /usr/lib/libc.so.6(__libc_start_main+0x8a)[0x7f7fd7da634a]
    fcitx5(+0x122a5)[0x56069ff7f2a5]

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.

wengxt commented 2 months ago

Can you run fcitx5 with

fcitx5 --verbose=classicui=5

You should find log like:

D2024-07-31 14:51:21.661564 xcbui.cpp:290] Xft.dpi: 96
D2024-07-31 14:51:21.661755 xcbui.cpp:447] Screen rects are: [(Rect(0,0+1536x864), 132)] Primary DPI: 132 XScreen DPI: 95

and paste it here.

Can you provide your screen setup with: xrandr

And can you explain whether your issue happens with only some applications or all applications. If not all, which application you're having problem with. And please also include any information if the application is not installed from your distribution (e.g. it's from flatpak).

QiangF commented 2 months ago

I am on travel, but the problem seems to caused by the negative number in the position specification.

 xrandr --output "eDP-1" --mode "1600x900" --pos "0x0" --primary --output "DP-1-0" --mode "1600x1200" --pos "-1600x0"

I moved the external display to the right side and seems the issue is gone.

wengxt commented 2 months ago

@QiangF you can still use the same layout without using negative number. Though I think I can try to reproduce with a setup similar like yours.

I believe the desktop (gnome/kde) generated layout never uses a negative number and thats probably why I never see such an issue.