public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
       [not found] <4C3DCAA4.9050602@gmail.com>
@ 2010-07-14 14:36 ` Matthew Garrett
  2010-07-14 14:46   ` Pedro Ribeiro
                     ` (2 more replies)
  2010-07-16  7:38 ` Jens Rutschmann
  1 sibling, 3 replies; 15+ messages in thread
From: Matthew Garrett @ 2010-07-14 14:36 UTC (permalink / raw)
  To: Pedro Ribeiro; +Cc: eusou15, ibm-acpi-devel, linux-kernel, toralf.foerster

On Wed, Jul 14, 2010 at 03:33:08PM +0100, Pedro Ribeiro wrote:
>  Please consider this patch. Let me know if you would like me to change
>  anything or if you don't agree with it. It applies cleanly to 2.6.35-rc5.
> 
>  The Lenovo T400 and T500 have an annoying 9 second delay when
>  rebooting, unless reboot=pci is passed to the kernel command line.
>  This delay happens from at least kernel 2.6.20.
> 
>  Make this change permanent by hardcoding the Tx00 on the
>  arch/kernel/reboot.c pci quirks table.

There's two possibilities here:

1) Lenovo's firmware is broken and the 9-second delay is always going to 
be there. In that case we should try to use the ACPI reboot vector 
first.

2) We're doing something wrong in our shutdown sequence which then 
triggers this problem as a result.

Either way, I think this patch is wrong.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-14 14:36 ` [PATCH] Remove 9 second reboot delay on Lenovo T400/T500 Matthew Garrett
@ 2010-07-14 14:46   ` Pedro Ribeiro
  2010-07-14 15:26   ` Nick Bowler
  2010-07-15 22:31   ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
  2 siblings, 0 replies; 15+ messages in thread
From: Pedro Ribeiro @ 2010-07-14 14:46 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: ibm-acpi-devel, linux-kernel, toralf.foerster

On 14 July 2010 15:36, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Wed, Jul 14, 2010 at 03:33:08PM +0100, Pedro Ribeiro wrote:
>>  Please consider this patch. Let me know if you would like me to change
>>  anything or if you don't agree with it. It applies cleanly to 2.6.35-rc5.
>>
>>  The Lenovo T400 and T500 have an annoying 9 second delay when
>>  rebooting, unless reboot=pci is passed to the kernel command line.
>>  This delay happens from at least kernel 2.6.20.
>>
>>  Make this change permanent by hardcoding the Tx00 on the
>>  arch/kernel/reboot.c pci quirks table.
>
> There's two possibilities here:
>
> 1) Lenovo's firmware is broken and the 9-second delay is always going to
> be there. In that case we should try to use the ACPI reboot vector
> first.
>
> 2) We're doing something wrong in our shutdown sequence which then
> triggers this problem as a result.
>
> Either way, I think this patch is wrong.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org
>

Hi Matthew,

by acpi reboot vector you mean using reboot=acpi?
I tried it and does not solve the problem.
Check here http://marc.info/?l=linux-kernel&m=127590255224570&w=2

Can you please tell me how to debug this?

Thanks,
Pedro

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

* Re: [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-14 14:36 ` [PATCH] Remove 9 second reboot delay on Lenovo T400/T500 Matthew Garrett
  2010-07-14 14:46   ` Pedro Ribeiro
@ 2010-07-14 15:26   ` Nick Bowler
  2010-07-15 22:31   ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
  2 siblings, 0 replies; 15+ messages in thread
From: Nick Bowler @ 2010-07-14 15:26 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Pedro Ribeiro, eusou15, ibm-acpi-devel, linux-kernel,
	toralf.foerster

On 15:36 Wed 14 Jul     , Matthew Garrett wrote:
> On Wed, Jul 14, 2010 at 03:33:08PM +0100, Pedro Ribeiro wrote:
> >  The Lenovo T400 and T500 have an annoying 9 second delay when
> >  rebooting, unless reboot=pci is passed to the kernel command line.
> >  This delay happens from at least kernel 2.6.20.
[...]
> 1) Lenovo's firmware is broken and the 9-second delay is always going to 
> be there. In that case we should try to use the ACPI reboot vector 
> first.

While it may be true that the firmware is buggy, reboot=acpi does not
solve the problem; reboot=pci does.

-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-14 14:36 ` [PATCH] Remove 9 second reboot delay on Lenovo T400/T500 Matthew Garrett
  2010-07-14 14:46   ` Pedro Ribeiro
  2010-07-14 15:26   ` Nick Bowler
@ 2010-07-15 22:31   ` Henrique de Moraes Holschuh
  2010-07-15 22:50     ` Matthew Garrett
  2 siblings, 1 reply; 15+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-07-15 22:31 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Pedro Ribeiro, ibm-acpi-devel, eusou15, linux-kernel,
	toralf.foerster

On Wed, 14 Jul 2010, Matthew Garrett wrote:
> There's two possibilities here:
> 
> 1) Lenovo's firmware is broken and the 9-second delay is always going to 
> be there. In that case we should try to use the ACPI reboot vector 
> first.

Or maybe we should key into whatever OSI() the ACPI firmware asked, and try
first whatever shutdown path the highest version of Windows asked for by the
firmware would.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-15 22:31   ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
@ 2010-07-15 22:50     ` Matthew Garrett
  2010-07-15 23:00       ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 15+ messages in thread
From: Matthew Garrett @ 2010-07-15 22:50 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Pedro Ribeiro, ibm-acpi-devel, eusou15, linux-kernel,
	toralf.foerster

On Thu, Jul 15, 2010 at 07:31:49PM -0300, Henrique de Moraes Holschuh wrote:

> Or maybe we should key into whatever OSI() the ACPI firmware asked, and try
> first whatever shutdown path the highest version of Windows asked for by the
> firmware would.

I've been tracing how Windows implements reboots (XP, Vista and 7). It 
appears to use the ACPI reboot vector, the keyboard controller, the ACPI 
reboot vector again, the keyboard controller again and then hangs. I'll 
try implementing equivalent behaviour in Linux and see whether it makes 
any difference.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-15 22:50     ` Matthew Garrett
@ 2010-07-15 23:00       ` Henrique de Moraes Holschuh
  2010-07-15 23:08         ` Matthew Garrett
  0 siblings, 1 reply; 15+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-07-15 23:00 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Pedro Ribeiro, eusou15, linux-kernel, toralf.foerster,
	ibm-acpi-devel

On Thu, 15 Jul 2010, Matthew Garrett wrote:
> On Thu, Jul 15, 2010 at 07:31:49PM -0300, Henrique de Moraes Holschuh wrote:
> > Or maybe we should key into whatever OSI() the ACPI firmware asked, and try
> > first whatever shutdown path the highest version of Windows asked for by the
> > firmware would.
> 
> I've been tracing how Windows implements reboots (XP, Vista and 7). It 
> appears to use the ACPI reboot vector, the keyboard controller, the ACPI 
> reboot vector again, the keyboard controller again and then hangs. I'll 
> try implementing equivalent behaviour in Linux and see whether it makes 
> any difference.

Icky.  It doesn't happen always, but this time it does looks like we will
NOT be better off doing whatever Windows is doing.

Do you want to escalate this to Lenovo?  I need a clear and consise
description of the problem and the boxes we know to be affected.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-15 23:00       ` Henrique de Moraes Holschuh
@ 2010-07-15 23:08         ` Matthew Garrett
  2010-07-16  3:01           ` Henrique de Moraes Holschuh
  2010-07-16 11:02           ` Pedro Ribeiro
  0 siblings, 2 replies; 15+ messages in thread
From: Matthew Garrett @ 2010-07-15 23:08 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Pedro Ribeiro, eusou15, linux-kernel, toralf.foerster,
	ibm-acpi-devel

On Thu, Jul 15, 2010 at 08:00:23PM -0300, Henrique de Moraes Holschuh wrote:

> Do you want to escalate this to Lenovo?  I need a clear and consise
> description of the problem and the boxes we know to be affected.

Well, right now we're not doing precisely what Windows does. The other 
possibility is that when the keyboard controller write triggers some SMM 
code, it makes an assumption about some piece of hardware state that 
isn't true and loops for a while to see if it changes. If we knew what 
that was then we could ensure that we're performing the same state 
change on our way down to reboot.

One thing that would be worth checking is whether performing the 
keyboard controller writes from userspace with a minimal kernel and 
init=/bin/bash shows the 9-second pause or not - and then, ideally, see 
whether the same is also true under DOS.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-15 23:08         ` Matthew Garrett
@ 2010-07-16  3:01           ` Henrique de Moraes Holschuh
  2010-07-16 20:08             ` Matthew Garrett
  2010-07-16 11:02           ` Pedro Ribeiro
  1 sibling, 1 reply; 15+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-07-16  3:01 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Pedro Ribeiro, eusou15, linux-kernel, toralf.foerster,
	ibm-acpi-devel

On Fri, 16 Jul 2010, Matthew Garrett wrote:
> On Thu, Jul 15, 2010 at 08:00:23PM -0300, Henrique de Moraes Holschuh wrote:
> > Do you want to escalate this to Lenovo?  I need a clear and consise
> > description of the problem and the boxes we know to be affected.
> 
> Well, right now we're not doing precisely what Windows does. The other 
> possibility is that when the keyboard controller write triggers some SMM 
> code, it makes an assumption about some piece of hardware state that 
> isn't true and loops for a while to see if it changes. If we knew what 
> that was then we could ensure that we're performing the same state 
> change on our way down to reboot.
> 
> One thing that would be worth checking is whether performing the 
> keyboard controller writes from userspace with a minimal kernel and 
> init=/bin/bash shows the 9-second pause or not - and then, ideally, see 
> whether the same is also true under DOS.

I can't help much there, as the only hardware I have is a ThinkPad T43.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
       [not found] <4C3DCAA4.9050602@gmail.com>
  2010-07-14 14:36 ` [PATCH] Remove 9 second reboot delay on Lenovo T400/T500 Matthew Garrett
@ 2010-07-16  7:38 ` Jens Rutschmann
  2010-07-16 20:31   ` Florian Mickler
  1 sibling, 1 reply; 15+ messages in thread
From: Jens Rutschmann @ 2010-07-16  7:38 UTC (permalink / raw)
  To: Pedro Ribeiro
  Cc: eusou15, ibm-acpi-devel, linux-kernel, toralf.foerster, mjg59

Am 14.07.2010 16:33 schrieb Pedro Ribeiro:
> Please consider this patch. Let me know if you would like me to change
> anything or if you don't agree with it. It applies cleanly to 2.6.35-rc5.
>
> The Lenovo T400 and T500 have an annoying 9 second delay when
> rebooting, unless reboot=pci is passed to the kernel command line.
> This delay happens from at least kernel 2.6.20.
>
> Make this change permanent by hardcoding the Tx00 on the
> arch/kernel/reboot.c pci quirks table.

Hi,

I just want to add to this discussion that this problem also occurs on my T61 with only Linux installed on it.
"reboot=pci" also removed the reboot delay here.

If you need some further information or want me to try some patches / old kernels I'd be glad to help.

Regards,
Jens

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo  T400/T500
  2010-07-15 23:08         ` Matthew Garrett
  2010-07-16  3:01           ` Henrique de Moraes Holschuh
@ 2010-07-16 11:02           ` Pedro Ribeiro
  1 sibling, 0 replies; 15+ messages in thread
From: Pedro Ribeiro @ 2010-07-16 11:02 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Henrique de Moraes Holschuh, eusou15, linux-kernel,
	toralf.foerster, ibm-acpi-devel

On 16 July 2010 00:08, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Thu, Jul 15, 2010 at 08:00:23PM -0300, Henrique de Moraes Holschuh wrote:
>
>> Do you want to escalate this to Lenovo?  I need a clear and consise
>> description of the problem and the boxes we know to be affected.
>
> Well, right now we're not doing precisely what Windows does. The other
> possibility is that when the keyboard controller write triggers some SMM
> code, it makes an assumption about some piece of hardware state that
> isn't true and loops for a while to see if it changes. If we knew what
> that was then we could ensure that we're performing the same state
> change on our way down to reboot.
>
> One thing that would be worth checking is whether performing the
> keyboard controller writes from userspace with a minimal kernel and
> init=/bin/bash shows the 9-second pause or not - and then, ideally, see
> whether the same is also true under DOS.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org
>

I'm available to try and test whatever you want on my machine .

Regards,
Pedro

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-16  3:01           ` Henrique de Moraes Holschuh
@ 2010-07-16 20:08             ` Matthew Garrett
  2010-07-17  1:23               ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 15+ messages in thread
From: Matthew Garrett @ 2010-07-16 20:08 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Pedro Ribeiro, eusou15, linux-kernel, toralf.foerster,
	ibm-acpi-devel

Ok.

1) The ACPI reboot vector reboots these machines instantly, but the flag 
that indicates we should use it isn't set.
2) Windows takes 9 seconds to reboot on the same hardware.

It just sounds like broken firmware.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-16  7:38 ` Jens Rutschmann
@ 2010-07-16 20:31   ` Florian Mickler
  0 siblings, 0 replies; 15+ messages in thread
From: Florian Mickler @ 2010-07-16 20:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: ibm-acpi-devel, linux-kernel

On Fri, 16 Jul 2010 09:38:54 +0200
Jens Rutschmann <Jens.Rutschmann@gmx.info> wrote:

> Am 14.07.2010 16:33 schrieb Pedro Ribeiro:
> > Please consider this patch. Let me know if you would like me to change
> > anything or if you don't agree with it. It applies cleanly to 2.6.35-rc5.
> >
> > The Lenovo T400 and T500 have an annoying 9 second delay when
> > rebooting, unless reboot=pci is passed to the kernel command line.
> > This delay happens from at least kernel 2.6.20.
> >
> > Make this change permanent by hardcoding the Tx00 on the
> > arch/kernel/reboot.c pci quirks table.
> 
> Hi,
> 
> I just want to add to this discussion that this problem also occurs on my T61 with only Linux installed on it.
> "reboot=pci" also removed the reboot delay here.
> 
> If you need some further information or want me to try some patches / old kernels I'd be glad to help.
> 
> Regards,
> Jens
> 
Hi!

Just a quick me too: I'm on Lenovo R61. reboot=pci gives instantaneous
reboot, reboot=acpi and default-reboot delays for 9 seconds...

Cheers,
Flo


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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-16 20:08             ` Matthew Garrett
@ 2010-07-17  1:23               ` Henrique de Moraes Holschuh
  2010-07-17  1:27                 ` Matthew Garrett
  0 siblings, 1 reply; 15+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-07-17  1:23 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Pedro Ribeiro, eusou15, linux-kernel, toralf.foerster,
	ibm-acpi-devel

On Fri, 16 Jul 2010, Matthew Garrett wrote:
> 1) The ACPI reboot vector reboots these machines instantly, but the flag 
> that indicates we should use it isn't set.
> 2) Windows takes 9 seconds to reboot on the same hardware.
> 
> It just sounds like broken firmware.

I'm confused.  Is it the PCI reboot vector, or the ACPI reboot vector
that acts instantly?  The bug reporters say that they use reboot=pci to
have instant reboot, in this thread...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo T400/T500
  2010-07-17  1:23               ` Henrique de Moraes Holschuh
@ 2010-07-17  1:27                 ` Matthew Garrett
  2010-07-23 18:53                   ` Pedro Ribeiro
  0 siblings, 1 reply; 15+ messages in thread
From: Matthew Garrett @ 2010-07-17  1:27 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Pedro Ribeiro, eusou15, linux-kernel, toralf.foerster,
	ibm-acpi-devel

On Fri, Jul 16, 2010 at 10:23:04PM -0300, Henrique de Moraes Holschuh wrote:

> I'm confused.  Is it the PCI reboot vector, or the ACPI reboot vector
> that acts instantly?  The bug reporters say that they use reboot=pci to
> have instant reboot, in this thread...

The PCI one, since it's a function of the chipset. The ACPI one would 
act instantly (it's the PCI one, in this case) but it's marked as 
unsupported. However, the PCI one is poorly standardised - Windows never 
uses it, different chips have subtly different requirements and so on.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: [ibm-acpi-devel] [PATCH] Remove 9 second reboot delay on Lenovo  T400/T500
  2010-07-17  1:27                 ` Matthew Garrett
@ 2010-07-23 18:53                   ` Pedro Ribeiro
  0 siblings, 0 replies; 15+ messages in thread
From: Pedro Ribeiro @ 2010-07-23 18:53 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Henrique de Moraes Holschuh, eusou15, linux-kernel,
	toralf.foerster, ibm-acpi-devel

On 17 July 2010 02:27, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Fri, Jul 16, 2010 at 10:23:04PM -0300, Henrique de Moraes Holschuh wrote:
>
>> I'm confused.  Is it the PCI reboot vector, or the ACPI reboot vector
>> that acts instantly?  The bug reporters say that they use reboot=pci to
>> have instant reboot, in this thread...
>
> The PCI one, since it's a function of the chipset. The ACPI one would
> act instantly (it's the PCI one, in this case) but it's marked as
> unsupported. However, the PCI one is poorly standardised - Windows never
> uses it, different chips have subtly different requirements and so on.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org
>

So what should be done then? This is not the most annoying of bugs,
but still a bug.

Regards,
Pedro

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

end of thread, other threads:[~2010-07-23 18:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4C3DCAA4.9050602@gmail.com>
2010-07-14 14:36 ` [PATCH] Remove 9 second reboot delay on Lenovo T400/T500 Matthew Garrett
2010-07-14 14:46   ` Pedro Ribeiro
2010-07-14 15:26   ` Nick Bowler
2010-07-15 22:31   ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
2010-07-15 22:50     ` Matthew Garrett
2010-07-15 23:00       ` Henrique de Moraes Holschuh
2010-07-15 23:08         ` Matthew Garrett
2010-07-16  3:01           ` Henrique de Moraes Holschuh
2010-07-16 20:08             ` Matthew Garrett
2010-07-17  1:23               ` Henrique de Moraes Holschuh
2010-07-17  1:27                 ` Matthew Garrett
2010-07-23 18:53                   ` Pedro Ribeiro
2010-07-16 11:02           ` Pedro Ribeiro
2010-07-16  7:38 ` Jens Rutschmann
2010-07-16 20:31   ` Florian Mickler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox