[PATCH] efi/x86: early EFI poweroff quirk for Clevo/MouseComputer V650AU
Brian Heise <[email protected]>
| Newsgroups | org.kernel.vger.linux-efi |
|---|---|
| Message-ID | <CAMSzGnHQMvZ9h27Fkcy-xVW8C6oH1DJMd4z+R4LkWeDJJUH+Cg@mail.gmail.com> |
Hello, On MouseComputer/Clevo V650AU (Insyde 1.07.12rRUN), systemctl poweroff completes OS shutdown but the machine stays powered (LED on; long-press needed). Reboot works. ACPI S5 and late EFI_RESET_SHUTDOWN (sys-off after device_shutdown) both fail. Early EFI_RESET_SHUTDOWN before device_shutdown fully cuts power (validated with a probe module, then with this quirk). This registers a DMI-gated reboot notifier (DMI_BOARD_NAME "V650AU") that issues EFI_RESET_SHUTDOWN on SYS_POWER_OFF. *AI use disclosure.* I have no experience in kernel development. I own a MouseComputer/Clevo V650AU (Insyde 1.07.12rRUN) and have experienced this problem. I solved the issue using an AI agent, but have verified that the solution works on my own machine. Best regards, Brian N. Heise
0001-efi-x86-early-EFI-poweroff-quirk-for-Clevo-MouseComp.patch
(text/x-patch, 2.4 KB)
From d7f5ced98ed85b24b45927f65b29d2ce59bf810a Mon Sep 17 00:00:00 2001 From: Brian Heise <[email protected]> Date: Sat, 15 Aug 2026 21:43:45 +0900 Subject: [PATCH] efi/x86: early EFI poweroff quirk for Clevo/MouseComputer V650AU ACPI S5 and late EFI ResetSystem(SHUTDOWN) (after device_shutdown) leave this Insyde firmware powered on. Calling EFI_RESET_SHUTDOWN from a reboot notifier, before device_shutdown, fully cuts power. Match on DMI_BOARD_NAME V650AU so MouseComputer and other Clevo white-labels are covered. --- arch/x86/platform/efi/quirks.c | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 90a065fcb..6c4226d56 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -11,6 +11,7 @@ #include <linux/memblock.h> #include <linux/acpi.h> #include <linux/dmi.h> +#include <linux/reboot.h> #include <asm/e820/api.h> #include <asm/efi.h> @@ -660,6 +661,50 @@ bool efi_poweroff_required(void) return acpi_gbl_reduced_hardware || acpi_no_s5; } +/* + * MouseComputer/Clevo V650AU (Insyde): ACPI S5 and EFI ResetSystem after + * device_shutdown() leave the system powered on. EFI_RESET_SHUTDOWN works + * when invoked from a reboot notifier, which runs before device_shutdown(). + */ +static const struct dmi_system_id efi_early_poweroff_dmi_table[] __initconst = { + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "V650AU"), + }, + }, + { } +}; + +static int efi_early_poweroff_notify(struct notifier_block *nb, + unsigned long mode, void *unused) +{ + if (mode != SYS_POWER_OFF) + return NOTIFY_DONE; + + if (!efi_rt_services_supported(EFI_RT_SUPPORTED_RESET_SYSTEM)) + return NOTIFY_DONE; + + pr_info("V650AU: EFI ResetSystem(SHUTDOWN) before device shutdown\n"); + efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, NULL); + + return NOTIFY_DONE; +} + +static struct notifier_block efi_early_poweroff_nb = { + .notifier_call = efi_early_poweroff_notify, +}; + +static int __init efi_early_poweroff_quirk(void) +{ + if (!dmi_check_system(efi_early_poweroff_dmi_table)) + return 0; + + register_reboot_notifier(&efi_early_poweroff_nb); + pr_info("V650AU: registered early EFI power-off quirk\n"); + return 0; +} +late_initcall(efi_early_poweroff_quirk); + #ifdef CONFIG_EFI_CAPSULE_QUIRK_QUARK_CSH static int qrk_capsule_setup_info(struct capsule_info *cap_info, void **pkbuff, -- 2.55.0