Bug 2210137 - [iBus] Keyboard input starts lagging after a while in firefox 113.0.1
Summary: [iBus] Keyboard input starts lagging after a while in firefox 113.0.1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: fujiwara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-25 20:35 UTC by Alexander Ploumistos
Modified: 2025-03-09 04:25 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-08 17:33:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alexander Ploumistos 2023-05-25 20:35:38 UTC
Hello,

After upgrading to firefox 113.0.1 (113.0.1-1, 113.0.1-3 and 113.0.1-4), I started noticing significant lags when typing. This happens after a while and it doesn't matter where I'm typing, in the URL bar, in a filed on some web page, in about:config, etc.. The lag can be up to a few tens of seconds. Mouse input and keyboard shortcuts aren't affected.

When the characters start to appear, I see these two messages in my system log:

May 25 22:01:06 firefox.desktop[4971]: [Parent 4971, Main Thread] WARNING: Process Key Event failed: Timeout was reached.: 'glib warning', file /builddir/build/BUILD/firefox-113.0.1/toolkit/xre/nsSigHandlers.cpp:167
May 25 22:01:06 firefox[4971]: Process Key Event failed: Timeout was reached.

They repeat for every delayed key press.


Today I've also noticed that when the typing lag is in effect, opening magnet links is also delayed. After I select which program I want to use to open the link, for a while nothing happens. When the link is eventually opened, I get these messages:

May 25 22:05:08 firefox.desktop[4971]: [Parent 4971, Main Thread] WARNING: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Timeout was reached (g-io-error-quark, 24)
May 25 22:05:08 firefox.desktop[4971]: : 'glib warning', file /builddir/build/BUILD/firefox-113.0.1/toolkit/xre/nsSigHandlers.cpp:167
May 25 22:05:08 firefox[4971]: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Timeout was reached (g-io-error-quark, 24)


Does any of that provide a hint as to what is happening or am I in for a happy debugging weekend ? :)

I am running firefox on X, most of the time using Intel graphics (every time I've encountered the issue).

Comment 1 Martin Stransky 2023-05-26 09:16:55 UTC
Can you try Mozilla upstream binnary?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Also can you try to downgrade to 112.0? you can download it directly from https://koji.fedoraproject.org/koji/packageinfo?packageID=37
Thanks.

Comment 2 Alexander Ploumistos 2023-05-26 11:49:19 UTC
Hi Martin,

which of the two would you like me to try first?

Comment 3 Alexander Ploumistos 2023-05-26 20:06:25 UTC
I've been running firefox-112.0.2-1.fc38 for the last ~4 hours, no issue whatsoever, nothing in the logs. I'm going to try Mozilla's binary next. Should I go for the Nightly as well?

Comment 4 Alexander Ploumistos 2023-05-30 05:48:09 UTC
I can no longer reproduce this. Looking at the time other updates were installed and when the bug last occurred, this was fixed either by the latest ibus or mesa builds.
Closing.

Comment 5 Alexander Ploumistos 2023-06-04 12:35:55 UTC
I had this happen again today, 10 days since the last time. I cannot figure out what's triggering it, Martin, can you think of anything I could try?

Comment 6 Alexander Ploumistos 2023-06-04 15:59:18 UTC
What I'm experiencing resembles a lot the problem in bug #727385. Does this (or the patch in c14) offer any clues?

Comment 7 Alexander Ploumistos 2023-07-14 23:08:14 UTC
I had completely forgotten about this, but after all this time, I hit the issue again, now on firefox-115.0-2:

Jul 15 00:27:11 firefox.desktop[4490]: [Parent 4490, Main Thread] WARNING: Process Key Event failed: Timeout was reached.: 'glib warning', file /builddir/build/BUILD/firefox-115.0/toolkit/xre/nsSigHandlers.cpp:167
Jul 15 00:27:11 firefox[4490]: Process Key Event failed: Timeout was reached.


Would running firefox in gdb produce something useful?

Comment 8 Martin Stransky 2023-10-02 08:02:25 UTC
(In reply to Alexander Ploumistos from comment #7)
> I had completely forgotten about this, but after all this time, I hit the
> issue again, now on firefox-115.0-2:
> 
> Jul 15 00:27:11 firefox.desktop[4490]: [Parent 4490, Main Thread] WARNING:
> Process Key Event failed: Timeout was reached.: 'glib warning', file
> /builddir/build/BUILD/firefox-115.0/toolkit/xre/nsSigHandlers.cpp:167
> Jul 15 00:27:11 firefox[4490]: Process Key Event failed: Timeout was reached.
> 
> 
> Would running firefox in gdb produce something useful?

Hello Alexander, sorry for late reply here. 
Do you use any specifix/different keyboard input method/module? Which locale do you use?
Thanks.

Comment 9 Alexander Ploumistos 2023-10-06 06:33:11 UTC
Hello Martin,


(In reply to Martin Stransky from comment #8)
> Do you use any specifix/different keyboard input method/module?

Do you mean something like the typing booster? I don't.
Lately I have been using input-remapper, which I maintain, but I have had the issue with it disabled, so I don't think it is related.
https://src.fedoraproject.org/rpms/input-remapper/


> Which locale do you use?

$ localectl status
System Locale: LANG=en_US.UTF-8
    VC Keymap: us
   X11 Layout: us,gr
  X11 Variant: ,


Last occurrence was about three weeks ago. I still don't know what triggers it and I haven't had the same problem with any other program, it's just firefox.

Comment 10 Alexander Ploumistos 2023-10-20 10:20:11 UTC
… and again with 118.0.2 (I'm not sure the version matters at this point).
This time there were also issues with clicks on the interface:

Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING: ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167
Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING: ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167
Oct 20 11:31:09 firefox[4901]: Create input context failed: Timeout was reached.
Oct 20 11:31:09 firefox[4901]: Create input context failed: Timeout was reached.
Oct 20 11:31:09 firefox[4901]: ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) == FALSE' failed
Oct 20 11:31:09 firefox[4901]: ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) == FALSE' failed
Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING: ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167
Oct 20 11:31:09 firefox[4901]: ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) == FALSE' failed
Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING: ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167

Comment 11 Martin Stransky 2023-11-02 10:40:56 UTC
(In reply to Alexander Ploumistos from comment #10)
> … and again with 118.0.2 (I'm not sure the version matters at this point).
> This time there were also issues with clicks on the interface:
> 
> Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING:
> ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable !=
> NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file
> /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167
> Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING:
> ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable !=
> NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file
> /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167
> Oct 20 11:31:09 firefox[4901]: Create input context failed: Timeout was
> reached.
> Oct 20 11:31:09 firefox[4901]: Create input context failed: Timeout was
> reached.
> Oct 20 11:31:09 firefox[4901]: ibus_im_context_filter_keypress: assertion
> 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) ==
> FALSE' failed
> Oct 20 11:31:09 firefox[4901]: ibus_im_context_filter_keypress: assertion
> 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) ==
> FALSE' failed
> Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING:
> ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable !=
> NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file
> /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167
> Oct 20 11:31:09 firefox[4901]: ibus_im_context_filter_keypress: assertion
> 'ibusimcontext->cancellable != NULL || ibus_bus_is_connected (_bus) ==
> FALSE' failed
> Oct 20 11:31:09 firefox.desktop[4901]: [Parent 4901, Main Thread] WARNING:
> ibus_im_context_filter_keypress: assertion 'ibusimcontext->cancellable !=
> NULL || ibus_bus_is_connected (_bus) == FALSE' failed: 'glib warning', file
> /builddir/build/BUILD/firefox-118.0.2/toolkit/xre/nsSigHandlers.cpp:167

Looks like you use alternative Gtk input method (ibus) which causes it:
https://wiki.archlinux.org/title/IBus

Comment 12 Alexander Ploumistos 2023-11-03 01:51:55 UTC
Hi Martin,

I'm afraid I don't understand. Isn't ibus the default input framework for GNOME? I've never actively sought to install or use it, I just found it there. What should I be using in its stead?
Also, was there something specific on Arch's wiki pertaining to my issue or did you link to it for the general information about ibus?

Thanks for still taking the time to look into my odd problems, I appreciate it.

Comment 13 Martin Stransky 2023-11-03 14:04:18 UTC
Try to disable iBus. 

There is some how-to although I'm not sure how to do it:
https://www.reddit.com/r/Fedora/comments/vygcg6/remove_ibus_from_fedora_workstation/
https://forums.fedoraforum.org/showthread.php?329295-Can-I-stop-iBus-from

Comment 14 fujiwara 2023-11-06 10:46:34 UTC
You can check if (In reply to Alexander Ploumistos from comment #0)
> They repeat for every delayed key press.

How often do you see your problem?

You can run `ibus exit` not to run ibus-daemon and you should check if IBus is relative with your issue.

Which desktop session do you use? GNOME Wayland? or GNOME Xorg?

Comment 15 Alexander Ploumistos 2023-11-06 11:14:25 UTC
Hello,

(In reply to fujiwara from comment #14)
> You can check if (In reply to Alexander Ploumistos from comment #0)
> > They repeat for every delayed key press.
> 
> How often do you see your problem?

Not very often, every few weeks. When I first reported it I encountered it a few times per day, but then it became much more rare. 


> You can run `ibus exit` not to run ibus-daemon and you should check if IBus
> is relative with your issue.

Would that have allowed me to type again in Firefox without a lag (if IBus were to blame) and without restarting Firefox?


> Which desktop session do you use? GNOME Wayland? or GNOME Xorg?

That computer is running GNOME Xorg.

Comment 16 fujiwara 2023-11-22 00:57:48 UTC
(In reply to Alexander Ploumistos from comment #15)
> Not very often, every few weeks. When I first reported it I encountered it a
> few times per day, but then it became much more rare. 

I guess your issues are different and the original issue was resolved by something.

> 
> 
> > You can run `ibus exit` not to run ibus-daemon and you should check if IBus
> > is relative with your issue.
> 
> Would that have allowed me to type again in Firefox without a lag (if IBus
> were to blame) and without restarting Firefox?

You need to restart firefox too.

> 
> 
> > Which desktop session do you use? GNOME Wayland? or GNOME Xorg?
> 
> That computer is running GNOME Xorg.

OK.

Comment 17 Alexander Ploumistos 2024-05-01 22:13:41 UTC
Hello again,

I'm currently on F39, sometime this month the computer concerned will move to F40.
I've been getting this issue very sporadically, so even though I tried exiting ibus and restarting firefox, I cannot state with any certainty that this solves the problem.
As I had this happen again and I had some spare time, I searched for the error messages and I saw another couple of reports of the same problem:

https://bugzilla.redhat.com/show_bug.cgi?id=2264276
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/message/2YX6Z42PXGBIHCGLNGY3VO2HA6BLOGJU/

There's also an attachment from fedoraforum.org, but I can't trace it back to a post.

I am also running firefox on the iGPU using the i915 driver, like Miroslaw. 

Sorry for bugging you Samuel and Miroslaw, but I was wondering if you had any more luck finding the source of the issue or if we could pool our resources and scratch heads together.

Comment 18 fujiwara 2024-05-01 23:52:39 UTC
I cannot reproduce your issue.

What is the output of `ibus im-module --type gtk3` command?

Comment 19 Alexander Ploumistos 2024-05-02 04:56:55 UTC
(In reply to fujiwara from comment #18)
> I cannot reproduce your issue.
> 

Well, neither can I, it just happens, sometimes… 


> What is the output of `ibus im-module --type gtk3` command?

ibus

Comment 20 Samuel Sieb 2024-05-02 05:37:25 UTC
I've never seen this again.

Comment 21 Alexander Ploumistos 2024-05-02 05:43:29 UTC
(In reply to Samuel Sieb from comment #20)
> I've never seen this again.

Thanks for replying, was your case also with GNOME on Xorg and maybe using the i915 driver?

Comment 22 Samuel Sieb 2024-05-02 06:02:23 UTC
It was a long time ago, so I'm not sure which computer it was on.  But I only use Wayland and it was most likely AMD graphics.

Comment 23 fujiwara 2024-05-22 01:23:08 UTC
(In reply to Alexander Ploumistos from comment #19)
> (In reply to fujiwara from comment #18)
> > I cannot reproduce your issue.
> > 
> 
> Well, neither can I, it just happens, sometimes… 
> 
> 
> > What is the output of `ibus im-module --type gtk3` command?
> 
> ibus

I assume you uses GNOME Xorg.

I use firefox everyday but I don't see your issue.
I'd ask you if you can reproduce your issue with a new user account instead of the current user account.

Comment 24 fujiwara 2024-05-22 01:24:09 UTC
I'd also suggest to upgrade your Fedora 39 to 40.

Comment 25 Alexander Ploumistos 2024-05-22 07:25:36 UTC
(In reply to fujiwara from comment #24)
> I'd also suggest to upgrade your Fedora 39 to 40.

I have and so far I haven't had this happen.

Comment 26 Aoife Moloney 2024-11-08 10:52:50 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 27 Red Hat Bugzilla 2025-03-09 04:25:04 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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