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

[deck] Steam OSK does not support CJK languages #210

Closed
szescxz opened this issue Aug 28, 2023 · 14 comments · Fixed by #173 or #273
Closed

[deck] Steam OSK does not support CJK languages #210

szescxz opened this issue Aug 28, 2023 · 14 comments · Fixed by #173 or #273

Comments

@szescxz
Copy link

szescxz commented Aug 28, 2023


Japanese and Korean keyboards seem to work in Game Mode but they are also requiring Preview Channel in Desktop Mode.

steamwebhelper crashes if switch to "Traditional Chinese (Cangjie)" or "Traditional Chinese (Quick)" keyboard:

Aug 29 10:12:35 steamdeck systemd-coredump[3547]: [🡕] Process 2622 (steamwebhelper) of user 1000 dumped core.

                                                  Module libgvfscommon.so from rpm gvfs-1.50.6-1.fc38.x86_64
                                                  Module libgvfsdbus.so from rpm gvfs-1.50.6-1.fc38.x86_64
                                                  Module libbrotlicommon.so.1 from rpm brotli-1.0.9-11.fc38.x86_64
                                                  Module libbrotlidec.so.1 from rpm brotli-1.0.9-11.fc38.x86_64
                                                  Module libbz2.so.1 from rpm bzip2-1.0.8-13.fc38.x86_64
                                                  Module libgmp.so.10 from rpm gmp-6.2.1-4.fc38.x86_64
                                                  Module libhogweed.so.6 from rpm nettle-3.8-3.fc38.x86_64
                                                  Module libnettle.so.8 from rpm nettle-3.8-3.fc38.x86_64
                                                  Module libtasn1.so.6 from rpm libtasn1-4.19.0-2.fc38.x86_64
                                                  Module libunistring.so.5 from rpm libunistring-1.1-3.fc38.x86_64
                                                  Module libidn2.so.0 from rpm libidn2-2.3.4-2.fc38.x86_64
                                                  Module libp11-kit.so.0 from rpm p11-kit-0.25.0-1.fc38.x86_64
                                                  Module libcrypto.so.3 from rpm openssl-3.0.9-2.fc38.x86_64
                                                  Module libkeyutils.so.1 from rpm keyutils-1.6.1-6.fc38.x86_64
                                                  Module libkrb5support.so.0 from rpm krb5-1.21-3.fc38.x86_64
                                                  Module libcom_err.so.2 from rpm e2fsprogs-1.46.5-4.fc38.x86_64
                                                  Module libk5crypto.so.3 from rpm krb5-1.21-3.fc38.x86_64
                                                  Module libkrb5.so.3 from rpm krb5-1.21-3.fc38.x86_64
                                                  Module libdatrie.so.1 from rpm libdatrie-0.2.13-5.fc38.x86_64
                                                  Module libpixman-1.so.0 from rpm pixman-0.42.2-1.fc38.x86_64
                                                  Module libxcb-shm.so.0 from rpm libxcb-1.13.1-11.fc38.x86_64
                                                  Module libxcb-render.so.0 from rpm libxcb-1.13.1-11.fc38.x86_64
                                                  Module libpng16.so.16 from rpm libpng-1.6.37-14.fc38.x86_64
                                                  Module libxml2.so.2 from rpm libxml2-2.10.4-1.fc38.x86_64
                                                  Module libgraphite2.so.3 from rpm graphite2-1.3.14-11.fc38.x86_64
                                                  Module libfreetype.so.6 from rpm freetype-2.13.0-2.fc38.x86_64
                                                  Module liblz4.so.1 from rpm lz4-1.9.4-2.fc38.x86_64
                                                  Module libzstd.so.1 from rpm zstd-1.5.5-1.fc38.x86_64
                                                  Module liblzma.so.5 from rpm xz-5.4.1-1.fc38.x86_64
                                                  Module libcap.so.2 from rpm libcap-2.48-6.fc38.x86_64
                                                  Module libblkid.so.1 from rpm util-linux-2.38.1-4.fc38.x86_64
                                                  Module libgnutls.so.30 from rpm gnutls-3.8.0-2.fc38.x86_64
                                                  Module libavahi-client.so.3 from rpm avahi-0.8-22.fc38.x86_64
                                                  Module libavahi-common.so.3 from rpm avahi-0.8-22.fc38.x86_64
                                                  Module libgssapi_krb5.so.2 from rpm krb5-1.21-3.fc38.x86_64
                                                  Module libthai.so.0 from rpm libthai-0.1.29-4.fc38.x86_64
                                                  Module libfribidi.so.0 from rpm fribidi-1.0.12-3.fc38.x86_64
                                                  Module libcairo.so.2 from rpm cairo-1.17.8-4.fc38.x86_64
                                                  Module libfontconfig.so.1 from rpm fontconfig-2.14.2-1.fc38.x86_64
                                                  Module libharfbuzz.so.0 from rpm harfbuzz-7.1.0-1.fc38.x86_64
                                                  Module libpangoft2-1.0.so.0 from rpm pango-1.50.14-1.fc38.x86_64
                                                  Module libsystemd.so.0 from rpm systemd-253.7-1.fc38.x86_64
                                                  Module libXau.so.6 from rpm libXau-1.0.11-2.fc38.x86_64
                                                  Module libplds4.so from rpm nss-3.92.0-1.fc38.x86_64
                                                  Module libplc4.so from rpm nss-3.92.0-1.fc38.x86_64
                                                  Module libdrm.so.2 from rpm libdrm-2.4.114-2.fc38.x86_64
                                                  Module libGLdispatch.so.0 from rpm libglvnd-1.6.0-2.fc38.x86_64
                                                  Module libGLX.so.0 from rpm libglvnd-1.6.0-2.fc38.x86_64
                                                  Module libselinux.so.1 from rpm libselinux-3.5-1.fc38.x86_64
                                                  Module libmount.so.1 from rpm util-linux-2.38.1-4.fc38.x86_64
                                                  Module libz.so.1 from rpm zlib-1.2.13-3.fc38.x86_64
                                                  Module libgmodule-2.0.so.0 from rpm glib2-2.76.4-3.fc38.x86_64
                                                  Module libpcre2-8.so.0 from rpm pcre2-10.42-1.fc38.1.x86_64
                                                  Module libffi.so.8 from rpm libffi-3.4.4-2.fc38.x86_64
                                                  Module libatspi.so.0 from rpm at-spi2-core-2.48.3-1.fc38.x86_64
                                                  Module libcups.so.2 from rpm cups-2.4.6-4.fc38.x86_64
                                                  Module libpango-1.0.so.0 from rpm pango-1.50.14-1.fc38.x86_64
                                                  Module libpangocairo-1.0.so.0 from rpm pango-1.50.14-1.fc38.x86_64
                                                  Module libasound.so.2 from rpm alsa-lib-1.2.9-1.fc38.x86_64
                                                  Module libdbus-1.so.3 from rpm dbus-1.14.8-1.fc38.x86_64
                                                  Module libexpat.so.1 from rpm expat-2.5.0-2.fc38.x86_64
                                                  Module libXfixes.so.3 from rpm libXfixes-6.0.0-5.fc38.x86_64
                                                  Module libXcursor.so.1 from rpm libXcursor-1.2.1-3.fc38.x86_64
                                                  Module libxcb-dri3.so.0 from rpm libxcb-1.13.1-11.fc38.x86_64
                                                  Module libxcb.so.1 from rpm libxcb-1.13.1-11.fc38.x86_64
                                                  Module libX11-xcb.so.1 from rpm libX11-1.8.6-1.fc38.x86_64
                                                  Module libatk-bridge-2.0.so.0 from rpm at-spi2-core-2.48.3-1.fc38.x86_64
                                                  Module libatk-1.0.so.0 from rpm at-spi2-core-2.48.3-1.fc38.x86_64
                                                  Module libnspr4.so from rpm nss-3.92.0-1.fc38.x86_64
                                                  Module libibus-1.0.so.5 from rpm ibus-1.5.28-6.fc38.x86_64
                                                  Module libGL.so.1 from rpm libglvnd-1.6.0-2.fc38.x86_64
                                                  Module libXdamage.so.1 from rpm libXdamage-1.1.5-9.fc38.x86_64
                                                  Module libXcomposite.so.1 from rpm libXcomposite-0.4.5-9.fc38.x86_64
                                                  Module libXrandr.so.2 from rpm libXrandr-1.5.2-10.fc38.x86_64
                                                  Module libXtst.so.6 from rpm libXtst-1.2.4-2.fc38.x86_64
                                                  Module libXrender.so.1 from rpm libXrender-0.9.11-2.fc38.x86_64
                                                  Module libXext.so.6 from rpm libXext-1.3.5-2.fc38.x86_64
                                                  Module libXi.so.6 from rpm libXi-1.8.1-1.fc38.x86_64
                                                  Module libX11.so.6 from rpm libX11-1.8.6-1.fc38.x86_64
                                                  Module libgio-2.0.so.0 from rpm glib2-2.76.4-3.fc38.x86_64
                                                  Module libglib-2.0.so.0 from rpm glib2-2.76.4-3.fc38.x86_64
                                                  Module libgobject-2.0.so.0 from rpm glib2-2.76.4-3.fc38.x86_64
                                                  Stack trace of thread 2700:
                                                  #0  0x00007f83af3360e1 g_logv (libglib-2.0.so.0 + 0x620e1)
                                                  #1  0x00007f83af336393 g_log (libglib-2.0.so.0 + 0x62393)
                                                  #2  0x00007f83af1f8ec5 g_settings_set_property (libgio-2.0.so.0 + 0xf6ec5)
                                                  #3  0x00007f83b92b671a object_set_property (libgobject-2.0.so.0 + 0x2471a)
                                                  #4  0x00007f83b92b7028 g_object_new_internal.part.0 (libgobject-2.0.so.0 + 0x25028)
                                                  #5  0x00007f83b92b9163 g_object_new_valist (libgobject-2.0.so.0 + 0x27163)
                                                  #6  0x00007f83b92b951f g_object_new (libgobject-2.0.so.0 + 0x2751f)
                                                  #7  0x000000000057e647 n/a (/var/home/deck/.local/share/Steam/ubuntu12_64/steamwebhelper + 0x17e647)
                                                  #8  0x00007f83af33048c g_main_context_dispatch (libglib-2.0.so.0 + 0x5c48c)
                                                  #9  0x00007f83af38e648 g_main_context_iterate.isra.0 (libglib-2.0.so.0 + 0xba648)
                                                  #10 0x00007f83af32fa8f g_main_loop_run (libglib-2.0.so.0 + 0x5ba8f)
                                                  #11 0x000000000053382c n/a (/var/home/deck/.local/share/Steam/ubuntu12_64/steamwebhelper + 0x13382c)
                                                  ELF object binary architecture: AMD x86-64
@szescxz
Copy link
Author

szescxz commented Aug 29, 2023

Found this line in $HOME/.local/share/Steam/logs/steamwebhelper.log during crash mentioned above:

(process:21723): GLib-GIO-ERROR **: 12:02:07.210: Settings schema 'org.freedesktop.ibus.engine.table' is not installed

@szescxz
Copy link
Author

szescxz commented Aug 29, 2023

Figured out required packages.

Simplified Chinese (Pinyin), Traditional Chinese (Pinyin), Traditional Chinese (Zhuyin): ibus-pinyin
Traditional Chinese (Cangjie): ibus-table-chinese-cangjie
Traditional Chinese (Quick): ibus-table-chinese-quick

Keyboard in Desktop Mode is still not fixed, though.

@szescxz szescxz changed the title [deck] Steam Keyboard is not working properly with CJK keyboards [deck] Steam OSK does not support CJK languages Aug 29, 2023
@KyleGospo
Copy link
Member

Thanks for this, those are added now:
efe06f2

Desktop might be an environment variable or launch option, unfortunately with steam being closed source it's somewhat difficult to determine what they're looking for and why.

@szescxz
Copy link
Author

szescxz commented Aug 29, 2023

@KyleGospo Found a workaround, just let ibus-daemon to run in the background. Didn't find any systemd units so I'm not sure how to fix it properly (command line arguments etc.). Perhaps need to ask user to run ibus-setup in Konsole on first boot according to Arch Linux wiki.

@KyleGospo
Copy link
Member

Could be incorporated into Bazzite Portal, what's needed after launching the ibus-setup to get things working? Just adding the needed languages?

@szescxz
Copy link
Author

szescxz commented Aug 29, 2023

Nevermind, the method above is for normal desktop usage. The SteamOS way seems already present in Bazzite: https://gitlab.com/evlaV/steamdeck-kde-presets/-/blob/29f8259edaf8b166a4ce881bcc4c771549e210f7/etc/xdg/autostart/ibus.desktop
I think I'll need some time to figure out why it isn't working on my device so I'm closing for now.

@szescxz szescxz closed this as completed Aug 29, 2023
@szescxz
Copy link
Author

szescxz commented Aug 29, 2023

Yup, need to patch the file mentioned above. Correct path in bazzite (Fedora?) is /usr/libexec/kimpanel-ibus-panel.

@zhuzhichao
Copy link

@szescxz 打扰了,请问一下,我设置过之后,桌面模式可以切换到 ibus 输入法,但是游戏模式下,输入法哪怕调整成简体中文,也是无法输出中文,直接输出的是英文,这需要如何解决?

@fsworld009
Copy link

While the related packages are indeed installed, IMEs for CJK languages require additional ibus-engine processes to function correctly, which is running in SteamOS game mode, but not in Bazzite game mode.

As a result, the keyboard will only send English letters as is for Chinese for Japanese keyboard, and Korean keyboard also seems behave incorrectly compared to SteamOS.

See #1914 for current observed issues for CJK keyboard and #1914 (comment) for my current findings.

Could we reopen this issue?

@szescxz
Copy link
Author

szescxz commented Dec 12, 2024

Indeed, CJK in Steam OSK is not working again. No mention of ibus in any of the Steam logs this time and seems like Steam does connect to the IBus daemon.

Uninstalling Fcitx 5 packages does not help, so I am suspecting an internal error within IBus. No idea how to access IBus log output, though.

@fsworld009
Copy link

I found that manually setting engine in bash shell works. For example, ibus engine anthy to switch to JPN keyboard.

See #1914 (comment) for details.

@szescxz
Copy link
Author

szescxz commented Dec 12, 2024

Managed to push the progress a little bit more:

  • Access SteamOS DevTools at localhost:8080
  • Select SharedJSContext
  • Now open the keyboard, giving focus to keyboard 2 should start popping up in the console
  • Go to the invoking script and search set_engine, it should give you two references:
                        await Promise.all(n),
                        await t.set_engine(r.engineName)
                    } else
                        await t.set_engine("xkb:us::eng")
  • Capture the t variable (it's an InputContext object) and execute await (await t.get_engine()).get_name(); always returns dummy even after the set_engine call.

At this point we will definitely need someone who is familiar with IBus development/debugging.

@fsworld009 Your approach could also be done in the console, e.g.

await (await IBus.bus_new()).set_global_engine("anthy")

@fsworld009
Copy link

@szescxz is there any plan to reach out to ibus developers?

@szescxz
Copy link
Author

szescxz commented Dec 20, 2024

@szescxz is there any plan to reach out to ibus developers?

@fsworld009 Not yet. Please note that I am not a member nor a contributor of this project.
Personally I prefer to submit bug report or suggest changes only when I get concrete proof, but unfortunately I don't have enough energy to push it forward at the moment.


EDIT: Moving discussion to #1914 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants