Intercepting the Reset Button 24
Jeff Brubaker asks:
"I've always wanted to have it so that when I hit
the reset button on my computer it would run "restart".
I do not have a clue as how to do this and was wondering if
it is even possible." This has the added advantage of
allowing you to cleanly shut down the machine if you
lose complete control over the console. Definitely a good
thing.
huh? (Score:1)
Most likely the machine is hardlocked?
And needs a reset.
(machine + hardlocked = how the hell are you
gonna do a clean shutdown?)
Re:Mac keyboard reset is not handled in hardware. (Score:1)
As far as I know on Macs after the MacPlus and before the iMac it was a hardware thing. If you hit a Mac's power key and before the machine finishes it's memory check you CMD-CTL-PWR it it'll chime again and reboot. This is before anything except the ROM loads.
You can three finger salute it in rapid succession before the previos chime ends, you can reboot it again.
iMacs and the Blue and White G3s often lose the ability to use the keyboard after a good crash, but that's because it's USB. If you plugged an ADB keyboard into the G3 I bet that you'd be able to force the reboot.
LK
ACPI Power Managment (Score:1)
This will only work with newer ATX mobos, that have the funky power button. (The action performed is BIOS configurable, but on mine, a single hit is supposed to tell the OS to suspend, while holding it for 4 seconds kills the machine.)
you missed the point (Score:1)
not anymore. (Score:1)
--
Mac keyboard reset is not handled in hardware. (Score:1)
Now that's some serious crashing...
--Lenny
Re:huh? (Score:1)
Not all reset buttons created equal (Score:1)
Power, instead? (Score:1)
Can the 'Magic SysRQ' key somehow be programmed to do this? I've never actually tried to use it (hard to test crash-level stuff if linux never crashes
Not with the 2.2.x kernel (Score:1)
Reset button (Score:1)
Reset rewiring... (Score:1)
Double Click (Score:1)
Vulcan nerve pinch (Score:1)
P.S. No, Ctl-Alt-Del is NOT a vulcan nerve pinch. Real VNPs work *all the time*.
--------
Magic SysRq Keys (Score:1)
Well, for some consolation, you can still do a safe reboot with the Magic SysRQ keys:
1) SysRq-E - Send SigTERM to all processes
2) wait for disk activity to stop
3) SysRq-I - Send SigKILL to all processes
4) wait for disk activity to stop
5) SysRq-S - Sync
6) wait for disk activity to stop
7) SysRq-U - Remount all FSs read-only
8) wait for disk activity to stop
9) SysRq-B - Reboot
EISUB! Very useful for recovering from a dead console.
-
--------
Maybe it could be done... (Score:1)
Also, I believe that the contents of memory and registers stay intact through the reset, and are only cleared later... Didn't they use a register in the keyboard as a pointer to the last known context during swaps between real and protected mode (which required a reset)?
Anyway, it might be possible to install a routine to recover the current context after a reset, but it would definitely require burning the eprom.
Impossible, no? (Score:1)
Interrupts, resets, intelligent keyboards, etc.. (Score:1)
The Reset button, however, does ground the Power Good signal as was suggested earlier. Perhaps by rewiring it to the _reset line on the CPU, you could have it run the code at FFFF:FFFC, instead of HARD-resetting the whole PC. Or maybe my understanding of PG's role is lacking. Anyone here ever build a POST card? Hehe..
Re:huh? (Score:1)
Oddly enough, one of the screensavers in the new version of XScreensaver would always cause my console to get munged-until-no-good to the point where a three-fingered salute wouldn't work.
I was able to log in on my serial terminal ($8 from a garage sale) and run 'shutdown -r now' to restart. Needless to say, that particular screensaver is now commented out of my .xscreensaver.
reset circuitry (Score:1)
As far as intercepting the reset signal, I think FizzyPop had a good idea with hooking something to the serial port and making a program monitor it. You could probably do something like connecting the RTS/CTS or DTR/DSR pins, possibly the TX/RX pins, together and watching for any change in the status register of the serial port in question.