Keyboard input does't work in several apps with iBus running

Bug #1950703 reported by Marat
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned
firefox (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

If installed through Snap and with iBus running the keyboard doesn't work in Standard Notes, XMind and Chromium apps on Manjaro 21.1. Killing iBus fixes the issue.
The keyboard works in Visual Studio, however

snap 2.51.3-2
snapd 2.51.3-2
series 16
manjaro -
kernel 5.10.70-1-MANJARO

 sudo snap connections chromium

Interface Plug Slot Notes
audio-playback chromium:audio-playback :audio-playback -
audio-record chromium:audio-record :audio-record -
bluez chromium:bluez :bluez -
browser-support chromium:browser-sandbox :browser-support -
camera chromium:camera :camera -
content[gnome-3-28-1804] chromium:gnome-3-28-1804 gnome-3-28-1804:gnome-3-28-1804 -
content[gtk-3-themes] chromium:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] chromium:icon-themes gtk-common-themes:icon-themes -
content[sound-themes] chromium:sound-themes gtk-common-themes:sound-themes -
cups-control chromium:cups-control :cups-control -
desktop chromium:desktop :desktop -
desktop-legacy chromium:desktop-legacy :desktop-legacy -
gsettings chromium:gsettings :gsettings -
home chromium:home :home -
joystick chromium:joystick :joystick -
mount-observe chromium:mount-observe - -
mpris - chromium:mpris -
network chromium:network :network -
network-bind chromium:network-bind :network-bind -
network-manager chromium:network-manager - -
opengl chromium:opengl :opengl -
password-manager-service chromium:password-manager-service - -
personal-files chromium:chromium-config :personal-files -
pulseaudio chromium:pulseaudio - -
raw-usb chromium:raw-usb - -
removable-media chromium:removable-media :removable-media -
screen-inhibit-control chromium:screen-inhibit-control :screen-inhibit-control -
system-files chromium:etc-chromium-browser-policies :system-files -
system-packages-doc chromium:system-packages-doc :system-packages-doc -
u2f-devices chromium:u2f-devices :u2f-devices -
unity7 chromium:unity7 :unity7 -
upower-observe chromium:upower-observe :upower-observe -
wayland chromium:wayland :wayland -
x11 chromium:x11 :x11 -

sudo snap connections standard-notes

Interface Plug Slot Notes
audio-playback standard-notes:audio-playback :audio-playback -
browser-support standard-notes:browser-support :browser-support -
content[gnome-3-28-1804] standard-notes:gnome-3-28-1804 gnome-3-28-1804:gnome-3-28-1804 -
content[gtk-3-themes] standard-notes:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] standard-notes:icon-themes gtk-common-themes:icon-themes -
content[sound-themes] standard-notes:sound-themes gtk-common-themes:sound-themes -
desktop standard-notes:desktop :desktop -
desktop-legacy standard-notes:desktop-legacy :desktop-legacy -
gsettings standard-notes:gsettings :gsettings -
home standard-notes:home :home -
network standard-notes:network :network -
opengl standard-notes:opengl :opengl -
password-manager-service standard-notes:password-manager-service - -
pulseaudio standard-notes:pulseaudio :pulseaudio -
unity7 standard-notes:unity7 :unity7 -
wayland standard-notes:wayland :wayland -
x11 standard-notes:x11 :x11 -

sudo snap connections xmind

Interface Plug Slot Notes
audio-playback xmind:audio-playback :audio-playback -
browser-support xmind:browser-support :browser-support -
content[gnome-3-28-1804] xmind:gnome-3-28-1804 gnome-3-28-1804:gnome-3-28-1804 -
content[gtk-3-themes] xmind:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] xmind:icon-themes gtk-common-themes:icon-themes -
content[sound-themes] xmind:sound-themes gtk-common-themes:sound-themes -
desktop xmind:desktop :desktop -
desktop-legacy xmind:desktop-legacy :desktop-legacy -
gsettings xmind:gsettings :gsettings -
home xmind:home :home -
network xmind:network :network -
opengl xmind:opengl :opengl -
pulseaudio xmind:pulseaudio :pulseaudio -
unity7 xmind:unity7 :unity7 -
wayland xmind:wayland :wayland -
x11 xmind:x11 :x11 -

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the report Marat.
Could you please run e.g. chromium from a terminal (while ibus is running) and share any relevant output?

Could you also run `journalctl -f` in a separate terminal window, and share the output here?

Changed in snapd:
status: New → Incomplete
Revision history for this message
Marat (lookingafar) wrote (last edit ):
Download full text (10.9 KiB)

Here is an output from standard notes

 standard-notes
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
Set user data dir to /home/desktopuser/snap/standard-notes/common
Migration: moving /home/desktopuser/snap/standard-notes/73/.config/Standard Notes/logs to /home/desktopuser/snap/standard-notes/common
Migration: error occured while moving /home/desktopuser/snap/standard-notes/73/.config/Standard Notes/logs to /home/desktopuser/snap/standard-notes/common: dest already exists.
Migration: finished moving contents to /home/desktopuser/snap/standard-notes/common.
Error org.freedesktop.DBus.Error.Failed: cannot set "default-url-scheme-handler" subproperty "standardnotes" setting to invalid value "Standard Notes.desktop"
extServer: Server started at http://127.0.0.1:45653/
/usr/share/libdrm/amdgpu.ids: No such file or directory
[10352:1121/062515.939634:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

(standard-notes:10153): IBUS-WARNING **: 06:25:18.752: Unable to connect to ibus: The given address is empty

(standard-notes:10153): IBUS-WARNING **: 06:25:26.138: Events queue growing too big, will start to drop.

(standard-notes:10153): IBUS-WARNING **: 06:25:26.280: Events queue growing too big, will start to drop.

(standard-notes:10153): IBUS-WARNING **: 06:25:26.416: Events queue growing too big, will start to drop.

(standard-notes:10153): IBUS-WARNING **: 06:25:26.541: Events queue growing too big, will start to drop.

And this is an output from journalctl

sudo journalctl -f
[sudo] password for desktopuser:
-- Journal begins at Fri 2021-07-30 21:59:42 +08. --
Nov 21 06:32:50 manjarodesktop dbus-daemon[551]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Nov 21 06:32:50 manjarodesktop sudo[11813]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Nov 21 06:32:50 manjarodesktop audit[11813]: USER_ACCT pid=11813 uid=1000 auid=1000 ses=4 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="desktopuser" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Nov 21 06:32:50 manjarodesktop sudo[11813]: desktopuser : TTY=pts/1 ; PWD=/home/desktopuser ; USER=root ; COMMAND=/usr/bin/journalctl -f
Nov 21 06:32:50 manjarodesktop audit[11813]: CRED_REFR pid=11813 uid=1000 auid=1000 ses=4 msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Nov 21 06:32:50 manjarodesktop kernel: audit: type=1101 audit(1637447570.057:362): pid=11813 uid=1000 auid=100...

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks Marat. This warning looks relevant:

    IBUS-WARNING **: 06:25:18.752: Unable to connect to ibus: The given address is empty

Changed in snapd:
status: Incomplete → New
Revision history for this message
Olivier Tilloy (osomon) wrote :

Can you let us know the version of ibus, which desktop environment you're using, and whether it's an X11 or Wayland session?

Revision history for this message
Marat (lookingafar) wrote (last edit ):

I am using Gnome with Wayland session. Ibus version is 1.5.25.

Gnome Version: 41.1

~  ibus version
IBus 1.5.25

~  loginctl show-session 3 -p Type
Type=wayland

~  uname -a
Linux manjarodesktop 5.10.79-1-MANJARO #1 SMP PREEMPT Fri Nov 12 20:26:09 UTC 2021 x86_64 GNU/Linux

My snap version is 2.53 now.

~  snap version
snap 2.53.2-2-dirty
snapd 2.53.2-2-dirty
series 16
manjaro -
kernel 5.10.79-1-MANJARO

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Hi Marat, could you please confirm if this is still an issue?

Revision history for this message
Max Faxälv (foorack) wrote :

Able to reproduce on many computers. Bug impacts all Snap apps, unable to type in both Firefox and Software Store.

```
[234431.941238] audit: type=1107 audit(1696250179.263:1466): pid=1482 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.DBus.Properties" member="PropertiesChanged" name=":1.23" mask="receive" pid=115475 label="snap.firefox.firefox" peer_pid=2011 peer_label="unconfined"
                 exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[234442.455061] audit: type=1107 audit(1696250189.778:1467): pid=1482 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.DBus.Properties" member="PropertiesChanged" name=":1.23" mask="receive" pid=115475 label="snap.firefox.firefox" peer_pid=2011 peer_label="unconfined"
                 exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[234445.251063] audit: type=1107 audit(1696250192.574:1468): pid=1482 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.DBus.Properties" member="PropertiesChanged" name=":1.23" mask="receive" pid=115475 label="snap.firefox.firefox" peer_pid=2011 peer_label="unconfined"
                 exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
```

Revision history for this message
HG (hgncl) wrote (last edit ):

This is also affecting the latest/stable Firefox snap, 121.0-1.1 published on 2023-12-20. Upgrading to latest/beta still has the problem.

Reverting the snap resolves the issue but stops Firefox from loading the user's current profile, so I can't recommend that my users downgrade.

Revision history for this message
HG (hgncl) wrote (last edit ):

I am using SSSD to authenticate users against Active Directory and have home directories of the form "/home/mydomain/user". This is a common configuration in organisations that use Active Directory. This $PATH has caused interesting problems with Snapd before[1] because of the decision[2] to "vendor" AppArmor config into the snap.

Has anything related to IBus been "vendored" into snapd or individual snaps this way?

[1]: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2032668
[2]: https://github.com/snapcore/snapd/blob/5a0f7c76112412ebfae5ed8b22b51fc6f3b14b70/NEWS.md#new-in-snapd-260

Revision history for this message
HG (hgncl) wrote :

After today's package upgrade and a reboot, I can now type into Firefox again without having to kill iBus first. 😊

Revision history for this message
Anna (meatus) wrote :

we have still the problem with firefox and app store with snap 2.61.

Revision history for this message
HG (hgncl) wrote (last edit ):

I have this on a timeshare service and it's back on my desktop too.

Revision history for this message
HG (hgncl) wrote :

Here is the behaviour as a video.

I discovered that once you kill the ibus-daemon the first time, Firefox will work again after that even if you `systemctl restart gdm`, which starts IBus again.

When you reboot, you have to kill IBus all over again once to get Firefox to work.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Georg Pelz (gpelz) wrote :

Not sure this helps, but I had this problem with multiple users and some not on Ubuntu 24.04 Desktop, figured out that using:

gsettings set org.gnome.desktop.interface gtk-im-module gtk-im-context-simple

fixed the problem, after that and rebooting, keyboard input worked again in Firefox, Thunderbird and Chromium. (needed to call this per account)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.