Bug 420522 - KDE apps started on session restore cannot type accented chars like 'á'
Summary: KDE apps started on session restore cannot type accented chars like 'á'
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.18.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-24 20:47 UTC by Luiz Angelo De Luca
Modified: 2023-01-17 13:40 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
env from konsole where accents do not work (2.21 KB, text/plain)
2020-07-14 01:23 UTC, Luiz Angelo De Luca
Details
env from konsole where accents do work (2.12 KB, text/plain)
2020-07-14 01:23 UTC, Luiz Angelo De Luca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Angelo De Luca 2020-04-24 20:47:54 UTC
Hello,

Those apps left open and started by session restore on the next login cannot type accented chars. However, keyboard mapping seems to be correct as I can insert layout specific chars like 'ç' and any 'alt gr' variations.

It does not happen with firefox but it affects konsole and kwrite. If I close them and reopen, it can type any chars again. 

I already reported this https://bugs.launchpad.net/ubuntu/+source/plasma-desktop/+bug/1873167 but without an answer.
Comment 1 David Edmundson 2020-04-26 13:31:38 UTC
That's surprising.


Can you give full steps to reproduce

Also could you include output of 

cat /proc/`pidof konsole`/environ | tr '\0' '\n'


for a working and broken konsole.
Comment 2 David Edmundson 2020-07-13 18:04:14 UTC
marking as needs info
Comment 3 Luiz Angelo De Luca 2020-07-14 01:23:01 UTC
Created attachment 130100 [details]
env from konsole where accents do not work
Comment 4 Luiz Angelo De Luca 2020-07-14 01:23:23 UTC
(In reply to David Edmundson from comment #1)
> That's surprising.
> 
> 
> Can you give full steps to reproduce

I don't know how to reproduce it. I'm upgrading my ubuntu installation for some years and I installed kubuntu packages (while still using ubuntu gdm). 

> Also could you include output of 
> 
> cat /proc/`pidof konsole`/environ | tr '\0' '\n'
> 
> 
> for a working and broken konsole.


~ $ diff -u konsole.err konsole.ok | grep -v '^ '
--- konsole.err 2020-07-13 22:16:30.544985468 -0300
+++ konsole.ok  2020-07-13 22:16:41.496413493 -0300
@@ -3,16 +3,15 @@
+DESKTOP_STARTUP_ID=zipper;1594689313;826606;50572_TIME32863387
-GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/luizluca/.gtkrc-2.0:/home/luizluca/.config/gtkrc-2.0
-GTK_RC_FILES=/etc/gtk/gtkrc:/home/luizluca/.gtkrc:/home/luizluca/.config/gtkrc
@@ -55,7 +54,7 @@
-XAUTHORITY=/tmp/xauth-1000-_1
+XAUTHORITY=/run/user/1000/gdm/Xauthority

I'll attach the files.
Comment 5 Luiz Angelo De Luca 2020-07-14 01:23:48 UTC
Created attachment 130101 [details]
env from konsole where accents do work
Comment 6 Bug Janitor Service 2020-07-29 04:33:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Luiz Angelo De Luca 2020-07-29 13:12:46 UTC
Just removing wait for info
Comment 8 Nate Graham 2021-03-19 20:14:36 UTC
Not quite the same as Bug 411729, but seems related.
Comment 9 Luiz Angelo De Luca 2021-03-19 20:53:02 UTC
(In reply to Nate Graham from comment #8)
> Not quite the same as Bug 411729, but seems related.

I'm affected by both on different systems. That one in OpenSUSE Tumbleweed (wayland only) and this one only in Ubuntu.

It's difficult to isolate this problem as it only happens with software launched by session restore. If I launch a new one, even from inside a konsole that is manifesting the problem, the new process work as expected.

In the case of Ubuntu, QT_IM_MODULE is defined as ibus, even for those problematic processes. I gave another try to debug it:

I noticed that there is no ibus-daemon running. The moment I launch it, konsole starts to type accent chars correctly. If I kill ibus-daemon afterwards, it stops to type anything. It looks like it started in a "basic input fallback mode" when it failed to use ibus. After KDE is up, KDE might offer another option for input, which new konsole processes take and it works as expected. It is just a guess.

Now, as I know it is related to ibus, I grepped my .config and found:

.config/systemsettingsrc:
...
[Open-with settings]
CompletionMode=5
History=ibus-daemon --xim --replace --panel=/usr/lib/ibus/ibus-ui-gtk3
...

.config/autostart/ibus-daemon.desktop:
...
Exec=ibus-daemon --xim --replace --panel=/usr/lib/ibus/ibus-ui-gtk3
...

If I manually run that line after ibus-daemon was manually started, konsole returns to the broken state. The "--panel=/usr/lib/ibus/ibus-ui-gtk3" is the one generating the issue.

That autostart file is old, from 2017, probably from the time I used unity or gnome3. I disabled that autostart and now it works as expected.

What is broken? QT? Ibus? Someone that added that autostart and left it there?
Comment 10 Zamundaaa 2023-01-17 13:40:35 UTC
If this issue only appears when using the autostart file, it's probably nothing we can or need to do about.