Set GTK_IM_MODULE in Ubuntu on Xorg sessions

Bug #2007379 reported by Gunnar Hjalmarsson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
im-config (Debian)
Fix Released
Unknown
im-config (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Low
Gunnar Hjalmarsson
Kinetic
Won't Fix
Undecided
Unassigned

Bug Description

[ Impact ]

gnome-settings-daemon underwent a code refactoring before the release of version 42 as regards the IBus integration on x11. Initially there was the striking bug #1969637, but also with that one fixed, an issue due to the refactoring remains. These steps illustrate the problem:

* Prepare an Ubuntu desktop so it has only non-IBus items in the list
  of input sources, while the ibus-libpinyin package is installed.
* Log in to an Ubuntu on Xorg session
* Go to Settings -> Keyboard and add Chinese (Intelligent Pinyin) to
  the input sources
* Switch to Intelligent Pinyin
* Find that you only can input latin letters
* Log out and log in again
* Find that you now can input Chinese as expected

The need for the last relogin is an inconvenience and a regression compared to how it worked before gnome-settings-daemon 42.

The proposed upload makes im-config set the GTK_IM_MODULE variable to 'ibus' for Ubuntu on Xorg sessions, which makes it work as smoothly as it did previously.

[ Test Plan ]

* Prepare an Ubuntu desktop so it has only non-IBus items in the list
  of input sources, while the ibus-libpinyin package is installed.
* Install im-config from jammy-proposed
* Reboot and log in to an Ubuntu on Xorg session
* Go to Settings -> Keyboard and add Chinese (Intelligent Pinyin) to
  the input sources
* Switch to Intelligent Pinyin
* Find that you instantly can input Chinese

Post-release:

After the new version has been moved to jammy-updates and propagated, be attentive to the crash stats at errors.ubuntu.com. If a significant increase of crashes happens, which can be assumed to be related to this change, a reversal should be considered.

[ Where problems could occur ]

This means that we — again — make im-config interfere with the IM configuration on GNOME desktops. Via bug #1893551 we kind of did the opposite in order to reduce the frequency of ibus crashes. But the situation now is different:

- This is more narrow-scoped and limited to x11
- The upstream GNOME code has undergone significant changes
- The measure is greenlighted by the upstream IBus maintainer (I think
  Fedora does it too)

But with that said, I'm going to be attentive to the frequency of ibus crashes going forward.

[ Other Info ]

I prefer to skip kinetic for these reasons:
- Not so much time left before EOL
- Low importance
- A jammy user with an IBus IM already set up, and who upgrades to
  kinetic, won't encounter a problem.

Changed in im-config (Ubuntu Kinetic):
status: New → Won't Fix
Changed in im-config (Ubuntu Jammy):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

It was the discussion at this Ask Ubuntu question:

https://askubuntu.com/questions/1449426/not-able-to-type-hangul-letters

which called my attention to this issue.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Fixed in lunar via im-config 0.55-1.

Changed in im-config (Ubuntu):
status: Fix Committed → Fix Released
Changed in im-config (Debian):
status: Unknown → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

Gunnar, I suspect you know more about this area than anyone else in Ubuntu at the moment. So accepting on the basis that you think it makes sense to make this change. I do agree that the bug is significant enough for SRU.

But please could you expand the Test Plan to check for inadvertent regressions to unaffected users of Xorg?

Changed in im-config (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Gunnar, or anyone else affected,

Accepted im-config into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/im-config/0.50-2ubuntu22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

For full disclosure I should probably mention that we — unlike what's indicated above — won't set GTK_IM_MODULE in lunar. Soon after having submitted this bug report, my attention was called to this upstream g-s-d commit:

https://salsa.debian.org/gnome-team/gnome-settings-daemon/-/commit/27bc0889

With that in place, setting GTK_IM_MODULE in Ubuntu on Xorg sessions would be redundant. At the same time, the decision represented by that commit message confirms that setting it in jammy is motivated.

As requested I added a "post-release" item to the test plan.

The verification through the other test plan items has been accomplished successfully using im-config 0.50-2ubuntu22.04.1 from jammy-proposed.

description: updated
tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package im-config - 0.50-2ubuntu22.04.1

---------------
im-config (0.50-2ubuntu22.04.1) jammy; urgency=medium

  * Set GTK_IM_MODULE in Ubuntu on Xorg sessions (LP: #2007379)

 -- Gunnar Hjalmarsson <email address hidden> Wed, 15 Feb 2023 12:52:03 +0100

Changed in im-config (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for im-config has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.