Bug 466810

Summary: text-input-v1 not working with fcitx5 on chromium
Product: [Plasma] kwin Reporter: Yiyang Wu <xgreenlandforwyy>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: nicolas.fella, qydwhotmail, wengxt
Priority: NOR    
Version First Reported In: 5.27.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: logs running chromium with `WAYLAND_DEBUG=1`
(weston) logs running chromium with `WAYLAND_DEBUG=1`

Description Yiyang Wu 2023-03-04 06:25:54 UTC
Created attachment 156985 [details]
logs running chromium with `WAYLAND_DEBUG=1`

Even with text-input-v1 implemented on kwin (https://invent.kde.org/plasma/kwin/-/merge_requests/3403), `chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime` still cannot use fcitx5 to input Chinese (no input box popup).

This bug is observed on Debian sid, and there's no sign of debian packaging turning off text-input-v1 feature. Using weston `chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime` works without issue, so the bug shouldn't be on fcitx5/chromium package.

STEPS TO REPRODUCE
1. Install plasma-desktop, kwin_wayland, plasma-workspace-wayland on debian sid
2. `export $(dbus-launch); startplasma-wayland` on tty
3. Start up fcitx5
4. `chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime`
5. Switch to Chinese input method and type

SOFTWARE/OS VERSIONS
Linux/KDE Plasma
KDE Plasma Version: Debian 5.27.2-1
KDE Frameworks Version: Debian 5.103.0-1
Qt Version: Debian 5.15.8+dfsg-3

The attachment are logs running chromium with `WAYLAND_DEBUG=1`, then choose the text_input_v1 related information `grep text_input_v1`; for better diff comparison, timestamps and some numbers are changed to be the same. It can be seen that weston has more output, generating desired Chinese characters, while on plasma, it only detects the keyboard action, but not generating input box, thus cannot type Chinese characters.
Comment 1 Yiyang Wu 2023-03-04 06:29:34 UTC
Created attachment 156986 [details]
(weston) logs running chromium with `WAYLAND_DEBUG=1`
Comment 2 Fushan Wen 2023-03-04 17:21:15 UTC
Have you selected fcitx5 in virtual keyboard KCM? Also `export $(dbus-launch); startplasma-wayland` on tty is not a supported way to use fcitx5 on Wayland because an Arch user also reported the same bug.
Comment 3 Yiyang Wu 2023-03-05 06:20:19 UTC
(In reply to Fushan Wen from comment #2)
> Have you selected fcitx5 in virtual keyboard KCM? 

No. And after I enabled it this issue is resolved. Thanks!

> Also `export $(dbus-launch); startplasma-wayland` on tty is not a supported way to use
> fcitx5 on Wayland because an Arch user also reported the same bug.

For me it seems not having any impact using `export $(dbus-launch); startplasma-wayland`