sddm: починить тему WhiteSur после plasma-workspace 6.8 (экран входа rydiwo)
nixos flake checks / invariant-checks (push) Successful in 1m17s
test-runner / smoke (push) Successful in 1s

plasma-workspace 6.8.1 убрал VirtualKeyboardLoader из
org.kde.breeze.components, а SDDM-тема WhiteSur (whitesur-kde 2024-11-18)
всё ещё его инстанцирует. Гритер не мог загрузить Main.qml:

  Main.qml:316:9: VirtualKeyboardLoader is not a type
  Fallback to embedded theme

и экран входа молча деградировал до встроенной плоской заглушки.

- overlays/patch-whitesur-sddm.pl: заменить VirtualKeyboardLoader на
  Keyboards.KWinVirtualKeyboard (API актуальной breeze-темы), сохранив
  интерфейс inputPanel (keyboardActive/showHide), который используется
  в других местах Main.qml
- overlays/pkgs.nix: overlay на whitesur-kde, гоняет патч по sddm/*/Main.qml
- theming.nix: включить whitesur-cursors (kwin писал
  `Failed to load cursor theme "WhiteSur-cursors"`)
- kde.nix: sddm.extraPackages = plasma-desktop + qtsvg (требование пакета)

Проверено на rydiwo (поколение 91, display-manager перезапущен):
Fallback to embedded theme — 0 раз, VirtualKeyboardLoader is not a type — 0,
гритер создал вью на реальном выходе (DSI-1, 1324x828).
This commit is contained in:
oqyude committed 2026-11-05 21:17:03 +03:00
1 parent 3ff32f7e7e
commit 730800d660
4 files changed
+90 -1

No files matched your search

+8
View File
@@ -23,6 +23,14 @@
sddm = { sddm = {
enable = true; enable = true;
theme = "WhiteSur-light"; theme = "WhiteSur-light";
# Required by the WhiteSur SDDM themes (see the note in
# pkgs/by-name/wh/whitesur-kde/package.nix): the greeter needs the
# org.kde.breeze.components QML module from plasma-desktop and qtsvg
# for the theme's SVG assets.
extraPackages = with pkgs; [
kdePackages.plasma-desktop
kdePackages.qtsvg
];
wayland = { wayland = {
enable = true; enable = true;
compositor = "kwin"; compositor = "kwin";
+2 -1
View File
@@ -8,8 +8,9 @@
systemPackages = with pkgs; [ systemPackages = with pkgs; [
#qogir-kde #qogir-kde
#qogir-theme #qogir-theme
#whitesur-cursors
qogir-icon-theme qogir-icon-theme
whitesur-cursors # WhiteSur look-and-feel sets this cursor; without it
# kwin logs `Failed to load cursor theme "WhiteSur-cursors"`
whitesur-gtk-theme whitesur-gtk-theme
whitesur-icon-theme whitesur-icon-theme
whitesur-kde whitesur-kde
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env perl
#
# Patch the WhiteSur SDDM theme for plasma-workspace >= 6.6.
#
# The WhiteSur theme (whitesur-kde 2024-11-18) is a fork of the breeze SDDM
# theme and instantiates `VirtualKeyboardLoader`. That type used to be exported
# by the `org.kde.breeze.components` QML module shipped in plasma-workspace, but
# it was removed in favour of the `org.kde.plasma.workspace.keyboardlayout`
# KWin virtual-keyboard integration.
#
# Without this patch sddm-greeter-qt6 fails to load Main.qml:
# Main.qml:316:9: VirtualKeyboardLoader is not a type
# Fallback to embedded theme
# and the login screen silently degrades to the plain built-in theme.
#
# Replace the loader with the same API the current breeze theme uses
# (Keyboards.KWinVirtualKeyboard), keeping the `inputPanel` object name and its
# `keyboardActive` / `showHide()` interface used elsewhere in Main.qml.
#
# Usage: perl patch-whitesur-sddm.pl sddm/*/Main.qml
use strict;
use warnings;
my $stub = <<'STUB';
Item {
id: inputPanel
visible: false
readonly property bool keyboardActive: Keyboards.KWinVirtualKeyboard.visible
function showHide() {
if (Keyboards.KWinVirtualKeyboard.visible) {
Keyboards.KWinVirtualKeyboard.active = false;
} else {
Keyboards.KWinVirtualKeyboard.forceActivate();
}
}
}
STUB
for my $file (@ARGV) {
open my $in, '<', $file or die "open $file: $!";
local $/;
my $src = <$in>;
close $in;
# Nothing to do for themes that do not use the old loader.
next if $src !~ /VirtualKeyboardLoader/;
$src =~ s{^[ \t]*VirtualKeyboardLoader \{.*?^[ \t]*\}[ \t]*\n}{$stub}ms
or die "$file: could not locate the VirtualKeyboardLoader block\n";
if ($src !~ /keyboardlayout as Keyboards/) {
$src =~ s{(import org\.kde\.plasma\.plasma5support [^\n]*\n)}
{$1import org.kde.plasma.workspace.keyboardlayout as Keyboards\n}
or die "$file: could not locate the plasma5support import\n";
}
open my $out, '>', $file or die "write $file: $!";
print $out $src;
close $out;
}
+18
View File
@@ -5,4 +5,22 @@
self: super: { self: super: {
rovr = inputs.self.packages.x86_64-linux.rovr; rovr = inputs.self.packages.x86_64-linux.rovr;
pcbu-desktop = inputs.self.packages.x86_64-linux.pcbu-desktop; pcbu-desktop = inputs.self.packages.x86_64-linux.pcbu-desktop;
# The SDDM themes shipped by whitesur-kde (2024-11-18) are forks of the
# breeze greeter theme and still instantiate `VirtualKeyboardLoader`, a type
# that plasma-workspace >= 6.6 removed from org.kde.breeze.components in
# favour of the KWin virtual-keyboard integration. sddm-greeter-qt6 refuses
# to load such a theme and silently falls back to the plain embedded one:
# Main.qml:316:9: VirtualKeyboardLoader is not a type
# Fallback to embedded theme
# (seen on rydiwo). Rewrite the loader to the API the current breeze theme
# uses; see overlays/patch-whitesur-sddm.pl.
whitesur-kde = super.whitesur-kde.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ super.perl ];
postPatch = (old.postPatch or "") + ''
for f in sddm/*/Main.qml; do
${super.perl}/bin/perl ${./patch-whitesur-sddm.pl} "$f"
done
'';
});
} }