You are not logged in.

#1 2023-05-14 15:37:02

ozwigh
Member
Registered: 2014-10-07
Posts: 36

[SOLVED] Special input method is randomly triggered (by inactive uim)

Hello.

I'm humiliated to ask questions like this, but I'm totally stuck.
After moving to a new laptop, sometimes typed text in the input areas gets underlined and behaves like a spellchecker or code suggestion, which results in an incomprehensible mess. It affects random apps at random intervals, whether it's a GTK, KDE, or Java. Restarting the app temporarily fixes the problem (or, sometimes it can fix itself, randomly). An example:

Untitled.png

I didn't install anything new, no spellcheckers are running. My primary suspect is VsCode (it's Microsoft, after all). But when I typed this message, Firefox got affected too.

Untitled2.png

Googling yields nothing relevant. Any ideas? I don't even know what to look for.

Cheers.

Last edited by ozwigh (2023-05-15 11:46:47)

Offline

#2 2023-05-14 16:28:23

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: [SOLVED] Special input method is randomly triggered (by inactive uim)

Not much help, but maybe a place to start:

From pacman:

  • extra/gspell
    Spell-checking library for GTK applications

  • extra/gtkspell
    Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget

  • community/gtkspell3
    Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget

  • community/qtspell
    Spell checking for Qt text widgets

  • extra/sonnet
    Spelling framework for Qt5

These presumably will provide spelling functionality across applications because they work on the widgets the applications use.
I have all the GTK versions installed, though - and I don't have the problem you describe.

Offline

#3 2023-05-14 18:02:15

ozwigh
Member
Registered: 2014-10-07
Posts: 36

Re: [SOLVED] Special input method is randomly triggered (by inactive uim)

Ferdinand wrote:

Not much help, but maybe a place to start:

Yup, I already checked those, got a list of spellcheckers on my laptop:

aspell enchant gspell gtkspell gtkspell3 hunspell sonnet

All of those are dependencies and can't be uninstalled. However, no executables (if any) from the packages above are running and no libraries are loaded.
Currently, firefox and xfce4-terminal are affected, but the only suspicious thing loaded is "/usr/lib/m17n/1.0/libmimx-ispell.so". It's owned by "m17n-lib" which is required by "uim".
Uim itself isn't started, and *IM_MODULE vars aren't set, but somehow this thing found its way to start:

/usr/lib/uim/uim-helper-server

It's automatically restarted by systemd if killed, though I didn't find any systemd entries for it.
For now, it's suspect #1 'cause, as I recall, the bug looks very much like uim Japanese input.
I'll try to disable it and see how it goes.

Thank you for the input.

Offline

#4 2023-05-14 20:11:16

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

Re: [SOLVED] Special input method is randomly triggered (by inactive uim)

Uim itself isn't started, and *IM_MODULE vars aren't set, but somehow this thing found its way to start:

Why is https://aur.archlinux.org/packages/uim installed to begin with?

What happens if you explicitly "export GTK_IM_MODULE=xim"?

Offline

#5 2023-05-14 22:22:50

ozwigh
Member
Registered: 2014-10-07
Posts: 36

Re: [SOLVED] Special input method is randomly triggered (by inactive uim)

seth wrote:

Why is https://aur.archlinux.org/packages/uim installed to begin with?

I used it ages ago for Japanese (Mozc) input. (I have some kind of attachment for the software I used and it's not easy for me to uninstall something if it doesn't cause problems.)
And there were no problems. It should've been turned off. I checked my old laptop, and everything is fine there. "uim-helper-server" is running though.
The only major difference is that the systemd version is 253.1-3. Uim itself was last updated in 2021.

seth wrote:

What happens if you explicitly "export GTK_IM_MODULE=xim"?

Funny enough, in that case, "uim-helper-server" is started too, and the bug popped up after a couple of minutes of monkey-typing. I still can't find for what reason the systemd started it, there is nothing in the journal related to that.

For now, I disabled "uim-helper-server" to see how it goes. So far it's fine, but I need to survive at least one coding session to be sure. I'll update the thread tomorrow.

Offline

#6 2023-05-15 06:26:52

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

Re: [SOLVED] Special input method is randomly triggered (by inactive uim)

It might be activated by:
1. different toolkit IM, "printenv | grep IM"
2. user service/socket "systemctl --user list-units"
3. some session autostart procedure, https://wiki.archlinux.org/title/Xfce#Autostart (log in, but don't run anything else and check the running processes from a console login)
4. xfce4-terminal, https://unix.stackexchange.com/question … ooked-mode

Offline

#7 2023-05-15 11:44:55

ozwigh
Member
Registered: 2014-10-07
Posts: 36

Re: [SOLVED] Special input method is randomly triggered (by inactive uim)

seth wrote:

It might be activated by:
1. different toolkit IM, "printenv | grep IM"

Nothing here. *_IM_* vars aren't set.

seth wrote:

2. user service/socket "systemctl --user list-units"

Nothing here or in "/usr/lib/systemd" or "/etc/systemd" as well. But somehow "uim-helper-server"'s parent is a systemd process (PID 1).
After running anything as another user (new one with an empty home or even root), the helper starts immediately for this user.

seth wrote:

3. some session autostart procedure, https://wiki.archlinux.org/title/Xfce#Autostart (log in, but don't run anything else and check the running processes from a console login)

Nothing suspicious here too, unless some of the very few programs like NM applet or Blueman start it indirectly.
But immediately after login, the helper is started. Its PID shows* it started right after xfce4-session and before xfwm4/xfsettingsd/xfce4-panel etc. And again, the helper's parent PID is 1.

* PID order is not solid proof, but they're usually sequential.

For me, it starts before the terminal.

So, to summarize:

  1. Random special input mode is triggered by the "uim-helper-server", ignoring the fact that uim itself is not enabled by the *_IM_* variable or any other method.

  2. "uim-helper-server" is started by systemd for whatever reason, but there are no units that directly start it.

  3. It doesn't happen on the machine last updated about a month or so ago.**

** Most likely (just a guess, I don't want to dig a dead software) some update to input-handling libs finally made uim (last updated about 2 years ago) incompatible. Maybe recompile will work, but I don't use it anymore, so I'll pass.

Solution:

  1. Temporary

    mv /usr/lib/uim/uim-helper-server /usr/lib/uim/uim-helper-server.off
    killall -9 uim-helper-server
  2. Radical

    sudo pacman -Rs uim

Thank you everyone for the help. I'll mark the thread as solved.

Offline

Board footer

Powered by FluxBB