linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/reboot: Use efi reboot for Acer TravelMate X514-51T
@ 2019-04-01  7:35 Jian-Hong Pan
  2019-04-05 21:13 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Jian-Hong Pan @ 2019-04-01  7:35 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov
  Cc: x86, linux-kernel, linux, Jian-Hong Pan, Daniel Drake

Upon reboot, the Acer TravelMate X514-51T laptop appears to complete the
shutdown process, but then it hangs in BIOS POST with a black screen.

The problem is intermittent - at some points it has appeared related to
Secure Boot settings or different kernel builds, but ultimately we have
not been able to identify the exact conditions that trigger the issue to
come and go.

However, after extensive testing, we observe that using the EFI reboot
method reliably avoids the issue in all cases.

Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=203119
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
---
 arch/x86/kernel/reboot.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 725624b6c0c0..145bdfb56a9a 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -81,6 +81,19 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
 	return 0;
 }
 
+/*
+ * Some machines require the "reboot=e" commandline options
+ */
+static int __init set_efi_reboot(const struct dmi_system_id *d)
+{
+	if (reboot_type != BOOT_EFI) {
+		reboot_type = BOOT_EFI;
+		pr_info("%s series board detected. Selecting %s-method for reboot.\n",
+			d->ident, "EFI");
+	}
+	return 0;
+}
+
 void __noreturn machine_real_restart(unsigned int type)
 {
 	local_irq_disable();
@@ -166,6 +179,14 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"),
 		},
 	},
+	{	/* Handle reboot issue on Acer TravelMate X514-51T */
+		.callback = set_efi_reboot,
+		.ident = "Acer TravelMate X514-51T",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T"),
+		},
+	},
 
 	/* Apple */
 	{	/* Handle problems with rebooting on Apple MacBook5 */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/reboot: Use efi reboot for Acer TravelMate X514-51T
  2019-04-01  7:35 [PATCH] x86/reboot: Use efi reboot for Acer TravelMate X514-51T Jian-Hong Pan
@ 2019-04-05 21:13 ` Thomas Gleixner
  2019-04-08  6:02   ` Jian-Hong Pan
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2019-04-05 21:13 UTC (permalink / raw)
  To: Jian-Hong Pan
  Cc: Ingo Molnar, Borislav Petkov, x86, linux-kernel, linux, Daniel Drake

On Mon, 1 Apr 2019, Jian-Hong Pan wrote:
> +/*
> + * Some machines require the "reboot=e" commandline options
> + */
> +static int __init set_efi_reboot(const struct dmi_system_id *d)
> +{
> +	if (reboot_type != BOOT_EFI) {
> +		reboot_type = BOOT_EFI;

So if EFI is disabled in the kernel this will fall through to BOOT_BIOS. Is
that intended behaviour?

> +		pr_info("%s series board detected. Selecting %s-method for reboot.\n",
> +			d->ident, "EFI");

Is thee a reason not to write "EFI" in the string itself?

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/reboot: Use efi reboot for Acer TravelMate X514-51T
  2019-04-05 21:13 ` Thomas Gleixner
@ 2019-04-08  6:02   ` Jian-Hong Pan
  0 siblings, 0 replies; 3+ messages in thread
From: Jian-Hong Pan @ 2019-04-08  6:02 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Borislav Petkov, x86, Linux Kernel,
	Linux Upstreaming Team, Daniel Drake

Thomas Gleixner <tglx@linutronix.de> 於 2019年4月6日 週六 上午5:14寫道:
>
> On Mon, 1 Apr 2019, Jian-Hong Pan wrote:
> > +/*
> > + * Some machines require the "reboot=e" commandline options
> > + */
> > +static int __init set_efi_reboot(const struct dmi_system_id *d)
> > +{
> > +     if (reboot_type != BOOT_EFI) {
> > +             reboot_type = BOOT_EFI;
>
> So if EFI is disabled in the kernel this will fall through to BOOT_BIOS. Is
> that intended behaviour?

If not choose EFI as the reboot type, system will use APCI reboot type
on Acer TravelMate X514-51T.
If the reboot type is set as BIOS by appending "reboot=b", system
cannot reboot and hangs up when shutdown.

> > +             pr_info("%s series board detected. Selecting %s-method for reboot.\n",
> > +                     d->ident, "EFI");
>
> Is thee a reason not to write "EFI" in the string itself?

Just simply follow the format like functions: set_acpi_reboot, set_bios_reboot
https://elixir.bootlin.com/linux/v5.1-rc4/source/arch/x86/kernel/reboot.c#L60

BR,
Jian-Hong Pan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-08  6:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01  7:35 [PATCH] x86/reboot: Use efi reboot for Acer TravelMate X514-51T Jian-Hong Pan
2019-04-05 21:13 ` Thomas Gleixner
2019-04-08  6:02   ` Jian-Hong Pan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).