LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New kernel installed, system won't power off (https://www.linuxquestions.org/questions/linux-newbie-8/new-kernel-installed-system-wont-power-off-369704/)

rollo 10-04-2005 11:15 AM

New kernel installed, system won't power off
 
I have a strange problem which seems to be related to the power management implementation on my laptop.

I installed a new kernel, and now when I type telinit 0 to shutdown, the machine goes into hibernate. In the previous kernel telinit 0 causes a complete power-off, which is what I want.

Any ideas how to get round this so I don't have to boot a separate kernel in order to turn off the machine?

Thanks very much.

Rollo

MensaWater 10-04-2005 11:57 AM

Does "shutdown -h 0" do the same thing?

I'd really recommend running shudown over "telinit" just so you're in the habit. Your distro may always do a "shutdown" on doing "telinit" (or "init") but most flavors of Unix didn't until recently. You can cause damage by telling it to stop the operating system but not stop underlying processes first as shutdown does.

rollo 10-04-2005 04:47 PM

Thanks very much for the pointer, jlightner.

shutdown -h 0 has the same effect as telinit 0 on my system. It must be referenced by the runlevel script.

However, shutdown -h 0 definitely has different effects in the two kernels (2.6.5.x and 2.6.12.x). In the older kernel, the "off-click" is brutal and precedes the disk spindown. In the newer kernel, the disk spins down gently before the off-click.

This gives the impression of it going into hibernation, and I would swear that when I last tried this kernel a few months ago I got a spontaneous disk spin-up several hours after shutting down. But possibly I am imagining things.

I would still like to understand better how the kernel influences these things, given that they are governed by the scripts in /etc.

MensaWater 10-05-2005 08:28 AM

/etc/init.d (more appropriately /etc/rc?.d since its possible one would be there not linked backed to /etc/init.d) are only part of the story. Actually these are a fairly recent development in Unix/Linux (considering Unix has been around since 1969). On HP-UX 9 they didn't exist so have only been around about 10 years. (NOTE: some flavors of Linux apparently don't use SysV init scripts.)

You can have a look at /etc/inittab which has been there far longer. Once upon a time I did most of my startups from within that and it is still what happens first.

The process "init" is PID 1 because it is the first thing that starts. Doing a "man init" should give you some additional details on this. For more detail as to what the kernel does I'll have to defer to someone else as I dont' really delve into that despite having attended internals training once upon a time.

rollo 10-05-2005 06:08 PM

Thanks for the extra information.

I guess the difference in shutdown behaviour between the kernels is just a refinement of the hardware support in the later kernel. As long as the effect is the same, I suppose that can only be a good thing.

rollo 10-21-2005 06:27 PM

I wasn't imagining it after all.

Under kernel 2.6.12.3, my laptop will not properly power off. Having done a telinit 0 or a shutdown -h apparently with success, the machine will then turn on and boot up spontaneously in the middle of the night. I assume this was at 4.15am for a cron job, though to be honest I was in too much of a daze to check the cause.

Since I sleep in close proximity to my laptop, 4am boot-ups are not really desirable. And in any case I can't see how the cron job will get done, because the machine is in an unbooted state to start with. It seems to be a question of interference with the ACPI modules.

Anyone got any ideas what I can tweak or disable? Other than unplugging and taking the battery out, that is...

Thanks. :)

eddiebaby1023 10-22-2005 09:06 AM

I had a similar problem when I installed Fedora Core 3 on a desktop system. My fix was to revert to FC2.

rollo 10-23-2005 07:01 AM

Reverting to the previous kernel is not really an option because my hardware doesn't work with it...

Anyone any other ideas?

rollo 11-17-2005 05:55 PM

Canvassing again for ideas...
 
This thread has had a good few hits, so perhaps I'm not the only one with this unsolved problem.

To recap. My laptop does not power off completely with a telinit 0 or a shutdown -h now under recent kernels (2.6.12.3 and 2.6.13.4 at the very least). It did under 2.6.5.x.

Somewhere there must be a conflict between the kernel and the hardware, perhaps involving the ACPI power management protocols. Still seems strange to me that Linux doesn't have a command which just turns the machine off, always.

Any more ideas on commands and switch combos to try? Or power management settings to tweak?

Thanks.

sundialsvcs 11-18-2005 10:54 AM

Check the power-management support in the kernel. There are lots of ways that a laptop can implement power-management. The /var/log/messages file should have something to say... error-messages resulting from attempts to power-off and so forth.

ring16master 11-18-2005 10:58 AM

whats the local login for

rollo 11-18-2005 02:16 PM

Thanks for the responses.

Shutting down produces no error messages, and works fine. The problem is in the way the hardware interprets the command.

Oh well. I guess I will just have to resort to the foolproof option to prevent the machine waking up unasked - pulling out the battery. Seems silly to have to do this, but there you go. :/

apepost 11-18-2005 02:50 PM

Have you checked that happens only with the new kernel?

I had this problem once, and it turned out some of my so called friends had set up the bios to boot in the middle of the night.

Just asking.

rollo 11-18-2005 05:30 PM

Thanks for the tip apepost.

But yep, it's definitely the kernel. As detailed in my posts above, the sound of the hard drive powering down is different. No other settings or the BIOS have been touched.

I was thinking about modifying the cronjob schedule to get round the nocturnal boot-up issue, but this hardly addresses the issue. The issue is that I don't want my computer starting up when it is meant to be turned off...

Perhaps this post should be in the hardware forum, because it seems to be a pure hardware problem. For my part I have no idea how to solve it, in any case!

Oh well.

rollo 11-18-2005 06:20 PM

Disabled hibernation in the BIOS. Made no difference to the "soft" power-down.

The reason this seems strange to me is that the machine does seem to be turning off properly, as under the older kernel. The shutdown script executes properly. All the services shut down one by one (including 'cron.d') before the final power-down.

So if the cron daemon and nothing else is running, how on earth is the machine powering up spontaneously?


All times are GMT -5. The time now is 12:14 AM.