KDE ibus anthy input dead

Compiz, KDE, Gnome, Fluxbox, etc...

Moderator: Moderators

KDE ibus anthy input dead

Postby manifesto » Wed Mar 29, 2017 10:23

Hi,
I got a very annoying ibus problem on my sabayon (I need to switch back to ubuntu at work..).
I am using KDE with ibus / anthy to input japanese.
ibus input is not working anymore in KDE applications since some time (same on work and home machines).
Same account on KDE ubuntu works fine. GTK apps are ok, chrome as well.
I am very annoyed with that and trace the process to try to understand.

I can see that with non KDE when typing :
Code: Select all
[pid  2339] <... write resumed> )       = 8
[pid  2339] futex(0x68b6a0, FUTEX_WAKE_PRIVATE, 1) = 1
[pid  2313] <... futex resumed> )       = 0
[pid  2313] futex(0x68b6a0, FUTEX_WAKE_PRIVATE, 1) = 0
[pid  2339] sendmsg(10, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\2\1\1\26\1\0\0009\3\0\0=\0\0\0\7\1s\0\24\0\0\0org.free"..., iov_len=358}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 358
[pid  2313] poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid  2313] read(3, "\1\0\0\0\0\0\0\0", 16) = 8
[pid  2313] poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1 <unfinished ...>
[pid  2339] poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}], 8, 0) = 0 (Timeout)
[pid  2339] poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}], 8, -1 <unfinished ...>
[pid  2338] <... poll resumed> )        = 0 (Timeout)
[pid  2313] poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}], 2, 0 <unfinished ...>
[pid  2339] poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}], 8, -1 <unfinished ...>
...
[pid  2313] <... poll resumed> )        = 1 ([{fd=3, revents=POLLIN}])
[pid  2313] read(3, "\1\0\0\0\0\0\0\0", 16) = 8
[pid  2313] write(6, "\1\0\0\0\0\0\0\0", 8) = 8
[pid  2339] <... poll resumed> )        = 1 ([{fd=6, revents=POLLIN}])
[pid  2313] poll([{fd=3, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1 <unfinished ...>
[pid  2339] read(6, "\1\0\0\0\0\0\0\0", 16) = 8
[pid  2339] write(3, "\1\0\0\0\0\0\0\0", 8) = 8
[pid  2313] <... poll resumed> )        = 1 ([{fd=3, revents=POLLIN}])
[pid  2313] read(3, "\1\0\0\0\0\0\0\0", 16) = 8



but in KDE apps nothing :
Code: Select all
[pid  2338] poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3997) = 0 (Timeout)
[pid  2338] poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3996) = 0 (Timeout)
[pid  2338] poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3995) = 0 (Timeout)


above processes :
Code: Select all
gdbus     2313 2339     pierre  txt       REG                8,6    163992    1312949 /usr/bin/ibus-daemon


Note that second sample if after restart of ibus but processes match.

So it look like KDE is not speaking to ibus for any reason.
Anybody has a clue on that ?
manifesto
Growing Hen
 
Posts: 176
Joined: Mon Jul 19, 2010 22:21

Re: KDE ibus anthy input dead

Postby Zeikcied » Sat Apr 08, 2017 11:20

I've had this problem, as well. I posted about it back in November 2015. I admit I know very little about debugging Linux, so I don't think I was much help.

Though with me, ibus would work in Choqok (a KDE Twitter client), but not in Firefox or Chrome. I don't recall if I tried other programs or not. I haven't tried ibus in quite some time, and not being able to write in Japanese has been one reason (albeit a minor one) for my giving up trying to learn the language.

I used Kubuntu for nine years before switching to Sabayon, and ibus worked perfectly in that, with both GTK and KDE programs. Only since I switched to Sabayon have I had any problems with ibus. Which is unfortunate, as I tend to like the rolling release schedule of Sabayon. I just wish ibus would work.

One quirk I did notice was that ibus would work perfectly when it was first installed. After a reboot, however, it would stop working. I don't know if that's the case with the current version, as well. The ibus-daemon would still run, I could still switch to Anthy, and it would still work in Choqok, but it wouldn't work in Firefox or Chrome.
Zeikcied
Simple Hen
 
Posts: 84
Joined: Tue Nov 10, 2015 8:37

Re: KDE ibus anthy input dead

Postby manifesto » Fri Apr 14, 2017 4:10

Hi Zeikcied san,
Thanks for your feedback.
It has been working for years but now it is still unusable on KDE app.
Firefox (and gtk programs) are ok so the snag is not that bad (I use mainly japanese for email/googling ..) and i keep Sabayon as main OS.
manifesto
Growing Hen
 
Posts: 176
Joined: Mon Jul 19, 2010 22:21

Re: KDE ibus anthy input dead

Postby Zeikcied » Fri Apr 14, 2017 4:30

manifesto wrote:Hi Zeikcied san,
Thanks for your feedback.
It has been working for years but now it is still unusable on KDE app.
Firefox (and gtk programs) are ok so the snag is not that bad (I use mainly japanese for email/googling ..) and i keep Sabayon as main OS.

I checked Choqok again, and it seems ibus has stopped working with it. I don't know when it stopped, though.

But yeah, ibus-daemon runs, I can switch to Anthy, the notification pops up as normal to show I switched to Anthy, but it won't work. Not in GTK apps, not in Qt apps. It's not working for me at all.

You're saying that in Sabayon, ibus is working in GTK apps while you're running the KDE desktop? Huh...

I was hoping that someone else having the same issue as me, with apparently more knowledge of how to debug, would help someone come up with a fix for the issue.

How do you do the type of debugging you did? To "trace the process" as you said? I've been using Linux exclusively for over ten years, but I don't know how to trace or debug or any of that. :oops:
Zeikcied
Simple Hen
 
Posts: 84
Joined: Tue Nov 10, 2015 8:37

Re: KDE ibus anthy input dead

Postby Zeikcied » Fri Apr 14, 2017 5:09

I installed strace, but that didn't really help as I have no clue what to look for.

Oh, I shut down the ibus-daemon process that was running, and started a new one via the terminal (using "ibus-daemon -drx"), and now it's working in GTK apps. How weird.

It's the same command that's at the bottom of my ~/.xprofile file, but for some reason it isn't working when launched at login. Still isn't working with KDE apps. Tried in Choqok, Ksysguard, and Kate.
Zeikcied
Simple Hen
 
Posts: 84
Joined: Tue Nov 10, 2015 8:37

Re: KDE ibus anthy input dead

Postby manifesto » Tue Apr 18, 2017 4:08

You probably have the same problem than me.
You can trace with running strace like :
ps -edf|grep ibus-da
Get the pid :
pierre 6034 1 0 11:49 ? 00:00:00 ibus-daemon -drx
Here it is 6034 then you can strace -fp <pid> (which is 6034)
Then you can see the syscalls that are triggered.
You then change your input in gtk app and you will see something like :
Code: Select all
[pid  6105] poll([{fd=10, events=POLLIN}], 1, 0) = 1 ([{fd=10, revents=POLLIN}])
[pid  6105] recvmsg(10, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\10\1g\0\2ss\0\1\1o\0\25\0\0\0/org/freedesktop"..., iov_len=173}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 173
[pid  6105] write(5, "\1\0\0\0\0\0\0\0", 8) = 8
[pid  6034] <... poll resumed> )        = 1 ([{fd=5, revents=POLLIN}])



If you go to kde apps it will just poll.
On about poll is reading (probaby from fd 10) then it reads the message (recvmsg) and then write it to fd 5 which is probably the display subsystem.
You can get the fd target in /prod/<pid>/fd/
It really looks like a bug (plasma apps are not receiving data to ibus).
I have no time to open a sabayon bug but it was working fine and it is still working fine on other distro.

It could be missing flags on plasma config not sure.
manifesto
Growing Hen
 
Posts: 176
Joined: Mon Jul 19, 2010 22:21

Re: KDE ibus anthy input dead

Postby Zeikcied » Tue Apr 18, 2017 4:54

What I get from strace while in a KDE app is this:

Code: Select all
[pid 22734] <... poll resumed> )        = 0 (Timeout)
[pid 22734] inotify_add_watch(7, "/home/darthbrandon/~/.config/ibus-anthy", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOENT (No such file or directory)
[pid 22734] poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3995) = 0 (Timeout)
[pid 22734] inotify_add_watch(7, "/home/darthbrandon/~/.config/ibus-anthy", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOENT (No such file or directory)
[pid 22734] poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3995) = 0 (Timeout)
[pid 22734] inotify_add_watch(7, "/home/darthbrandon/~/.config/ibus-anthy", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOENT (No such file or directory)
[pid 22734] poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3995) = 0 (Timeout)
[pid 22734] inotify_add_watch(7, "/home/darthbrandon/~/.config/ibus-anthy", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOENT (No such file or directory)
[pid 22734] poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3995) = 0 (Timeout)
[pid 22734] inotify_add_watch(7, "/home/darthbrandon/~/.config/ibus-anthy", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOENT (No such file or directory)


When I use GTK apps, there's a lot more activity, but there's still that "(No such file or directory)" error. Hmm.

Well, whatever, I guess the point is that there's nothing but the timeout event.

I think a bug should be entered in the Sabayon bug tracker, for sure. I can try.
Zeikcied
Simple Hen
 
Posts: 84
Joined: Tue Nov 10, 2015 8:37

Re: KDE ibus anthy input dead

Postby parapente » Sat May 13, 2017 15:48

I am using ibus in KDE using the following in my .xprofile:
Code: Select all
if [ -x "/usr/bin/ibus-setup" ]; then
        export GTK_IM_MODULE=ibus
        export [email protected]=ibus
        export QT_IM_MODULE=xim
fi


It seems to work fine, I just can't use alt+shift for switching keyboard layout. I hope it helps :wink:
parapente
Baby Hen
 
Posts: 4
Joined: Fri Jun 03, 2011 10:51

Re: KDE ibus anthy input dead

Postby Zeikcied » Sat May 13, 2017 17:22

parapente wrote:I am using ibus in KDE using the following in my .xprofile:
Code: Select all
if [ -x "/usr/bin/ibus-setup" ]; then
        export GTK_IM_MODULE=ibus
        export [email protected]=ibus
        export QT_IM_MODULE=xim
fi


It seems to work fine, I just can't use alt+shift for switching keyboard layout. I hope it helps :wink:

That doesn't help, actually.

I switched the QT_IM_MODULE to xim, which is what's in .xprofile by default on Sabayon, and it doesn't work. I even did "echo $QT_IM_MODULE" to make sure it was set to xim, and qtconfig is set to use xim, as well. It still works in GTK apps like Firefox and Chrome, but not Qt5 apps like Kate or Choqok.

I think I found out the problem. Files named libibusplatforminputcontextplugin.so (in /usr/lib64/qt5/plugins/platforminputcontexts/ and /usr/lib/qt5/plugins/platforminputcontexts/) are supposed to be provided by qtgui, however Sabayon has the "-ibus" USE flag, which presumably prevents those files from being made. They're not on my system, for example.
Zeikcied
Simple Hen
 
Posts: 84
Joined: Tue Nov 10, 2015 8:37

Re: KDE ibus anthy input dead

Postby joost » Sat May 13, 2017 20:22

joost
Sagely Hen
 
Posts: 2639
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands

Next

Return to 3D Desktops and Window Managers

Who is online

Users browsing this forum: No registered users and 1 guest