You are not logged in.

#1 2025-05-12 10:25:55

yamcake3821
Member
Registered: 2024-10-25
Posts: 16

Problem With Fcitx5

So, I have a problem with Fcitx5 lately, which is I can type normally (in chinese) on a certain window but I couldn't with the other, the video is pretty self explanatory: https://drive.google.com/file/d/1eOshVz … sp=sharing

Oh yeah, and I use Hyprland.
Thanks.

Offline

#2 2025-05-12 13:26:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,150

Re: Problem With Fcitx5

the video is pretty self explanatory

And likely meaningless, https://bbs.archlinux.org/viewtopic.php?id=57855

Wild guess, does it hinge on xwayland?
Also see https://wiki.archlinux.org/title/Fcitx5#Wayland

Offline

#3 2025-05-16 11:26:41

yamcake3821
Member
Registered: 2024-10-25
Posts: 16

Re: Problem With Fcitx5

My apologies, I read the "How to ask questions the smart way" and came back, here's my journal.

http://0x0.st/8v_M.txt

Offline

#4 2025-05-16 19:43:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,150

Re: Problem With Fcitx5

How will the journal be helpful here?

Details on the affected client(s) will be more useful:
https://wiki.archlinux.org/title/Waylan … plications
https://wiki.archlinux.org/title/Fcitx5 … e_problems

Offline

#5 2025-05-16 20:42:13

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: Problem With Fcitx5

I have the same issue with Chromium (running in wayland gtk4 mode, under swaywm). As long as there is a single window, fcitx works fine. Multiple windows (side by side, or on different virtual desktops), then IME only works for one of them.

No such issue in firefox, terminal, etc. so it should be something chromium specific I guess.

Offline

#6 2025-05-16 22:01:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,150

Re: Problem With Fcitx5

Tried any of the "--wayland-text-input-version=3" or --en/disable-wayland-ime for chromium/electron?

Offline

#7 2025-05-17 00:53:25

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: Problem With Fcitx5

Okay. Well. Disabling wayland text input version 3 makes IME work in multiple windows. That's great. But then AltGr key stops working, so I can't type ASCII anymore. So it's useless for me. Maybe it will help OP...

I'm tuning out chromium anyway. Why is every browser buggy, sigh hmm

Offline

#8 2025-05-17 05:20:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,150

Re: Problem With Fcitx5

https://issues.chromium.org/issues/40239118#comment13
What's your current set of chromium flags to address this (found an older post of yours concerning this)

Why is every browser buggy

… becaues html5 was, ultimately, a mistake.

Offline

#9 2025-05-17 07:49:55

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: Problem With Fcitx5

I don't have flags other than setting ozone/wayland and gtk version. The input version 3 was used by default (apparently).

--enable-features=UseOzonePlatform
--ozone-platform=wayland
--gtk-version=4

And yeah, the AltGr issue is a years old bug with Chromium + GTK 4. However IME does not work at all without it. So I switched to GTK 4 again recently and was surprised to find that AltGr was fixed, but apparently that is related to the input protocol version 3 somehow. And this works fine, except IME now only works in a single window. Which I didn't even realize before this thread appeared - I don't have that many tabs open so a single window is usually sufficient.

Maybe its something benign like getting the window id wrong or something. But I don't even know where to start looking in the source code, and I'm switching back to firefox based browsers anyway, so... someone else have to debug it ;-)

Last edited by frostschutz (2025-05-17 07:50:14)

Offline

#10 2025-09-27 05:58:37

GoodNight_Sadman
Member
Registered: 2021-09-02
Posts: 1

Re: Problem With Fcitx5

I've encountered almost the exact same issue as user "yamcake3821" described, and I'd like to add some of my own observations and details, hoping it can help in pinpointing the problem.

Core Issue:
In a KDE Plasma 6 + Wayland session, after switching back from another virtual desktop, the Fcitx5 input method loses focus for XWayland applications (especially Electron and sandbox apps).
The specific behavior is being unable to type Chinese, with the candidate window appearing detached in the top-left corner of the screen.

Key Phenomenon for Reproduction/Recovery (New Clue):
I discovered an interesting temporary workaround: After the issue occurs, if I switch to another virtual desktop that contains a native Wayland application (like a properly configured Chromium with the Wayland backend), successfully type a few Chinese characters inside it, and then immediately switch back to the broken non-Wayland application (like WeChat), the input method functionality is temporarily restored.

This seems to prove that the issue lies with KWin/KDE/Fcitx5 failing to correctly update or broadcast the input focus state for XWayland applications under specific conditions (like a virtual desktop switch).
Interacting with a native Wayland application can forcibly "reset" or refresh this focus state.

My Environment and Affected Applications:
Desktop Environment: KDE Plasma 6 (Wayland Session)
Input Method: Fcitx5
System: Arch Linux (rolling release, fully up-to-date)

Affected Applications (non-Wayland):
aur/clash-for-windows-bin 0.20.39-4 (+27 0.00) (Installed)
    A Windows/macOS/Linux GUI based on Clash and Electron.
aur/wechat 1:6-2 (+48 0.15) (Installed)
aur/wechat-bin 4.0.1.11-2 (+7 0.97) (Installed)

Unaffected Applications (Native Wayland):
KWrite, Dolphin

Exception:
Chromium (forced to enable Wayland backend via chromium-flags.conf)

Additional Notes:
While editing this post, I noticed that Typora has a similar issue.

This is a very tricky problem, and it's difficult to get useful Wayland log information.
I also arrived at this conclusion about the virtual desktop focus switching pattern after trying various methods and using a language model to help locate BBS posts describing nearly identical situations.

The problem seems related to Wayland, virtual desktops, and Fcitx input method switching. I've also noticed in "System Settings -> Keyboard -> Virtual Keyboard" that the issue persists regardless of whether "Fcitx 5" or "Fcitx 5 (Wayland)" is selected.

This issue seems to have appeared in an update from about half a month to a month ago. I've become proficient at switching back to the X11 session to work, but I noticed this weekend that the problem still hasn't been fixed.
It looks like I'll have to use the laggy X11 session for a while longer, which is a pity.

System Information:
Operating System: Arch Linux
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.16.8-arch3-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics
Memory: 16 GiB of RAM (14.8 GiB usable)
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: ThinkPad X13 Gen 1
Environment Settings:

$ cat /etc/environment
XMODIFIERS=@im=fcitx
QT_IM_MODULE=fcitx

$ cat .gtkrc-2.0                                                                                     
gtk-cursor-blink-time=1000
gtk-cursor-blink=1
gtk-double-click-time=400
gtk-sound-theme-name="ocean"
gtk-theme-name="Breeze"
gtk-enable-animations=0
gtk-primary-button-warps-slider=1
gtk-toolbar-style=3
gtk-menu-images=1
gtk-button-images=1
gtk-cursor-theme-size=30
gtk-cursor-theme-name="We10XOS-cursors"
gtk-icon-theme-name="breeze"
gtk-font-name="JetBrains Mono Medium, Medium 13"
gtk-im-module="fcitx"

$ cat .config/gtk-3.0/settings.ini
[Settings]
gtk-application-prefer-dark-theme=false
gtk-button-images=true
gtk-cursor-blink=true
gtk-cursor-blink-time=1000
gtk-cursor-theme-name=We10XOS-cursors
gtk-cursor-theme-size=30
gtk-decoration-layout=icon:minimize,maximize,close
gtk-double-click-time=400
gtk-enable-animations=false
gtk-font-name=JetBrains Mono Medium, Medium 13
gtk-icon-theme-name=breeze
gtk-menu-images=true
gtk-modules=colorreload-gtk-module:window-decorations-gtk-module
gtk-primary-button-warps-slider=true
gtk-sound-theme-name=ocean
gtk-theme-name=Breeze
gtk-toolbar-style=3
gtk-xft-dpi=98304
gtk-im-module=fcitx

Picture problem description and the wayland information I found:
https://drive.google.com/drive/folders/ … drive_link

Offline

#11 2025-09-27 14:01:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,150

Re: Problem With Fcitx5

Please use [code][/code] tags for file contents and shell IO.
Edit your post in this regard.

Possibly related upstream bug: https://bugs.kde.org/show_bug.cgi?id=507021 (completely unaddressed)

Offline

Board footer

Powered by FluxBB