Skip to content

Ship fcitx5 wayland.conf so layouts are not pushed to the compositor - #11447

Closed
twinkybot wants to merge 2 commits into
omacom:quattrofrom
twinkybot:fcitx5-wayland-xkb-override
Closed

twinkybot wants to merge 2 commits into
omacom:quattrofrom
twinkybot:fcitx5-wayland-xkb-override

Conversation

@twinkybot

Copy link
Copy Markdown

Summary

Fixes #10474. Replaces #11446, which was opened from the wrong account.

config/fcitx5/conf/xcb.conf already ships Allow Overriding System XKB Settings=False for the X11 addon, but the Wayland addon has no counterpart, so it still runs with the override enabled. This adds config/fcitx5/conf/wayland.conf with the same single line.

Why this is the cause

Measured on two Omarchy 4.0.3 (quattro, stable) machines with fcitx5 5.1.22, Hyprland 0.56.2 and a single German system layout:

  • hyprctl devices and localectl report de, but XWayland reports us (DISPLAY=:0 setxkbmap -query) on both machines.
  • Without a ~/.config/fcitx5/profile, fcitx5 reads both and builds two groups on first start (fcitx5 --verbose '*=5'):
    xcbkeyboard.cpp:294 evdev pc105 us
    inputmethodmanager.cpp:135 No valid input method group in configuration. Building a default one
    instance.cpp:405 Items in group 1: [InputMethodGroupItem(keyboard-us,layout=)]
    instance.cpp:405 Items in group 2: [InputMethodGroupItem(keyboard-de,layout=)]
    
  • With two groups fcitx5 tries to push the layout to the compositor. The Wayland addon's setting for that is Allow Overriding System XKB Settings (described in libwayland.so as "Only support KDE5+ and GNOME"). On Hyprland the attempt raises the "Wayland Diagnose — Sending keyboard layout configuration to wayland compositor from Fcitx is not yet supported on current desktop" notification from the issue.
  • A machine that already has a one-group profile never shows it, which is why the notification looks intermittent across installs. The reporter in fcitx5 notification on startup #10474 had two layouts configured; here it was one, so the trigger is fcitx5's own default profile, not the user's layout choice.

Evidence

dbus-monitor "interface='org.freedesktop.Notifications',member='Notify'" while deleting the profile and restarting omarchy-fcitx5.service:

Notify calls
without conf/wayland.conf 1
with conf/wayland.conf 0

Cross-checked in both directions.

Relation to #10578

#10578 disables the whole notifications addon, which hides this message but also every other fcitx5 notification. This change stops the layout push itself and leaves the notification channel alone. Both can coexist; this one addresses the cause.

Test plan

  • bash test/shell.d/config-test.sh: all shell.json checks pass; the run stops at the omarchy-pkgs PKGBUILD coverage check because no omarchy-pkgs checkout is present here
  • Delete ~/.config/fcitx5/profile, restart omarchy-fcitx5.service, dbus-monitor shows 0 Notify calls
  • CapsLock compose after the change
  • Fresh install: no notification on first login

🤖 Generated with Claude Code

xcb.conf already disables XKB overriding for the X11 addon, but the Wayland
addon had no counterpart. When fcitx5 builds its default profile it sees
XWayland's `us` next to the system layout, ends up with two groups, and
tries to hand the layout to the compositor. Hyprland does not support that,
so every start of omarchy-fcitx5.service raised the "Wayland Diagnose"
notification. Shipping the same setting for the Wayland addon stops the
attempt at its source while keeping fcitx5's other notifications intact.

Fixes omacom#10474

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
config/** only seeds /etc/skel, so without a migration the new conf/wayland.conf reaches new users only, and existing installs like the reporter's in omacom#10474 keep raising the notification. Copy it into ~/.config/fcitx5/conf/ when the user has none, and leave one they wrote alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for tracking this to its cause. The fix works, and I pushed one commit to it so it also reaches existing installs.

What was checked. fcitx5 5.1.22's WaylandModule::selfDiagnose() sends the "Wayland Diagnose" layout warning only when the Wayland addon's Allow Overriding System XKB Settings is on and the profile's groups have different default layouts. Omarchy sets that option for the XCB addon in xcb.conf but not for the Wayland addon. Reproduced on a disposable Omarchy worker (Hyprland 0.56.2, fcitx5 5.1.22) with a two-group profile (gb and us, the setup in #10474), counting Notify calls with dbus-monitor across a start of omarchy-fcitx5.service:

Notify calls
without wayland.conf 1 (the layout warning)
with wayland.conf 0
file removed again 1

Pushed: 5132534 adds migrations/1790949694.sh. config/** only seeds /etc/skel, so on its own the new file reaches new users and not existing installs like the reporter's. The migration copies it into ~/.config/fcitx5/conf/ when there isn't one, and leaves a wayland.conf the user already wrote alone. It was tested on the worker (the "with" row above is the migration's copy) and in a temporary home, re-run included.

Tests on the worker. ./test/cli and ./test/shell pass, apart from ascii-test.sh and branding-about-animation-test.sh. Both fail the same way on this branch's base and on current quattro, so they are unrelated to this change.

Second opinion: none. The second reviewer (Codex Medium) was reachable, but today's review budget was used up, so this was reviewed by one model only (Claude Opus 5.5).

Related. #10578 targets the same notification by disabling fcitx5's notifications addon, which also hides every other fcitx5 notification. This change turns off the setting that causes the warning instead, so I think it's the one to take. Choosing between them is the maintainer's call.

Next. It still needs a second-opinion review at this head, then the maintainer's decision.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds input method configuration and deployment migration.

The PR appears safe to merge; no actionable defect was established.

Summary

Adds a Wayland fcitx5 setting to prevent it from pushing keyboard layouts to the compositor, plus a migration that copies the setting for existing users when no user file exists.

Reviews (1) · Last reviewed commit: "Add wayland.conf for existing installs"

@jandrusk

Copy link
Copy Markdown

Fixes #10474 at the cause (Wayland addon XKB override) rather than muting all fcitx notifications (#10578). Migration for existing ~/.config is the right shape. Prefer this over #10578.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thank you for this. What it does is now on quattro, so I am closing it.

quattro now ships config/fcitx5/conf/wayland.conf with Allow Overriding System XKB Settings=False, identical to this pull request, and copies it to existing users who lack it.

This was checked against quattro by Claude, with Codex at medium effort verifying the claims above. If something here is still missing, say so and this can be reopened.

@omarchybot omarchybot closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fcitx5 notification on startup

3 participants