aroaxinping
**Title:** Virtual keyboard is inert on Wayland — SDDM discards `InputMethod`, needs `GreeterEnvironment` workaround --- ## Summary On a Wayland session, the virtual keyboard never becomes usable: shift is disabled and no input reaches the password field. This is **not a bug in SilentSDDM** — the theme's QML is correct. SDDM itself discards the input method before the greeter starts. A one-line config addition fixes it, but it is not discoverable, so this is a documentation request. ## Cause `src/greeter/GreeterApp.cpp` (SDDM 0.21.0), before constructing `QGuiApplication`: ```cpp QString inputMethod = SDDM::mainConfig.InputMethod.get(); if (platform.startsWith(QStringLiteral("wayland")) && inputMethod == QStringLiteral("qtvirtualkeyboard")) inputMethod = QString{}; // <-- cleared if (!inputMethod.isEmpty()) qputenv("QT_IM_MODULE", inputMethod.toLocal8Bit()); ``` `platform` comes from `WAYLAND_DISPLAY`. On distributions shipping `DisplayServer=wayland` (Arch/CachyOS do, via `zz-wayland.conf`), `QT_IM_MODULE` is therefore never set, `libqtvirtualkeyboardplugin.so` never becomes the platform input context, and `InputPanel` cannot work. `InputMethod=qtvirtualkeyboard` is already the winning config value — the greeter throws it away. ## Evidence Measured with the theme's own `CVKeyboard.qml` wrapper under Qt 6.11.2, on a `TextField` with `echoMode: TextInput.Password`: | | without `QT_IM_MODULE` | with `QT_IM_MODULE=qtvirtualkeyboard` | |---|---|---| | `Qt.inputMethod.visible` | `false` | `true` | | `InputPanel.active` | `false` | `true` | | `ShiftHandler.toggleShiftEnabled` | **`false`** | `true` | | `InputContext.priv.inputItem` | `null` | `TextField(...)` | The same symptom appears with unrelated themes on the same system, which is what pointed to SDDM rather than to any theme. `journalctl -u sddm` shows no input-method plugin error: SDDM does not fail to load the plugin, it never attempts to. ## Workaround ```ini # /etc/sddm.conf.d/10-virtualkeyboard.conf [General] GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell,QT_IM_MODULE=qtvirtualkeyboard ``` This works because `GreeterEnvironment` is applied to the greeter's environment in `src/helper/Backend.cpp` before `GreeterApp` runs, and `GreeterApp` never calls `qunsetenv` — the inherited variable survives the discard. **Caveat worth documenting:** `GreeterEnvironment` is *replaced*, not merged. Distributions that already set it (Arch/CachyOS set `QT_WAYLAND_SHELL_INTEGRATION=layer-shell` in `zz-wayland.conf`) must have that value repeated, or the greeter loses layer-shell. ## Request A short note in the README or wiki, under the virtual keyboard section. The feature is advertised and silently non-functional on Wayland, with no error message to go on — users are likely to report it as a theme bug. ## Environment - SilentSDDM 1.5.0 - SDDM 0.21.0 - Qt 6.11.2, `qt6-virtualkeyboard` installed, plugin present - KDE Plasma 6.7.4, Wayland - Arch-based (CachyOS)