Ibus error logging in to niri

Ever since upgrading to NixOS 25.11 I get this error when logging into niri:

IBus Notification

iBus should be called from the desktop session in Wayland. For KDE, you can launch ‘systemsettings; utlility and go to “Input & Output” → “Keyboard” → “Virtual keyboard” section and select “iBus Wayland” icon and click “Apply” button to configure iBus in Wa….

(copied by hand as not sure how to copy notifications)

Any ideas?

Also asking LLM, so far LLM suggestions haven’t helped.

This appears to fix it:

systemctl --user mask app-ibus\x2ddaemon@autostart.service
systemctl --user daemon-reload

Yuck. My LLM says:

Looking at the code, the warning fires because:

  1. You’re on Wayland (m_is_wayland = true)
  2. You’re not using Wayland input method mode (m_is_wayland_im = false)
  3. Your desktop (niri) isn’t GNOME

The intent of the warning is to alert users to use --enable-wayland-im when on Wayland. But Wayland input method protocol support depends on the compositor implementing it properly. Looking at niri’s documentation and source, it doesn’t appear to support the Wayland input method protocol (input-method-unstable-v1), so even with --enable-wayland-im it probably wouldn’t work.

So it wants to blame niri. But not sure if I believe it.

This is a terrible idea on NixOS. Disable the offending service in your configuration, not at runtime.

I don’t know much about ibus, but that message reads to me like it expects to have things like a WAYLAND_DISPLAY variable or such, which would imply that niri’s desktop session setup stuff isn’t doing its job. That’s worth investigating, broken session environment setup will cause tons of subtle issues.

But if you’re happy masking the service, you should also not enable ibus to begin with.

2 Likes

Yes, not a good solution. But a valid data point in diagnosing the issue. I know where the error is coming from.

Was hoping if I posted here somebody would have a better solution… Surely I am not the only one using niri!

The problem comes from this code:

In particular the condition is m_is_wayland && !m_is_wayland_im && !is_gnome().

From LLM which appears to have got this right so far:

So the check is:

  1. m_is_wayland - is wayland session
  2. !m_is_wayland_im - NOT using ibus wayland input method
  3. !is_gnome() - NOT gnome

LLM says we fail part 2 of the check, and is trying to convince me (as above post says) that niri does not support input-method-unstable-v1, so we can’t make this work.

Like I said above, not convinced these is correct.

I note that ibus in nixos unstable is the same version. And that check is the same in ibus main branch anyway.

Maybe I should report a bug somewhere. But can’t decide if it should be ibus or niri. Or maybe the niri flake I am using for configuration. GitHub - sodiboo/niri-flake: Nix-native configuration for niri · GitHub

I created a new discussion here: Ibus error logging in to niri · niri-wm/niri · Discussion #4002 · GitHub

Perhaps I should set i18n.inputMethod.enable to false.

If I am reading this correctly, that should disable the creating of the /etc/xdg/autostart/ibus-daemon.desktop file.

Still feels more like a workaround as opposed to a proper fix. Unless it is a known issue that ibus doesn’t work with niri, and not seeing any evidence of that right now.

If it turns out to be a missing protocol, I’d file a bug in the ibus upstream about this error message being misleading.

It’s pretty easy to check if a compositor implements a given protocol, by the way, use this: wayland-utils.