Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing into text boxes sometimes fails, apparently due to ibus interactions #548

Open
AdamWill opened this issue Apr 4, 2024 · 10 comments
Labels
bug Something isn't working f39 Related to Fedora 39 f40 Related to Fedora 40 rawhide

Comments

@AdamWill
Copy link

AdamWill commented Apr 4, 2024

Describe the bug
In openQA testing of Silverblue, sometimes when we boot a freshly-installed Silverblue system, we cannot type. On the initial install test, this will cause failure at the timezone screen in gnome-initial-setup, because we cannot type the name of the city. On tests of applications etc. that run on a disk image inherited from the initial install test, this causes failure to log in (because we cannot type the password). Interestingly, the initial keypress of enter to select the user does work, indicating there's something specific to text entry boxes about this, perhaps.

To Reproduce
Please describe the steps needed to reproduce the bug:

  1. Boot a Silverblue install and try to type into gnome-initial-setup or the login screen. openQA tests in qemu VMs, if that's relevant. This fails only relatively rarely. I haven't reproduced it myself outside of the openQA environment yet, but I'm not sure why not, I may just not have tried enough times.

Expected behavior
Characters should be input and appear on screen (or dots, in the case of gdm password entry).

OS version:
Fedora 40 and Rawhide.

Additional context
If I grep the journal for ibus (case-insensitive), I see:

Mar 24 05:00:32 fedora ibus-engine-m17[1311]: skipped m17n:ko:han2 since its rank is lower than 0
Mar 24 05:00:32 fedora ibus-engine-m17[1311]: skipped m17n:ko:romaja since its rank is lower than 0
Mar 24 05:00:33 fedora ibus-engine-m17[1433]: skipped m17n:ko:han2 since its rank is lower than 0
Mar 24 05:00:33 fedora ibus-engine-m17[1433]: skipped m17n:ko:romaja since its rank is lower than 0
Mar 24 05:00:34 fedora org.gnome.Shell.desktop[1371]: /usr/share/ibus-typing-booster/engine/main.py:230: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Mar 24 05:00:34 fedora org.gnome.Shell.desktop[1371]: /usr/share/ibus-typing-booster/engine/main.py:239: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Mar 24 05:00:34 fedora /usr/libexec/gdm-wayland-session[1017]: dbus-daemon[1017]: [session uid=42 pid=1017] Activating service name='org.freedesktop.portal.IBus' requested by ':1.28' (uid=42 pid=1126 comm="ibus-daemon --panel disable" label="system_u:system_r:xdm_t:s0-s0:c0.c1023")
Mar 24 05:00:34 fedora /usr/libexec/gdm-wayland-session[1017]: dbus-daemon[1017]: [session uid=42 pid=1017] Successfully activated service 'org.freedesktop.portal.IBus'
Mar 24 05:00:34 fedora org.gnome.Shell.desktop[1454]: /usr/share/ibus-typing-booster/engine/main.py:230: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Mar 24 05:00:34 fedora org.gnome.Shell.desktop[1454]: /usr/share/ibus-typing-booster/engine/main.py:239: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Mar 24 05:00:34 fedora /usr/libexec/gdm-wayland-session[1017]: dbus-daemon[1017]: [session uid=42 pid=1017] Activating service name='org.freedesktop.portal.IBus' requested by ':1.31' (uid=42 pid=1338 comm="ibus-daemon --panel disable -r --xim" label="system_u:system_r:xdm_t:s0-s0:c0.c1023")
Mar 24 05:00:34 fedora /usr/libexec/gdm-wayland-session[1017]: dbus-daemon[1017]: [session uid=42 pid=1017] Successfully activated service 'org.freedesktop.portal.IBus'
Mar 24 05:00:34 fedora gnome-shell[1030]: ibus_bus_watch_ibus_signal: assertion 'bus->priv->watch_global_engine_changed_id == 0' failed
Mar 24 05:00:36 fedora gnome-shell[1030]: An object is already exported for the interface org.freedesktop.IBus.Service at /org/freedesktop/IBus/Panel
Mar 24 05:00:55 fedora gnome-shell[1030]: Error processing key on IM: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/IBus/InputContext_2”
Mar 24 05:00:56 fedora gnome-shell[1030]: Error processing key on IM: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/IBus/InputContext_2”
Mar 24 05:01:00 fedora gnome-shell[1030]: Error processing key on IM: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/IBus/InputContext_2”
Mar 24 05:01:00 fedora gnome-shell[1030]: Error processing key on IM: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/IBus/InputContext_2”

...and then a lot more occurrences of that last message (there seem to be two per keypress). On a Silverblue boot where typing does work, we see these messages:

Feb 16 07:19:56 fedora ibus-engine-m17[1307]: skipped m17n:ko:han2 since its rank is lower than 0
Feb 16 07:19:56 fedora ibus-engine-m17[1307]: skipped m17n:ko:romaja since its rank is lower than 0
Feb 16 07:19:57 fedora ibus-engine-m17[1423]: skipped m17n:ko:han2 since its rank is lower than 0
Feb 16 07:19:57 fedora ibus-engine-m17[1423]: skipped m17n:ko:romaja since its rank is lower than 0
Feb 16 07:19:57 fedora org.gnome.Shell.desktop[1422]: /usr/share/ibus-typing-booster/engine/main.py:230: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Feb 16 07:19:57 fedora org.gnome.Shell.desktop[1422]: /usr/share/ibus-typing-booster/engine/main.py:239: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Feb 16 07:19:57 fedora /usr/libexec/gdm-wayland-session[1014]: dbus-daemon[1014]: [session uid=42 pid=1014] Activating service name='org.freedesktop.portal.IBus' requested by ':1.30' (uid=42 pid=1120 comm="ibus-daemon --panel disable" label="system_u:system_r:xdm_t:s0-s0:c0.c1023")
Feb 16 07:19:57 fedora /usr/libexec/gdm-wayland-session[1014]: dbus-daemon[1014]: [session uid=42 pid=1014] Successfully activated service 'org.freedesktop.portal.IBus'
Feb 16 07:19:57 fedora org.gnome.Shell.desktop[1451]: /usr/share/ibus-typing-booster/engine/main.py:230: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Feb 16 07:19:57 fedora org.gnome.Shell.desktop[1451]: /usr/share/ibus-typing-booster/engine/main.py:239: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
Feb 16 07:19:57 fedora /usr/libexec/gdm-wayland-session[1014]: dbus-daemon[1014]: [session uid=42 pid=1014] Activating service name='org.freedesktop.portal.IBus' requested by ':1.33' (uid=42 pid=1322 comm="ibus-daemon --panel disable -r --xim" label="system_u:system_r:xdm_t:s0-s0:c0.c1023")
Feb 16 07:19:58 fedora /usr/libexec/gdm-wayland-session[1014]: dbus-daemon[1014]: [session uid=42 pid=1014] Successfully activated service 'org.freedesktop.portal.IBus'
Feb 16 07:19:58 fedora gnome-shell[1027]: ibus_bus_watch_ibus_signal: assertion 'bus->priv->watch_global_engine_changed_id == 0' failed
Feb 16 07:19:59 fedora gnome-shell[1027]: An object is already exported for the interface org.freedesktop.IBus.Service at /org/freedesktop/IBus/Panel

This bug never happens on Workstation. On a Workstation boot I only see these messages - fewer again than even the working Silverblue case, indicating there's some difference there, but I don't fully know what:

Feb 16 02:47:41 fedora /usr/libexec/gdm-wayland-session[1010]: dbus-daemon[1010]: [session uid=42 pid=1010] Activating service name='org.freedesktop.portal.IBus' requested by ':1.22' (uid=42 pid=1107 comm="ibus-daemon --panel disable" label="system_u:system_r:xdm_t:s0-s0:c0.c1023")
Feb 16 02:47:41 fedora /usr/libexec/gdm-wayland-session[1010]: dbus-daemon[1010]: [session uid=42 pid=1010] Successfully activated service 'org.freedesktop.portal.IBus'
Feb 16 02:47:42 fedora /usr/libexec/gdm-wayland-session[1010]: dbus-daemon[1010]: [session uid=42 pid=1010] Activating service name='org.freedesktop.portal.IBus' requested by ':1.33' (uid=42 pid=1403 comm="ibus-daemon --panel disable -r --xim" label="system_u:system_r:xdm_t:s0-s0:c0.c1023")
Feb 16 02:47:42 fedora /usr/libexec/gdm-wayland-session[1010]: dbus-daemon[1010]: [session uid=42 pid=1010] Successfully activated service 'org.freedesktop.portal.IBus'
@AdamWill AdamWill added the bug Something isn't working label Apr 4, 2024
@AdamWill
Copy link
Author

AdamWill commented Apr 4, 2024

CC @fujiwarat

@AdamWill
Copy link
Author

AdamWill commented Apr 9, 2024

Ooh! I just randomly reproduced this manually for the first time, when I was trying to do something completely different. Happened on a Fedora 39 Silverblue image openQA built to test https://bodhi.fedoraproject.org/updates/FEDORA-2024-4afd3d38ae . Looking at the openQA test history this does indeed affect F39 updates there too.

@AdamWill
Copy link
Author

AdamWill commented Apr 9, 2024

oooh. so, the manual reproduction makes this seem worse, because it's consistent. no matter how many times I reboot the affected install, the bug happens on every boot. I think maybe the broken state gets baked in at install time somehow?

I guess the good part is this should make reproducing easier. I'll take a copy of the affected disk image, and it should be possible for anyone to reproduce by booting that image.

@travier travier added rawhide f40 Related to Fedora 40 f39 Related to Fedora 39 labels Apr 9, 2024
@travier
Copy link
Member

travier commented Apr 9, 2024

So this could be a "build time" issue linked to how rpm-ostree does the compose. 🤔

@AdamWill
Copy link
Author

AdamWill commented Apr 9, 2024

Ugh. Crap. After completely powering down the VM and fiddling with the qcow2 file a bit (it turned out to be super large because of snapshots and stuff), I booted the VM again, and this time didn't hit the bug :(

So either somehow cleaning up the snapshots fixed it(?!) or it only persisted as long as I was warm booting the system, not completely powering it off. Or I just got incredibly lucky to hit it four times in a row, I guess.

@fujiwarat
Copy link

I think one possible reason. Does your problem happen when you don't use ibus-typing-booster?

@AdamWill
Copy link
Author

AdamWill commented Apr 12, 2024

hum, well, given how early the problem happens turning it off would be hard. I could possibly tweak the test that builds a Silverblue ostree and installer for updates to leave ibus-typing-booster out, though, and see if that makes the problem go away? I'll give it a shot.

edit: to be clear, the affected tests do not intentionally enable or use an ibus-typing-booster layout, they are using perfectly normal 'us' layout input. but I assume you mean ibus-typing-booster may be somehow 'active' even without it being configured as an input method?

@fujiwarat
Copy link

OK, Strictly speaking, installing ibus-typing-booster is fine but I'd ask if your problem happens without ibus-typing-booster in the user configured engine list.

You can check the current engine list with gsettings get org.gnome.desktop.input-sources sources command in your GNOME session and if the value includes ('ibus', 'typing-booster'), I'd like to ask you to test your session without the typing-booster.
Maybe you could override it with the gsettings command. E.g. gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('ibus', 'hangul')]" in case you install ibus-hangul and run the GNOME session and ibus-daemon.
The configuration can be done with gnome-control-center keyboard utility too.

@AdamWill
Copy link
Author

AdamWill commented Apr 12, 2024

OK, I will check, but I'm pretty sure it won't be there. This is happening to a clean out-of-the-box install in English with nothing done to change the input configuration from just the 'us' keyboard layout. Also note the bug happens before we reach a logged-in desktop session at all, which makes it trickier to use gsettings (it happens either during gnome-initial-setup when it happens during first install, or at GDM when it happens after first install).

@fujiwarat
Copy link

@AdamWill Thank you for the test. My assumption was not correct but I have a plan to enhance to check the "FocusId" D-Bus property in Fedora 41 and will let me ask you to test the issue again if the issue is not fixed yet.

deborahbrouwer pushed a commit to deborahbrouwer/os-autoinst-distri-fedora that referenced this issue May 2, 2024
The silverblue tests are flaky because of
fedora-silverblue/issue-tracker#548 .
The desktop_upgrade_encrypted test is flaky on Rawhide (so, when
booting from F40 initially) since we switched to UEFI, not sure
if it's because of UEFI somehow or just a timing coincidence.
Am going to look into it, but for now this should save lots of
manual restarting.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working f39 Related to Fedora 39 f40 Related to Fedora 40 rawhide
Projects
None yet
Development

No branches or pull requests

3 participants