I use Intelligent Pinyin Keyboard1 with ibus
in Ubuntu to input Chinese characters into my document.
The input-method
is designed in such a way that one types the pinyin
associated with a character, and then one can select it from a list of characters using numbers 0-9 on the keyboard.
Example:
Problem: in the last week, it sometimes happens that when I press a number from 0-9 the input-method does not yield a Chinese character but the digit I pressed instead. Moreover, any further keyboard input is not interpreted as an input for ibus, and merely written as-is on screen until I manually switch input-mode to pinyin
again.
What I tried, in order:
- reboot
- remove the input method configuration, and add again
- reinstall ibus-pinyin
None of these seemed to help.
Q: Does anyone know how to solve this problem?
As a side note, there seems to be a *ibus-engine-libpinyin.*.crash
file inside /var/crash
that could be related to this problem. However, I am not sure how can I trace this bug-report online and see if it has already a solution online.
edit: my current workaround is to use fcitx
instead of ibus
.. though this doesn't really solve the problem in the software.
1 Intelligent Pinyin Keyboard can be installed by the invocation of the sudo apt-get install ibus-libpinyin
and can be located in All Setting-->Text Entry-->Input sources to use-->+ as Chinese (Intelligent Pinyin) (Ibus).
TL;DR:
rm ~/.cache/ibus/libpinyin/*
Long answer:
I have similar problem except my problem is not able to return any Chinese character in next column >.
The first thing I do is run
watch -n 3 -d 'ps auxww|tac'
to compare what's the difference between the output when success(first column) and failure(next column) occur.I quickly noticed that
/usr/lib/ibus/ibus-engine-libpinyin --ibus
still running on success but disappear on failure.That means
/usr/lib/ibus/ibus-engine-libpinyin --ibus
process crash when select character in next column.Since the previous process is gone, while Super+Space to toggle new libpinyin process, select the first column, then run
ps auxww
in another terminal to know the latestpid
is6798
, runsudo strace -ff -vvv -p 6798 -s 1000000
to understand the process:The strace output stopped after select character in next column. Now I know it's the core dumped. Alternative way is debug with
tail -f /var/log/syslog
to know it'ssystemd-coredump
.So I run
coredumpctl list
to know the coredump relatedpid
is6798
:I run
coredumpctl dump 6798 --output alamak
to save coredump into alamak file, then rungdb -q /usr/lib/ibus/ibus-engine-libpinyin alamak
(the executable path can get fromps auxww
orcoredumpctl list
) to examine the coredump file:Try
thread apply all bt full
and Enter to navigate next page, I can see some interesting keyword which is the same with the previousstrace
'swrite()
output:Now the main keyword which causes the coredump has been confirmed, google
const pinyin::PhoneticKeyMatrix*, const pinyin::ForwardPhoneticConstraints*
, will found this bug report thread:That's it, run
rm ~/.cache/ibus/libpinyin/*
, and it fixed the problem.1.
In the
SunPinyin
(with theibus
input) you can set the initial state of an output for English/Chinese. It does not work onIBus Pinyin 1.5.0
.2. At least as a stopgap until the crash is repaired, you can try to use
Google Pinyin
,WubiPinyin
,SunPinyin
orPinyin
underfcitx
, which is able to manage the romanized input better.You need to change the input method for the
fcitx
in the System Settings --> Language Support and reboot the system (in my case to log out/log in is enough). Tray icon will show keyboard (fcitx
) in place of En / Ru / Pl button (ibus
).Then look for
Google Pinyin
,WubiPinyin
,SunPinyin
orPinyin
in All Setting --> Text Entry --> Input sources to use --> +, typing Chinese to narrow the list.3. (Temporary facilitation) By pressing Shift you can change the input manually as well as punctuation etc. Check: All Settings --> Text Entry --> Input source --> Preferences --> Shortcuts to assign a proper shortcut.