2008-07-31 13:45:37

by Zdenek Kabelac

[permalink] [raw]
Subject: Sysrq+B doesn't work on my box

Hi

I'd like to get resolved this problem - my T61 machine doesn't reboot
with SysRQ+B key.
And I never remember if it was ever rebooting.

This is all I know so far and I've no idea where could be the problem.

System is running Fedora rawhide 64bit.

If I press any other SysRQ combination - it works - so things like
Sync, Umount, powerOff do work normally.
It's just Boot which does not even get to the __handle routine
(I've added one extra simple debug prinkt
for this case)

So - who/how/where could mask this key sequence from being delivered
to the sysrq driver?
(obviously I do not have any problems typing letter 'b' itself)



Another issue is - that even with 'echo b >/proc/sysrq-triggers' my
machine doesn't reboot.
It just goes though the native_machine_emergency_restart BOOT_KBD &
BOOT_TRIPLE cases
(as I can see via another debug prints) and no reboot actually happens -
what kind of routines should trigger the reboot ?
At this moment I had to power-off machine manually holding power switch for 4s.

(using regular command 'reboot' restarts the machine without a single problem)

To make more mysterious - I know couple other T61 users - which do not
have any problems
with SysRq+B - and when I even use their kernels - I've no success with reboot.

As the machine works just fine otherwise I could hardly imagine there
could be a hw bug just cause some reboot lock???

Thanks for any hint

Zdenek


Attached my configuration


Attachments:
(No filename) (1.42 kB)
config (62.29 kB)
Download all attachments

2008-07-31 13:51:19

by Alexey Dobriyan

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

On Thu, Jul 31, 2008 at 03:45:24PM +0200, Zdenek Kabelac wrote:
> Hi
>
> I'd like to get resolved this problem - my T61 machine doesn't reboot
> with SysRQ+B key.
> And I never remember if it was ever rebooting.
>
> This is all I know so far and I've no idea where could be the problem.
>
> System is running Fedora rawhide 64bit.
>
> If I press any other SysRQ combination - it works - so things like
> Sync, Umount, powerOff do work normally.
> It's just Boot which does not even get to the __handle routine
> (I've added one extra simple debug prinkt
> for this case)
>
> So - who/how/where could mask this key sequence from being delivered
> to the sysrq driver?
> (obviously I do not have any problems typing letter 'b' itself)
>
>
>
> Another issue is - that even with 'echo b >/proc/sysrq-triggers' my
> machine doesn't reboot.

Typo here? Do

/bin/echo b >/proc/sysrq-trigger

(sic)

2008-07-31 14:27:43

by Zdenek Kabelac

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

2008/7/31 Alexey Dobriyan <[email protected]>:
> On Thu, Jul 31, 2008 at 03:45:24PM +0200, Zdenek Kabelac wrote:
>> Hi
>>
>> I'd like to get resolved this problem - my T61 machine doesn't reboot
>> with SysRQ+B key.
>> And I never remember if it was ever rebooting.
>>
>> This is all I know so far and I've no idea where could be the problem.
>>
>> System is running Fedora rawhide 64bit.
>>
>> If I press any other SysRQ combination - it works - so things like
>> Sync, Umount, powerOff do work normally.
>> It's just Boot which does not even get to the __handle routine
>> (I've added one extra simple debug prinkt
>> for this case)
>>
>> So - who/how/where could mask this key sequence from being delivered
>> to the sysrq driver?
>> (obviously I do not have any problems typing letter 'b' itself)
>>
>>
>>
>> Another issue is - that even with 'echo b >/proc/sysrq-triggers' my
>> machine doesn't reboot.
>
> Typo here? Do
>
> /bin/echo b >/proc/sysrq-trigger
>
>

Really only a typo during mail writting - normally I use bash 'tab'
completion for this anyway.
(also - as I said - debug messages I've placed into
arch/x86/kernel/reboot.c are really printed - machine just doesn't
reboot for some reason)

Zdenek

Subject: Re: Sysrq+B doesn't work on my box

On Thu, 31 Jul 2008, Zdenek Kabelac wrote:
> I'd like to get resolved this problem - my T61 machine doesn't reboot
> with SysRQ+B key.
> And I never remember if it was ever rebooting.
>
> This is all I know so far and I've no idea where could be the problem.

Well, many of the different ThinkPad BIOSes are really sensitive to the
proper boot/reboot/shutdown sequence (whatever it is). Otherwise, the thing
gets stuck in SMBIOS limbo and hung. For exeample, we had major issues with
boxes that only shut down half-way and ended up draining the cells to
critical levels, a few months ago. I don't know what finally fixed THAT
one, but it was ugly.

Here is another example: you can't get the TCO watchdog to reboot all (any?)
thinkpads properly on hardware. In my T43, the TCO watchdog IS hooked to
something, but the BIOS hates it to trip and the entire box goes to
neverland when it fires...

If sysrq+b uses a different reboot path than the normal reboot path, it is
the first hint of what is missing...

--
"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

2008-07-31 18:01:23

by Zdenek Kabelac

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

2008/7/31 Henrique de Moraes Holschuh <[email protected]>:
> On Thu, 31 Jul 2008, Zdenek Kabelac wrote:
>> I'd like to get resolved this problem - my T61 machine doesn't reboot
>> with SysRQ+B key.
>> And I never remember if it was ever rebooting.
>>
>> This is all I know so far and I've no idea where could be the problem.
>
> Well, many of the different ThinkPad BIOSes are really sensitive to the
> proper boot/reboot/shutdown sequence (whatever it is). Otherwise, the thing
> gets stuck in SMBIOS limbo and hung. For exeample, we had major issues with
> boxes that only shut down half-way and ended up draining the cells to
> critical levels, a few months ago. I don't know what finally fixed THAT
> one, but it was ugly.
>
> Here is another example: you can't get the TCO watchdog to reboot all (any?)
> thinkpads properly on hardware. In my T43, the TCO watchdog IS hooked to
> something, but the BIOS hates it to trip and the entire box goes to
> neverland when it fires...
>
> If sysrq+b uses a different reboot path than the normal reboot path, it is
> the first hint of what is missing...

I've spend some time with tracking this issue more - and I've discovered this:

SysRQ+B doesn't work with right AltGr on my keyboard - but it does
work with the left Alt which I'm not normally using (It's somewhat
easier to use the right one)
Any idea why AltGR+SysRQ+b does not work on T61 ?

Blocking reboot goes through the arch/x86/kernel/reboot.c
native_machine_emergency_restart() case BOOT_KBD: (10 loop outb()
iteration)
and ends in case BOOT_TRIPLE: int3 - there it stays forever - during
the press of poweroff button it even visits that sysrq __handler.

if the kernel is started with init=/bin/sh - boot works without
problems - so it looks like that disabling reboot capability is the
result of Fedora's rc.sysinit process.
Yet I've no idea what that could be....

Zdenek

Subject: Re: Sysrq+B doesn't work on my box

On Thu, 31 Jul 2008, Zdenek Kabelac wrote:
> work with the left Alt which I'm not normally using (It's somewhat
> easier to use the right one)
> Any idea why AltGR+SysRQ+b does not work on T61 ?

No, but Lenovo could fix it if they wanted to, since the keyboard controller
is actually implemented in firmware inside the EC (a Renesas H8S uC). If
you are under warranty, call their tech support and complain :-)

--
"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

2008-07-31 20:01:28

by Jeremy Fitzhardinge

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

Zdenek Kabelac wrote:
> SysRQ+B doesn't work with right AltGr on my keyboard - but it does
> work with the left Alt which I'm not normally using (It's somewhat
> easier to use the right one)
> Any idea why AltGR+SysRQ+b does not work on T61 ?
>

You can type them separately: AltGr+SysRq, AltGr+b (holding AltGr across
the sequence).

J

2008-08-01 09:54:35

by Zdenek Kabelac

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

2008/7/31 Jeremy Fitzhardinge <[email protected]>:
> Zdenek Kabelac wrote:
>> SysRQ+B doesn't work with right AltGr on my keyboard - but it does
>> work with the left Alt which I'm not normally using (It's somewhat
>> easier to use the right one)
>> Any idea why AltGR+SysRQ+b does not work on T61 ?
>>
>
> You can type them separately: AltGr+SysRq, AltGr+b (holding AltGr across
> the sequence).
>

Ok this sequence does work - so one mystery solved :)

now the remaining part is.


I'll probably try to bisect rc.sysinit script to check what is the
first command
that breaks the reboot - but if there is any idea what should I test first.?

Zdenek

2008-08-01 12:56:33

by Alistair John Strachan

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

On Friday 01 August 2008 10:54:19 Zdenek Kabelac wrote:
> 2008/7/31 Jeremy Fitzhardinge <[email protected]>:
> > Zdenek Kabelac wrote:
> >> SysRQ+B doesn't work with right AltGr on my keyboard - but it does
> >> work with the left Alt which I'm not normally using (It's somewhat
> >> easier to use the right one)
> >> Any idea why AltGR+SysRQ+b does not work on T61 ?
> >
> > You can type them separately: AltGr+SysRq, AltGr+b (holding AltGr across
> > the sequence).
>
> Ok this sequence does work - so one mystery solved :)
>
> now the remaining part is.
>
>
> I'll probably try to bisect rc.sysinit script to check what is the
> first command
> that breaks the reboot - but if there is any idea what should I test
> first.?

Are you using modules? Maybe a driver is loaded and this upsets the BIOS
somehow? If that was the case, the driver wouldn't be loaded in an
init=/bin/sh situation, as you described before.

--
Cheers,
Alistair.

2008-08-01 13:22:49

by Zdenek Kabelac

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

2008/8/1 Alistair John Strachan <[email protected]>:
> On Friday 01 August 2008 10:54:19 Zdenek Kabelac wrote:
>> 2008/7/31 Jeremy Fitzhardinge <[email protected]>:
>> > Zdenek Kabelac wrote:
>> I'll probably try to bisect rc.sysinit script to check what is the
>> first command
>> that breaks the reboot - but if there is any idea what should I test
>> first.?
>
> Are you using modules? Maybe a driver is loaded and this upsets the BIOS
> somehow? If that was the case, the driver wouldn't be loaded in an
> init=/bin/sh situation, as you described before.
>


Yes - except as I've checked the exactly same modularized kernel
running Debian on the same box
has no boot problem.

So it could be the some initialization steps are different so maybe a
slightly different set of modules
is installed or they are initialized on different order - I'll check this.

Zdenek

2008-08-01 20:25:29

by Zdenek Kabelac

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

2008/8/1 Zdenek Kabelac <[email protected]>:
> 2008/8/1 Alistair John Strachan <[email protected]>:
>> On Friday 01 August 2008 10:54:19 Zdenek Kabelac wrote:
>>> 2008/7/31 Jeremy Fitzhardinge <[email protected]>:
>>> > Zdenek Kabelac wrote:
>>> I'll probably try to bisect rc.sysinit script to check what is the
>>> first command
>>> that breaks the reboot - but if there is any idea what should I test
>>> first.?
>>
>> Are you using modules? Maybe a driver is loaded and this upsets the BIOS
>> somehow? If that was the case, the driver wouldn't be loaded in an
>> init=/bin/sh situation, as you described before.
>>
>
>
> Yes - except as I've checked the exactly same modularized kernel
> running Debian on the same box
> has no boot problem.

Ok - idea with checking loaded modules was actually the right way to a
very quick discovery that KVM loaded in my Fedora are the source of
troubles - without them the second mystery is also a history :)

So - is it normal, that loaded KVM modules eliminate emergency reboot
(bug or feature)?

Zdenek

2008-08-01 21:26:48

by Alistair John Strachan

[permalink] [raw]
Subject: Re: Sysrq+B doesn't work on my box

> 2008/8/1 Zdenek Kabelac <[email protected]>:
> > 2008/8/1 Alistair John Strachan <[email protected]>:
> >> On Friday 01 August 2008 10:54:19 Zdenek Kabelac wrote:
> >>> 2008/7/31 Jeremy Fitzhardinge <[email protected]>:
> >>> > Zdenek Kabelac wrote:
> >>>
> >>> I'll probably try to bisect rc.sysinit script to check what is the
> >>> first command
> >>> that breaks the reboot - but if there is any idea what should I test
> >>> first.?
> >>
> >> Are you using modules? Maybe a driver is loaded and this upsets the BIOS
> >> somehow? If that was the case, the driver wouldn't be loaded in an
> >> init=/bin/sh situation, as you described before.
> >
> > Yes - except as I've checked the exactly same modularized kernel
> > running Debian on the same box
> > has no boot problem.
>
> Ok - idea with checking loaded modules was actually the right way to a
> very quick discovery that KVM loaded in my Fedora are the source of
> troubles - without them the second mystery is also a history :)
>
> So - is it normal, that loaded KVM modules eliminate emergency reboot
> (bug or feature)?

Obviously not :-) Added Avi to CC.

Avi, Zdenek is having a problem on his T61 where the Alt-SysRq-B emergency
reboot mechanism stops working after he loads the KVM module. Any ideas?

--
Cheers,
Alistair.