No keyboard input in Firefox window; logging out and logging back in fixes it

My laptop’s keyboard input doesn’t work in Firefox. I can interact with Firefox using the trackpad, but not the keyboard. Keyboard input works in other applications. When I log out and log back in, keyboard input into Firefox appears to work. For what it’s worth, I noticed this recently in Fedora 41, but I’m using Fedora 42 Beta now.

How can I troubleshoot this further?

           /:-------------:\          billy@lemp13
        :-------------------::        OS: Fedora 42
      :-----------/shhOHbmp---:\      Kernel: x86_64 Linux 6.14.0-63.fc42.x86_64
    /-----------omMMMNNNMMD  ---:     Uptime: 1h 18m
   :-----------sMMMMNMNMP.    ---:    Packages: 7675
  :-----------:MMMdP-------    ---\   Shell: bash 5.2.37
 ,------------:MMMd--------    ---:   Resolution: No X Server
 :------------:MMMd-------    .---:   DE: GNOME 48.0
 :----    oNMMMMMMMMMNho     .----:   WM: Mutter
 :--     .+shhhMMMmhhy++   .------/   WM Theme: Adwaita
 :-    -------:MMMd--------------:    GTK Theme: Adwaita [GTK2/3]
 :-   --------/MMMd-------------;     Icon Theme: Adwaita
 :-    ------/hMMMy------------:      Font: Adwaita Sans 11
 :-- :dMNdhhdNMMNo------------;       Disk: 436G / 1.9T (24%)
 :---:sdNMMMMNds:------------:        CPU: Intel Core Ultra 5 125U @ 14x 4.3GHz [74.0°C]
 :------:://:-------------::          GPU: Mesa Intel(R) Graphics (MTL)
 :---------------------://            RAM: 5798MiB / 55807MiB

Is this Firefox from RPM or Flatpak?

If flatpak then try with the RPM version.

RPM version.

Once the problem occurs check both the system and user journals for error logs.

I also have the same problem. Slack electron app doesn’t “release” the keyboard, closing it allows Firefox to regain the keyboard control

Timeline:

  • 00:10 - Firefox launched after boot and log in; keyboard input doesn’t work in Firefox
  • 00:20 - Log out, log back in, and launch Firefox; keyboard input in Firefox works.

These two lines show up at 00:10 but not 00:20, so it looks like Firefox is having trouble connecting to ibus?

Apr 07 00:10:21 lemp13 org.mozilla.firefox.desktop[4236]: [Parent 4236, Main Thread] WARNING: Unable to connect to ibus: Could not connect: Connection refused: 'glib warning', file /builddir/build/BUILD/firefox-137.0-build/firefox-137.0/toolkit/xre/nsSigHandlers.cpp:201
Apr 07 00:10:21 lemp13 firefox[4236]: Unable to connect to ibus: Could not connect: Connection refused
$ journalctl -b | grep firefox  
Apr 07 00:10:20 lemp13 systemd[3012]: Started dbus-:1.2-org.mozilla.firefox.SearchProvider@0.service.
Apr 07 00:10:20 lemp13 systemd[3012]: Started app-gnome-org.mozilla.firefox-4236.scope - Application launched by gnome-shell.
Apr 07 00:10:20 lemp13 org.mozilla.firefox.desktop[4236]: Error: Failed to open Wayland display, fallback to X11. WAYLAND_DISPLAY='wayland-0' DISPLAY=':0'
Apr 07 00:10:21 lemp13 org.mozilla.firefox.desktop[4236]: [Parent 4236, Main Thread] WARNING: Unable to connect to ibus: Could not connect: Connection refused: 'glib warning', file /builddir/build/BUILD/firefox-137.0-build/firefox-137.0/toolkit/xre/nsSigHandlers.cpp:201
Apr 07 00:10:21 lemp13 firefox[4236]: Unable to connect to ibus: Could not connect: Connection refused
Apr 07 00:10:21 lemp13 rtkit-daemon[1720]: Successfully made thread 4412 of process 4236 (/usr/lib64/firefox/firefox) owned by '1000' RT at priority 10.
Apr 07 00:10:22 lemp13 org.mozilla.firefox.desktop[4236]: (as)
Apr 07 00:10:22 lemp13 org.mozilla.firefox.desktop[4236]: (asas)
Apr 07 00:10:26 lemp13 org.mozilla.firefox.desktop[4381]: libva info: VA-API version 1.22.0
Apr 07 00:10:26 lemp13 org.mozilla.firefox.desktop[4381]: libva info: Trying to open /usr/lib64/dri-nonfree/iHD_drv_video.so
Apr 07 00:10:26 lemp13 org.mozilla.firefox.desktop[4381]: libva info: Found init function __vaDriverInit_1_22
Apr 07 00:10:26 lemp13 org.mozilla.firefox.desktop[4381]: libva info: va_openDriver() returns 0
Apr 07 00:10:28 lemp13 rtkit-daemon[1720]: Successfully made thread 4893 of process 4665 (/usr/lib64/firefox/firefox) owned by '1000' RT at priority 10.
Apr 07 00:10:34 lemp13 org.mozilla.firefox.desktop[4236]: (as)
Apr 07 00:10:34 lemp13 org.mozilla.firefox.desktop[4236]: (asas)
Apr 07 00:10:56 lemp13 packagekitd[2317]: Failed to get cache filename for firefox
Apr 07 00:18:21 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
Apr 07 00:18:43 lemp13 org.mozilla.firefox.desktop[4236]: (as)
Apr 07 00:18:43 lemp13 org.mozilla.firefox.desktop[4236]: (asas)
Apr 07 00:18:43 lemp13 org.mozilla.firefox.desktop[4236]: (asas)
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:24 lemp13 org.mozilla.firefox.desktop[4236]: [GFX1]: Error in eglSetDamageRegion: 0x3009
Apr 07 00:20:25 lemp13 systemd[3012]: app-gnome-org.mozilla.firefox-4236.scope: Consumed 1min 42.911s CPU time, 2.8G memory peak.
Apr 07 00:20:33 lemp13 firefox[4065]: [4065, Main Thread] WARNING: g_dbus_connection_unregister_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed: 'glib warning', file /builddir/build/BUILD/firefox-137.0-build/firefox-137.0/toolkit/xre/nsSigHandlers.cpp:201
Apr 07 00:20:33 lemp13 firefox[4065]: g_dbus_connection_unregister_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Apr 07 00:20:33 lemp13 systemd[3012]: dbus-:1.2-org.mozilla.firefox.SearchProvider@0.service: Consumed 81ms CPU time, 83M memory peak.
Apr 07 00:20:46 lemp13 systemd[3012]: Started dbus-:1.2-org.mozilla.firefox.SearchProvider@0.service.
Apr 07 00:20:46 lemp13 systemd[3012]: Started app-gnome-org.mozilla.firefox-8065.scope - Application launched by gnome-shell.
Apr 07 00:20:46 lemp13 org.mozilla.firefox.desktop[8065]: Error: Failed to open Wayland display, fallback to X11. WAYLAND_DISPLAY='wayland-0' DISPLAY=':0'
Apr 07 00:20:47 lemp13 rtkit-daemon[1720]: Successfully made thread 8226 of process 8065 (/usr/lib64/firefox/firefox) owned by '1000' RT at priority 10.
Apr 07 00:20:48 lemp13 org.mozilla.firefox.desktop[8065]: (as)
Apr 07 00:20:48 lemp13 org.mozilla.firefox.desktop[8065]: (asas)
Apr 07 00:20:52 lemp13 org.mozilla.firefox.desktop[8196]: libva info: VA-API version 1.22.0
Apr 07 00:20:52 lemp13 org.mozilla.firefox.desktop[8196]: libva info: Trying to open /usr/lib64/dri-nonfree/iHD_drv_video.so
Apr 07 00:20:52 lemp13 org.mozilla.firefox.desktop[8196]: libva info: Found init function __vaDriverInit_1_22
Apr 07 00:20:52 lemp13 org.mozilla.firefox.desktop[8196]: libva info: va_openDriver() returns 0
Apr 07 00:20:52 lemp13 rtkit-daemon[1720]: Successfully made thread 8544 of process 8424 (/usr/lib64/firefox/firefox) owned by '1000' RT at priority 10.
Apr 07 00:20:57 lemp13 org.mozilla.firefox.desktop[8065]: (as)
Apr 07 00:20:57 lemp13 org.mozilla.firefox.desktop[8065]: (asas)
Apr 07 00:20:59 lemp13 packagekitd[6165]: Failed to get cache filename for firefox
Apr 07 00:25:10 lemp13 org.mozilla.firefox.desktop[8065]: [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt

Are you running other apps that might be causing the problem as jsnjack found?

The error message shows: WARNING: Unable to connect to ibus: Could not connect: Connection refused: 'glib warning', This message is associated with attempts to run GUI apps using sudo (maybe without the -H option or corresponding sudo configuration). How are you launching Firefox? Do you have multiple Firefox windows? What Firefox extensions are you using (see about:support page). Here:

Add-ons
Name 	Type 	Version 	Enabled 	ID
Add-ons Search Detection	extension	2.0.0	true	addons-search-detection@mozilla.com
Disconnect	extension	20.3.1.2	true	2.0@disconnect.me
DuckDuckGo Privacy Essentials	extension	2025.2.20	true	jid1-ZAdIEUB7XOzOJw@jetpack
Malwarebytes Browser Guard	extension	3.0.16	true	{242af0bb-db11-4734-b7a0-61cb8a9b20fb}
NoScript	extension	12.1.1	true	{73a6fe31-595d-460b-a920-fcc0f8843232}
Privacy Badger	extension	2025.3.27	true	jid1-MnnxcxisBPnSXQ@jetpack
Tab ReTitle	extension	1.5.2	true	{e855175b-f84a-429d-85d6-a61831c8291c}
uBlock Origin	extension	1.63.2	true	uBlock0@raymondhill.net
Language: English (CA)	locale	137.0.20250327.43313	true	langpack-en-CA@firefox.mozilla.org
System theme — auto	theme	1.4.1	true	default-theme@mozilla.org
Dark	theme	1.3.2	false	firefox-compact-dark@mozilla.org
Firefox Alpenglow	theme	1.5	false	firefox-alpenglow@mozilla.org
Light	theme	1.3	false	firefox-compact-light@mozilla.org
 	                        

I’m launching Firefox normally through the GUI: I boot the machine, log in, type “firefox” in the Gnome app search and hit Enter. I notice no keyboard input, so I log out, log back in, and launch Firefox the exact same way, and keyboard input works.

I have Firefox set to open previous session tab and windows, so Firefox usually starts with multiple tabs and windows open.

Firefox extensions:

Add-ons
Name 	Type 	Version 	Enabled 	ID
Add-ons Search Detection	extension	2.0.0	true	addons-search-detection@mozilla.com
Archive Page	extension	0.9.0	true	{5b22cb75-8e43-4f2a-bb9b-1da0655ae564}
BetterTTV	extension	7.6.12	true	firefox@betterttv.net
GNOME Shell integration	extension	12	true	chrome-gnome-shell@gnome.org
Twitch Channel Points Autoclicker	extension	1.6.1	true	{3c9b993f-29b9-44c2-a913-def7b93a70b1}
uBlock Origin	extension	1.63.2	true	uBlock0@raymondhill.net
Wayback Machine	extension	3.2	true	wayback_machine@mozilla.org
Dark	theme	1.3.2	true	firefox-compact-dark@mozilla.org
Firefox Alpenglow	theme	1.5	false	firefox-alpenglow@mozilla.org
Light	theme	1.3	false	firefox-compact-light@mozilla.org
System theme — auto	theme	1.4.1	false	default-theme@mozilla.org

I took a stab and uninstalled the GNOME Shell integration add-on/extension, and this behavior seems to have changed? After a reboot, the first launch of Firefox exhibited this “no keyboard input” behavior, but after closing and re-opening Firefox, keyboard input worked, which was different behavior since previously I had to to log out and log back in before keyboard input started working again.

I rebooted again, and keyboard input worked on Firefox’s first launch.

I rebooted a third time, and the original behavior returned where I had to log out and log back in before Firefox didn’t throw an ibus warning in the logs. When Firefox was throwing the ibus warning, I tried launching Firefox using the Troubleshoot Mode by clicking Help → Troubleshoot Mode, which disables all the add-ons and extensions and reboots Firefox in a “safe mode” of sorts, but that didn’t solve the problem either. So, I don’t think it’s any of my add-ons or extensions? Very strange.

I don’t believe so. I launched Firefox immediately after logging into Gnome.

Does the issue occur if you revert this setting? I worry that this is hard to implement correctly for web sites that connect to an unstable list of 3rd party sites (I tend to only grant temporary access in NoScript). You could check to see if the issue is associated with a particular site by only having one site open when ending in a session.

Next steps:

  • consider Gnome Shell’s Focus Stealing Prevention (FSP). I wonder if there is some clash between preserving previous sessions in Firefox and FSP.
  • check permissions (ls -lRZ ~/.mozilla/firefox). I see files/directories owned by me with 'unconfined_u:object_r:mozilla_home_t:s0`.
  • check for the issue with a newly created user (default Firefox configuration). Maybe try with default settings and then add the “open previous session” setting.