#231293 - 23/08/2004 12:33
Re-starting PC's
|
pooh-bah
Registered: 16/04/2002
Posts: 2011
Loc: Yorkshire UK
|
Where I live in the wilds of North Yorkshire, fairly long power cuts are a reasonably common occurence, for instance whilst we were taking a week in Holland for the meet, my PC shut down in the thunder storms on the Wednesday night. The PC in question, records between 8 and 11 hours of radio a week, either from DAB, or digital terrestial TV. If I'm away for 3 weeks, it'll carry on making the same schedule of recordings each week. I've got power back up, but most cuts are outside its limitations and the PC shuts down. Is there anyway that I can get the PC to reboot when power is restored? The only way I can think of is to connect a relay across the "on" button, which sends a pulse through a delay circuit a few seconds after power is restored. However, I'm loathe to open up the PC and introduce one of my ham fisted bits of circuitry and soldering, if a perfectly good solution exists.
_________________________
Politics and Ideology: Not my bag
|
Top
|
|
|
|
#231294 - 23/08/2004 12:47
Re: Re-starting PC's
[Re: boxer]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
If it's a reasonably modern computer, changes are that there is a setting in the BIOS for what to do when it loses power. Usually the options are "turn on", "stay off", and "go back to the state before the power failed".
_________________________
Bitt Faulk
|
Top
|
|
|
|
#231295 - 23/08/2004 18:37
Re: Re-starting PC's
[Re: wfaulk]
|
carpal tunnel
Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
|
Aha! On some systems, you'll find the power on resume won't work if the system has been shutdown properly.
I had this problem with a linux box, the power would go off and the box would shut down gracefully. Once the power returned the UPS would go back to mains and power would return to the box. Sadly it then required a press of the power button.
The solution, don't let the UPS shut the machine down. Just run it off the UPS until its exhausted and cops out. Once the power comes back the machine starts up. The box in question runs a journalled file system so doesn't mind the power being pulled.
_________________________
Cheers,
Andy M
|
Top
|
|
|
|
#231296 - 23/08/2004 18:49
Re: Re-starting PC's
[Re: andym]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Actually, the solution is to shut it down but don't remove power. Most OSes will let you do this, and as long as APM/ACPI/whatever isn't used to power the box down, all the BIOS knows is that it was still supplying power when it went away.
I haven't done this with Linux in a long time, so I don't remember what the exact solution was, but it did exist. Even if I did remember, actually, it'd probably be so different now as to be irrelevant.
FWIW, the halt(8) man page says that it'll power off on "halt -p" or "poweroff", but shouldn't on just a "halt". Check your power management scripts to see what it's calling to halt the OS. It may be calling a script that tries to power off at the end instead of letting the machine run.
Edited by wfaulk (23/08/2004 18:54)
_________________________
Bitt Faulk
|
Top
|
|
|
|
#231297 - 23/08/2004 19:50
Re: Re-starting PC's
[Re: wfaulk]
|
carpal tunnel
Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
|
The mists are clearing.... I do remember disabling APM/ACPI, but I don't don't want shut the machine down right now to check, it has over 250 days uptime which I'm reasonably proud of... Of course, most of this won't help Godfrey as he's a Windows man. Unless there's a setting somewhere you can change.
_________________________
Cheers,
Andy M
|
Top
|
|
|
|
#231298 - 23/08/2004 19:52
Re: Re-starting PC's
[Re: andym]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
I use apcupsd to manage all my computers, workstation, server, Unix, and Windows, and it knows how to do the proper thing, even under Windows. I'm not suggesting that he use that package, as it's rather Unix-centric, but a well-designed program ought to be able to do it, and ought to do it by default, which is why I directed him to check his BIOS.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#231299 - 23/08/2004 20:01
Re: Re-starting PC's
[Re: wfaulk]
|
carpal tunnel
Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
|
I use apcupsd too, at the time it was the most recent gentoo ebuild. But it definately didn't do the right thing initally, although thinking about it, it could be the gentoo-specific shutdown scripts that are to blame. In which case they've probably been fixed. I could always experiment with our spare UPS and one of our dev machines.
Dammit, another thing to add to the to do list.
_________________________
Cheers,
Andy M
|
Top
|
|
|
|
#231300 - 24/08/2004 06:59
Re: Re-starting PC's
[Re: andym]
|
pooh-bah
Registered: 16/04/2002
Posts: 2011
Loc: Yorkshire UK
|
Thanks guys, I'll check it all out when I get home Thursday.
_________________________
Politics and Ideology: Not my bag
|
Top
|
|
|
|
|
|