[disco] OSK does not appear under wayland when a text-entry is focused

Bug #1816808 reported by Andrea Azzarone
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
im-config (Ubuntu)
Fix Released
Medium
Unassigned
Bionic
Fix Released
Medium
Gunnar Hjalmarsson

Bug Description

[Impact]

OSK does not work properly in Wayland sessions. Besides not showing up, as reported in this bug report, certain characters can't be typed (bug #1761554).

The proposed upload unset's the GTK_IM_MODULE variable, which fixes the issues.

[Test Case]

To confirm that the OSK works properly:

1. Install im-config from bionic-proposed and reboot

2. Log in to an Ubuntu on Wayland session

3. Open gedit and enable the screen keyboard
   (Settings -> Universal Access -> Typing)

4. When OSK shows up, confirm that you can enter accented characters
   via long-press.
   Example: long-press a and select à from the popup

   Also, confirm that certain keys for special characters result in
   correct characters. Examples: ~, √, ÷, ×, <, >, ¢

[Fix]

A proposed fix has been uploaded to the bionic queue.

[Regression Potential]

Well, this very fix did cause a regression a few months ago; LibreOffice and the GNOME search bar crashed when trying to use IBus input methods. Those issues have now been fixed.

The change is only made for Wayland sessions, which is not default in 18.04. Given this limitation, the regression risk is deemed to be low.

[Original description]

1. Login in a wayland session
2. Open an application with a text entry (e.g. gedit)
3. Focus gedit using the touch screen

Expected result:
The OSK appears

Actual results:
The OSK does not appear.

---

This is caused by the fact that we still set GTK_IM_MODULE in Wayland. IIRC during the cosmic cycle we introduced a change to not set GTK_IM_MODULE under Wayland but we dropped it because there were users experiencing crashes when using libreoffice: upstream should have fixed those crashes to my knowledge.

----

Also why are we setting GTK_IM_MODULE in X11 too? gnome-settings-daemon should be smart enough to load/unload that at run-time when required/not-required.

Andrea Azzarone (azzar1)
Changed in im-config (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in im-config (Ubuntu):
status: New → Confirmed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Hi Andrea,

If the LibreOffice crashes mentioned in bug #1761554 have been fixed, we should indeed revisit this issue. Is that something you have confirmed yourself? If so, adding back the fix which prevents the variable from being set on Wayland would be motivated.

I think that the latest upstream im-config version (40-1) would take care of this bug. OTOH, the delta between im-config 38-1 and 40-1 is not trivial, and since we are late in the cycle, I feel it would be safer to wait with that upgrade until after the release of Ubuntu 19.04.

As regards X11, g-s-d - unlike im-config - does not set GTK_IM_MODULE at all, but the variable has been set for many cycles on Ubuntu including the flavors.

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

I can confirm that the problem with LO crashes seems to be gone (also on bionic).

However, I have a problem with making OSK show up (not using a touch screen). In LibreOffice Writer it shows up after a mouse click in the text entry area, but I fail to enable OSK in gedit, gnome-terminal and Firefox.

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

On 2019-03-26 22:38, Gunnar Hjalmarsson wrote:
> However, I have a problem with making OSK show up (not using a touch
> screen). In LibreOffice Writer it shows up after a mouse click in
> the text entry area, but I fail to enable OSK in gedit,
> gnome-terminal and Firefox.

After an update today, the OSK shows up both in gedit and gnome-terminal (not in FF, though). Anyway, I see no reason to not stop setting GTK_IM_MODULE in Wayland, so I have uploaded a change.

Changed in im-config (Ubuntu):
status: Confirmed → Fix Committed
Changed in im-config (Ubuntu Bionic):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package im-config - 0.38-1ubuntu2

---------------
im-config (0.38-1ubuntu2) disco; urgency=medium

  * debian/patches/dont-set-GTK_IM_MODULE-on-wayland.patch:
    - Don't set GTK_IM_MODULE if IBus on Wayland session
      (LP: #1816808).

 -- Gunnar Hjalmarsson <email address hidden> Tue, 02 Apr 2019 18:30:00 +0200

Changed in im-config (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Changed in im-config (Ubuntu Bionic):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: Triaged → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

shouldn't this be fixed in cosmic too?

Changed in im-config (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Andrea, or anyone else affected,

Accepted im-config into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/im-config/0.34-1ubuntu1.3 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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 :

On 2019-04-05 11:08, Timo Aaltonen wrote:
> shouldn't this be fixed in cosmic too?

Well, I skipped it since there are only three months left. If it is a requirement, I'll do it. Please let me know.

I installed im-config 0.34-1ubuntu1.3 from bionic-proposed and verified the test case.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

it's not a hard requirement anymore, actually.. so, fixing cosmic is 'nice to have' if you can provide the fix and test it, but not strictly required

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

This bug was fixed in the package im-config - 0.34-1ubuntu1.3

---------------
im-config (0.34-1ubuntu1.3) bionic-proposed; urgency=medium

  * debian/patches/dont-set-GTK_IM_MODULE-on-wayland.patch:
    - Don't set GTK_IM_MODULE if IBus on Wayland session
      (LP: #1816808). (The regression, which caused the reversal of
      this same patch in version 0.34-1ubuntu1.2, has now been fixed.)

 -- Gunnar Hjalmarsson <email address hidden> Wed, 03 Apr 2019 19:07:00 +0200

Changed in im-config (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for im-config has completed successfully and the package has now been 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.