From 610d8c3dfc80811e92e6f89101b1b42987c84fdc Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 2 Feb 2026 11:59:24 +0100 Subject: [PATCH 1/3] vmspawn: do not pass console=hvc0 in GUI mode This breaks when using qemu's GUI mode. Follow mkosi's example. Follow-up for 773ca1def8f79a8509bf0846de9d75902ca31f79 --- src/vmspawn/vmspawn.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 06f6961b1a..c2be2c8038 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -2451,9 +2451,11 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { return log_oom(); } - r = strv_prepend(&arg_kernel_cmdline_extra, "console=hvc0"); - if (r < 0) - return log_oom(); + if (arg_console_mode != CONSOLE_GUI) { + r = strv_prepend(&arg_kernel_cmdline_extra, "console=hvc0"); + if (r < 0) + return log_oom(); + } for (size_t j = 0; j < arg_runtime_mounts.n_mounts; j++) { RuntimeMount *m = arg_runtime_mounts.mounts + j; From 7f7622285da365000807f26d4c3cacceeb13a9cb Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 3 Feb 2026 12:45:13 +0100 Subject: [PATCH 2/3] homectl: trim some trailing whitespace --- src/home/homectl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/home/homectl.c b/src/home/homectl.c index 6079f311de..cb73c51b1b 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -3265,17 +3265,17 @@ static int parse_size_field(sd_json_variant **identity, const char *field, const static int parse_boolean_field(sd_json_variant **identity, const char *field, const char *arg) { int r; - + assert(identity); assert(field); if (isempty(arg)) return drop_from_identity(field); - + r = parse_boolean(arg); if (r < 0) return log_error_errno(r, "Failed to parse boolean parameter %s: %s", field, arg); - + r = sd_json_variant_set_field_boolean(identity, field, r > 0); if (r < 0) return log_error_errno(r, "Failed to set %s field: %m", field); From 75cb25c0b9250555212014e3ece14e5aadace6d4 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 2 Feb 2026 12:58:19 +0100 Subject: [PATCH 3/3] firstboot/homectl: hide plymouth splashscreen when asking questions When plymouth is enabled, the screen gets all garbled when firstboot runs and asks questions. Disable the splash screen, but only when actually asking questions. --- src/firstboot/firstboot.c | 5 +++++ src/home/homectl.c | 4 ++++ src/shared/plymouth-util.c | 11 +++++++++++ src/shared/plymouth-util.h | 1 + 4 files changed, 21 insertions(+) diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 55bd273f21..38e3adaed6 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -43,6 +43,7 @@ #include "parse-util.h" #include "password-quality-util.h" #include "path-util.h" +#include "plymouth-util.h" #include "pretty-print.h" #include "proc-cmdline.h" #include "prompt-util.h" @@ -110,6 +111,10 @@ static void print_welcome(int rfd, sd_varlink **mute_console_link) { assert(rfd >= 0); assert(mute_console_link); + /* Needs to be called before mute_console or it will garble the screen */ + if (arg_welcome) + (void) plymouth_hide_splash(); + if (!*mute_console_link && arg_mute_console) (void) mute_console(mute_console_link); diff --git a/src/home/homectl.c b/src/home/homectl.c index cb73c51b1b..c6a3d4b3eb 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -48,6 +48,7 @@ #include "percent-util.h" #include "pidref.h" #include "pkcs11-util.h" +#include "plymouth-util.h" #include "polkit-agent.h" #include "pretty-print.h" #include "proc-cmdline.h" @@ -2891,6 +2892,9 @@ static int create_interactively(void) { return 0; } + /* Needs to be called before mute_console or it will garble the screen */ + (void) plymouth_hide_splash(); + _cleanup_(sd_varlink_flush_close_unrefp) sd_varlink *mute_console_link = NULL; (void) mute_console(&mute_console_link); diff --git a/src/shared/plymouth-util.c b/src/shared/plymouth-util.c index aaf604afd5..38b4f1fe2a 100644 --- a/src/shared/plymouth-util.c +++ b/src/shared/plymouth-util.c @@ -56,3 +56,14 @@ int plymouth_send_msg(const char *text, bool pause_spinner) { return 0; } + +int plymouth_hide_splash(void) { + int r; + + r = plymouth_send_raw("H\0", 2, SOCK_NONBLOCK); + if (r < 0) + return log_full_errno(ERRNO_IS_NO_PLYMOUTH(r) ? LOG_DEBUG : LOG_WARNING, r, + "Failed to communicate with plymouth: %m"); + + return 0; +} diff --git a/src/shared/plymouth-util.h b/src/shared/plymouth-util.h index c73b44567c..4030c5bdb6 100644 --- a/src/shared/plymouth-util.h +++ b/src/shared/plymouth-util.h @@ -7,6 +7,7 @@ int plymouth_connect(int flags); int plymouth_send_raw(const void *raw, size_t size, int flags); int plymouth_send_msg(const char *text, bool pause_spinner); +int plymouth_hide_splash(void); static inline bool ERRNO_IS_NO_PLYMOUTH(int r) { return IN_SET(ABS(r), EAGAIN, ENOENT) || ERRNO_IS_DISCONNECT(r);