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

Use fallback X11 socket. Enable input method when ELECTRON_OZONE_PLATFORM_HINT=auto #685

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pm4rcin
Copy link
Contributor

@pm4rcin pm4rcin commented Jul 5, 2024

It requires testing from people on different DEs but also checking if IMEs work.

@flathubbot
Copy link
Contributor

Started test build 132855

@flathubbot
Copy link
Contributor

Build 132855 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/115854/org.signal.Signal.flatpakref

@pm4rcin
Copy link
Contributor Author

pm4rcin commented Jul 15, 2024

@codewiz since you mentioned that it worked for you in chrome #577 (comment) it would be nice if you could check setting flag --enable-wayland-ime in desktop file. @czhang03 would you try that too?

@czhang03
Copy link

czhang03 commented Jul 15, 2024

Hi, IME still doesn't work on my machine. AFAIK this is not new, IME is completely broken with electron gnome and wayland, because of the mismatched text-input implementation.

System Info:

  • OS Name: Fedora Linux 40.20240714.0 (Silverblue)
  • OS Type: 64-bit
  • GNOME Version: 46
  • Windowing System: Wayland
  • Kernel Version: Linux 6.9.8-200.fc40.x86_64

@pm4rcin
Copy link
Contributor Author

pm4rcin commented Jul 15, 2024

Hi, IME still doesn't work on my machine. AFAIK this is not new, IME is completely broken with electron gnome and wayland, because of the mismatched text-input implementation.

Did you try both IBUS and fcitx? Sorry I'm not an expert on IM but I think IBUS supports wayland in newest versions with GTK or smth.

@czhang03
Copy link

Hi, sorry I was not being clear earlier, I am using the default input method that comes with Gnome, which I believe runs on ibus.

I believe this is also the most common way people install IMs on gnome.

@czhang03
Copy link

It seems like both the chrome side and gnome side are moving forward on the issue of IM:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3751
https://chromium-review.googlesource.com/c/chromium/src/+/5690113

Gnome already have a working implementation of text-input-v1 (an old protocol that chrome supports) with experimental packages for both fedora and AUR. And chrome is starting the implementation of text-input-v3 (the newer protocol that is supported in Gnome and other DEs).

At this point, given the discussion, it seems that the text-input-v1 is unlikely to get merged in Gnome, since it has been deprecated for a while. And people might want to wait until chrome has text-input-v3. But obviously it depends on what the developers think. I am just here to spread the good news :)

@flathubbot
Copy link
Contributor

Started test build 142722

@flathubbot
Copy link
Contributor

Build 142722 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/125772/org.signal.Signal.flatpakref

@flathubbot
Copy link
Contributor

Started test build 154230

@flathubbot
Copy link
Contributor

Build 154230 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/137320/org.signal.Signal.flatpakref

@czhang03
Copy link

For a bit of update on the electron+wayland IEM issue, since people mentioned it.

Starting with chrome 129 (which is the current version), wayland IEM can be enabled by enabling the text-input-v3 flag in chrome:flag or with the following command line flag --enable-wayland-ime --wayland-text-input-version=3.

The current version of electron (32, based on chromium 128) still doesn't support this feature. However, electron 33 which is based on chromium 130, will probably support this feature; and electron 33 is set to become stable tomorrow (Oct 15th). https://www.electronjs.org/docs/latest/tutorial/electron-timelines

@flathubbot
Copy link
Contributor

Started test build 158291

@flathubbot
Copy link
Contributor

Build 158291 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/141376/org.signal.Signal.flatpakref

@czhang03
Copy link

czhang03 commented Nov 10, 2024

I have tested that the latest version of signal (version 7.32.0) can use IME in wayland mode.

Here are the command line arguments:

flatpak run org.signal.Signal --ozone-platform-hint=auto --enable-wayland-ime --wayland-text-input-version=3

@czhang03
Copy link

I think it is important to at least provide an environmental variable for people to enable input method --enable-wayland-ime --wayland-text-input-version=3, it can also automatically be on when ELECTRON_OZONE_PLATFORM_HINT is set to auto or wayland

@pm4rcin
Copy link
Contributor Author

pm4rcin commented Nov 10, 2024

bot, build

@flathubbot
Copy link
Contributor

Queued test build for org.signal.Signal.

@pm4rcin pm4rcin changed the title Use fallback X11 socket Use fallback X11 socket and enable input method when ELECTRON_OZONE_PLATFORM_HINT=auto Nov 10, 2024
@pm4rcin pm4rcin changed the title Use fallback X11 socket and enable input method when ELECTRON_OZONE_PLATFORM_HINT=auto Use fallback X11 socket. Enable input method when ELECTRON_OZONE_PLATFORM_HINT=auto Nov 10, 2024
@flathubbot
Copy link
Contributor

Started test build 161034

@flathubbot
Copy link
Contributor

Build 161034 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/144106/org.signal.Signal.flatpakref

@czhang03
Copy link

Somehow input method is not working in the test version... Maybe we want to put in some debug message in the script. I will do more testing later.

@czhang03
Copy link

There are two problems I have with this current commit

  • the IME should also be enabled when ozone platform is set to wayland instead of auto
  • I am not sure the electron environmental variable is case-sensitive, i.e. does electron treat AUTO also as auto. If so, our detection should act accordingly.

@czhang03
Copy link

czhang03 commented Nov 11, 2024

This is very unexpected, even if I added the command line parameter, the current test build still doesn't work with IME:

$ flatpak run org.signal.Signal --enable-wayland-ime --wayland-text-input-version=3
Debug: Using password store: basic
Debug: Will run signal with the following arguments: --password-store=basic
Debug: Additionally, user gave: --enable-wayland-ime --wayland-text-input-version=3
ERROR: ld.so: object '/var/run/host/usr/lib64/glibc-hwcaps/x86-64-v4/libhardened_malloc.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /app/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME cheng-fedora-framework-laptop
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /var/home/<user>/.var/app/org.signal.Signal/config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
$ flatpak info org.signal.Signal 

Signal Desktop - Private messenger

          ID: org.signal.Signal
         Ref: app/org.signal.Signal/x86_64/test
        Arch: x86_64
      Branch: test
     Version: 7.32.0
     License: AGPL-3.0-only
      Origin: signal-origin
  Collection: org.flathub.Test.Build144106
Installation: user
   Installed: 472.4 MB
     Runtime: org.freedesktop.Platform/x86_64/24.08
         Sdk: org.freedesktop.Sdk/x86_64/24.08

      Commit: f7b73fb1cfeb0587a5fc0bbc1b76005e41bfe880dae7f2b06b272b3470eaf291
     Subject: feat(manifest): enable input method if ELECTRON_OZONE_PLATFORM_HINT=auto (2fdda198)
        Date: 2024-11-11 00:23:30 +0000

Comparatively, I got the following log when running the stable version:

$ flatpak info org.signal.Signal 

Signal Desktop - Private messenger

          ID: org.signal.Signal
         Ref: app/org.signal.Signal/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 7.32.0
     License: AGPL-3.0-only
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 472.4 MB
     Runtime: org.freedesktop.Platform/x86_64/24.08
         Sdk: org.freedesktop.Sdk/x86_64/24.08

      Commit: 738b400e7710fdd066d0875fdda3cf546bf3183c0a1a8f79aacae580c4f3f7e6
      Parent: 243fadb832b10837ddb723b8c017db77f853f2cd7f5d3d0f8538412770aba89f
     Subject: signal-desktop: Update signal-desktop.deb to 7.32.0 (#781) (8bff0dc3)
        Date: 2024-11-07 06:50:50 +0000


$ flatpak run org.signal.Signal --enable-wayland-ime --wayland-text-input-version=3
Debug: Using password store: basic
Debug: Will run signal with the following arguments: --password-store=basic
Debug: Additionally, user gave: --enable-wayland-ime --wayland-text-input-version=3
ERROR: ld.so: object '/var/run/host/usr/lib64/glibc-hwcaps/x86-64-v4/libhardened_malloc.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /app/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME <reducted>
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /var/home/<reducted>/.var/app/org.signal.Signal/config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
{"level":30,"time":"2024-11-11T12:07:56.772Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-11-11T12:07:56.773Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-11-11T12:07:56.773Z","msg":"app.ready: preferred system locales: en-US, en"}
{"level":30,"time":"2024-11-11T12:07:56.774Z","msg":"locale: Supported locales: af-ZA, ar, az-AZ, bg-BG, bn-BD, bs-BA, ca, cs, da, de, el, en, es, et-EE, eu, fa-IR, fi, fr, ga-IE, gl-ES, gu-IN, he, hi-IN, hr-HR, hu, id, it, ja, ka-GE, kk-KZ, km-KH, kn-IN, ko, ky-KG, lt-LT, lv-LV, mk-MK, ml-IN, mr-IN, ms, my, nb, nl, pa-IN, pl, pt-BR, pt-PT, ro-RO, ru, sk-SK, sl-SI, sq-AL, sr, sv, sw, ta-IN, te-IN, th, tl-PH, tr, ug, uk-UA, ur, vi, yue, zh-CN, zh-HK, zh-Hant"}
{"level":30,"time":"2024-11-11T12:07:56.774Z","msg":"locale: Preferred locales: <reducted>"}
{"level":30,"time":"2024-11-11T12:07:56.774Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-11-11T12:07:56.777Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-11-11T12:07:56.808Z","msg":"intl.onWarn [@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution"}
{"level":30,"time":"2024-11-11T12:07:56.808Z","msg":"locale: Text info direction for en: ltr"}
{"level":30,"time":"2024-11-11T12:07:56.809Z","msg":"getSQLKey: using legacy key"}
{"level":30,"time":"2024-11-11T12:07:56.809Z","msg":"getSystemTraySetting got value MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-11-11T12:07:56.809Z","msg":"getSystemTraySetting returning MinimizeToAndStartInSystemTray"}
{"level":30,"time":"2024-11-11T12:07:56.810Z","msg":"app ready"}
{"level":30,"time":"2024-11-11T12:07:56.810Z","msg":"starting version 7.32.0"}
...

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 this pull request may close these issues.

3 participants