Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2031477 - ibus-mozc is not loaded automatically
Summary: ibus-mozc is not loaded automatically
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mozc
Version: 35
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-12 08:31 UTC by Takehiko Abe
Modified: 2022-01-05 02:03 UTC (History)
4 users (show)

Fixed In Version: mozc-2.26.4577.102-1.fc36 mozc-2.26.4577.102-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-05 02:03:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
png image of the input source menu (deleted)
2021-12-14 01:40 UTC, Takehiko Abe
no flags Details
correct menu image (deleted)
2021-12-14 03:59 UTC, Akira TAGOH
no flags Details

Description Takehiko Abe 2021-12-12 08:31:16 UTC
Description of problem:

ibus-mozc is not loaded automatically after booting and logging in to Gnome.

Version-Release number of selected component (if applicable):

ibus-mozc-2.25.4190.102-7.fc35.x86_64

How reproducible:

Every boot and login.

Steps to Reproduce:
1. Reboot Fedora Gnome.
2. Login.
3. Select mozc from the input source selector. 

Actual results:

The input source indicator is set to 'あ'. But the input source remains English.

(If ibus-kkc is present in the input source, kkc is activated instead of mozc.)

Expected results:

mozc is activated.

Additional info:

To activate mozc, I need to do either:

a). restart ibus-daemon.
b). activate emacs mozc inside emacs.

Comment 1 fujiwara 2021-12-13 13:00:01 UTC
I think ibus-mozc's default is the direct input instead of Hiragana mode so you need to change the input mode to Hiragana after you select ibus-mozc from the input source indicator.

The indicator status sometimes does not match with the actual mode.

Comment 2 Takehiko Abe 2021-12-14 01:17:45 UTC
(In reply to fujiwara from comment #1)
> I think ibus-mozc's default is the direct input instead of Hiragana mode so
> you need to change the input mode to Hiragana after you select ibus-mozc
> from the input source indicator.

I know that. https://bugzilla.redhat.com/show_bug.cgi?id=1119967

The problem I am currently experience is that I cannot choose an input mode because there is no menu item to choose a mode from. (mozc is not activated.)

journalctl records the following suspicious error: 

: JS ERROR: Gio.IOErrorEnum: Timeout was reached
: _promisify/proto[asyncFunc]/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:424:45
: ### Promise created here: ###
: setEngine@resource:///org/gnome/shell/misc/ibusManager.js:241:30
: activateInputSource@resource:///org/gnome/shell/ui/status/keyboard.js:482:31
: _emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
: activate@resource:///org/gnome/shell/ui/status/keyboard.js:58:14
: _finish@resource:///org/gnome/shell/ui/status/keyboard.js:103:42
: vfunc_key_release_event@resource:///org/gnome/shell/ui/switcherPopup.js:209:22

seEngine from ibusManager.js fails.

If I restart ibus-daemon (or enable mozc in emacs), then setEngine starts working.

Comment 3 Takehiko Abe 2021-12-14 01:40:49 UTC
Created attachment 1846160 [details]
png image of the input source menu

Comment 4 Akira TAGOH 2021-12-14 03:59:26 UTC
Created attachment 1846165 [details]
correct menu image

That looks strange to me. If it works properly, you can see the input mode menu after the language selector.
How did you see that? did you install it on the fresh f35?

Comment 5 Takehiko Abe 2021-12-14 05:04:14 UTC
(In reply to Akira TAGOH from comment #4)

> That looks strange to me. If it works properly, you can see the input mode
> menu after the language selector.

The image was meant to show "The problem I am currently experience [sic] is that I cannot
choose an input mode because there is no menu item to choose a mode from."

It worked before. And I see the menu once mozc is properly activated by restarting
ibus-daemon or by turning on mozc in emacs. 

ah.. I have just realized that merely starting emacs fixes the problem --
no need to fiddle with emacs mozc.

> How did you see that? did you install it on the fresh f35?

It's upgraded from F34. Not the fresh install. I see the same problem in other
machines recently upgraded from F34.

Comment 6 Takehiko Abe 2021-12-15 06:22:05 UTC
> ah.. I have just realized that merely starting emacs fixes the problem --
> no need to fiddle with emacs mozc.

It turned out that any X11 app can enable mozc on my system. It is not just emacs.
Any X11 app will do. e.g. Chromium browser.

Once I starts an X11 app, the input source menu's title changes from 'あ' to 'A'
so that I can happily proceed to change its mode back to 'あ' (hiragana) from 'A' and
start typing Japanese.

;;;

While mozc is not working (e.g. before an X11 app is started), I got JS timeout
error as I previously mentioned:

: JS ERROR: Gio.IOErrorEnum: Timeout was reached
: _promisify/proto[asyncFunc]/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:424:45
: ### Promise created here: ###
: setEngine@resource:///org/gnome/shell/misc/ibusManager.js:241:30
[...]

The error is recorded every time I try to switch to mozc.

Comment 7 Takehiko Abe 2021-12-15 07:02:24 UTC
Found this article (Japanese):

"Ubuntu 21.10で日本語入力ができない問題"
https://zenn.dev/ikuya/articles/788626c3ae6ade

so, mozc needs ibus-x11?

The article has a link to ubuntu fix:

https://launchpad.net/ubuntu/+source/mozc/2.26.4220.100+dfsg-4.1ubuntu0.1

Comment 8 fujiwara 2021-12-15 10:25:07 UTC
Seems SetGlobalEngine D-Bus method is succeeded.
ibus-mozc does not send ibus_engine_register_properties() with a reason.

(In reply to Takehiko Abe from comment #7)
> so, mozc needs ibus-x11?

In the Fedora 35 latest, ibus-x11 is not called in GNOME Wayland:
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/misc/ibusManager.js#L67

But ibus-x11 is not relative with the mozc issue.
ibus-mozc might need the Xwayland features.


> The article has a link to ubuntu fix:
> 
> https://launchpad.net/ubuntu/+source/mozc/2.26.4220.100+dfsg-4.1ubuntu0.1

Maybe a good reference for the maintaner.

Comment 9 Fedora Update System 2021-12-20 03:32:58 UTC
FEDORA-2021-2304c8dc66 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2021-2304c8dc66

Comment 10 Fedora Update System 2021-12-20 03:35:51 UTC
FEDORA-2021-2304c8dc66 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2021-12-20 05:00:38 UTC
FEDORA-2021-9b1403ab0f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-9b1403ab0f

Comment 12 Fedora Update System 2021-12-21 01:18:06 UTC
FEDORA-2021-9b1403ab0f has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-9b1403ab0f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-9b1403ab0f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Takehiko Abe 2021-12-21 08:30:52 UTC
(In reply to Fedora Update System from comment #12)
> FEDORA-2021-9b1403ab0f has been pushed to the Fedora 35 testing repository.
> Soon you'll be able to install the update with the following command:
> `sudo dnf upgrade --enablerepo=updates-testing
> --advisory=FEDORA-2021-9b1403ab0f`
> You can provide feedback for this update here:
> https://bodhi.fedoraproject.org/updates/FEDORA-2021-9b1403ab0f
> 
> See also https://fedoraproject.org/wiki/QA:Updates_Testing for more
> information on how to test updates.

Bad news.

Does not fix the problem. And starting X app to enable ibus-mozc no longer works
after the upgrade.

portion of dnf history info:


: Command Line   : upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-9b1403ab0f
: Comment        : 
: Packages Altered:
:     Install  abseil-cpp-20210324.2-2.fc35.x86_64   @fedora
:     Install  xrefresh-1.0.6-4.fc35.x86_64          @fedora
:     Upgrade  ibus-mozc-2.26.4577.102-1.fc35.x86_64 @updates-testing
:     Upgraded ibus-mozc-2.25.4190.102-7.fc35.x86_64 @@System
:     Upgrade  mozc-2.26.4577.102-1.fc35.x86_64      @updates-testing
:     Upgraded mozc-2.25.4190.102-7.fc35.x86_64      @@System

Comment 14 fujiwara 2021-12-21 09:05:46 UTC
I think X app no longer works if Xwayland and ibus-x11 do not run and it's not an ibus-mozc issue.

Comment 15 Takehiko Abe 2021-12-21 09:16:37 UTC
(In reply to fujiwara from comment #14)
> I think X app no longer works if Xwayland and ibus-x11 do not run and it's
> not an ibus-mozc issue.

?? Xwayland and ibus-x11 do run.

Comment 16 Takehiko Abe 2021-12-21 09:21:47 UTC
(In reply to Takehiko Abe from comment #15)
> (In reply to fujiwara from comment #14)
> > I think X app no longer works if Xwayland and ibus-x11 do not run and it's
> > not an ibus-mozc issue.
> 
> ?? Xwayland and ibus-x11 do run.

I got it. What I try to describe by "starting X app to enable ibus-mozc no longer works" is:

before the upgrade

1. mozc cannot be activated.
2. Starting emacs (or any X app) activates mozc.

after the upgrade

1. mozc cannot be activated.
2. Starting emacs (or any X app) does not activate mozc any more.

Comment 17 Akira TAGOH 2021-12-21 09:25:31 UTC
I checked the updates on WS Live again, to be sure. it works for me with the following steps:

1. Boot WS Live
2. Install ibus-mozc
3. Logout and Login to reflect it to ibus
4. Add mozc to the Input Source
5. Logout and Login to activate it
6. See the input menu

I can see the mozc specific menu at the input menu.

Comment 18 fujiwara 2021-12-21 09:55:16 UTC
(In reply to Takehiko Abe from comment #15)
> (In reply to fujiwara from comment #14)
> > I think X app no longer works if Xwayland and ibus-x11 do not run and it's
> > not an ibus-mozc issue.
> 
> ?? Xwayland and ibus-x11 do run.

OK, I got the behavior now.

(In reply to fujiwara from comment #8)
> Seems SetGlobalEngine D-Bus method is succeeded.
> In the Fedora 35 latest, ibus-x11 is not called in GNOME Wayland:
> https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/misc/ibusManager.
> js#L67

Now Xwayland and ibus-x11 do not run by default in Fedora 35.

But I observed Xwayland runs after users run any X apps and ibus-daemon restarts with ibus-x11.
Now Xwayland and ibus-x11 runs likes modules, interesting.

Comment 19 Akira TAGOH 2021-12-21 12:00:29 UTC
The above fix from Ubuntu is a workaround right. should this be reassigned to ibus to get the right solution for this?

Comment 20 fujiwara 2021-12-21 22:27:35 UTC
(In reply to Akira TAGOH from comment #19)
> The above fix from Ubuntu is a workaround right. should this be reassigned
> to ibus to get the right solution for this?

Could you please explain why such a workaround is required by ibus-mozc and ibus-mozc cannot provide the right solution?

Comment 21 Takehiko Abe 2021-12-22 01:23:59 UTC
(In reply to Akira TAGOH from comment #17)
> I checked the updates on WS Live again, to be sure. it works for me with the
> following steps:
> [...]

I tried the upgrade on Fedora 35 live and it worked.

I tried the upgrade again on the regular machine and it failed as it
did before. Strange. 

Not only the upgrade fails but it also prevents the 'starting X app'
work around from working. (Why? How?)

I will try the upgrade again on another machine with the freshly installed
Fedora 35 later and report back.

Comment 22 Takehiko Abe 2021-12-22 13:23:09 UTC
> I will try the upgrade again on another machine with the freshly installed
> Fedora 35 later and report back.

I tested the ibus-mozc in the update-testing on a freshly installed fedora 35
machine and it worked. The problem is gone. puzzling.

I will try it on yet another machine tomorrow.

Comment 23 Takehiko Abe 2021-12-23 05:33:27 UTC
a small progress.

Created a new user and confirmed that the ibus-mozc in update-testing worked there.

After I copied ~/.mozc files from a main user (me) home to the new user's home,
ibus-mozc stopped working. If removed ~/.mozc again, then ibus-mozc start working
again.

However, removing .mozc from the main user (me) account does not fix the problem.
So there's still something else.

Comment 24 Takehiko Abe 2021-12-23 07:44:55 UTC
I reverted to ibus-mozc-2.25.4190.102-7.fc35.x86_64. Then, put the xxx.desktop file
to autostart xrefresh into /etc/xdg/autostart. And that fixed the problem for me.

So, I guess, that ibus-mozc in update-testing is not working for me is a different
bug/issue that is introduced by mozc 2.26.

Comment 25 Takehiko Abe 2021-12-24 05:00:03 UTC
(In reply to Takehiko Abe from comment #24)
> So, I guess, that ibus-mozc in update-testing is not working for me is a
> different
> bug/issue that is introduced by mozc 2.26.

I figured it out. It was all my fault.

Sometime ago I learned that ibus_config.textproto could be used to set
the initial input mode to hiragana. So I tried it.

I placed it under ~/.mozc with a single line; "active_on_launch:
True". It did not work.  So I copied it under ~/.config/mozc/. It did
not work either. And I left these two files there and forgot about
them.

Now, I found that mozc 2.26 does read these files but (apparently) it
does not like the fact that they contain only one line
"active_on_launch: True" and refuses to start.

After I added "engine {}" part like:

: engines {
:   name : "mozc-jp"
:   longname : "Mozc"
:   layout : "default"
:   layout_variant : ""
:   layout_option : ""
:   rank : 80
: }
: active_on_launch: True

mozc (in updated testing) starts working.

I apologize for confusion and wasted time. The ibus-mozc update in
testing does work. and it is great that I can set the initial mode
with mozc 2.26.

Thank you.

Comment 26 Akira TAGOH 2022-01-04 03:41:43 UTC
That's good to hear. thanks for testing.

Comment 27 Fedora Update System 2022-01-05 02:03:54 UTC
FEDORA-2021-9b1403ab0f has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.