LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-04-2005, 11:15 AM   #1
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Rep: Reputation: 30
Unhappy 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
 
Old 10-04-2005, 11:57 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 10-04-2005, 04:47 PM   #3
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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.
 
Old 10-05-2005, 08:28 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
/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.

Last edited by MensaWater; 10-06-2005 at 07:17 AM.
 
Old 10-05-2005, 06:08 PM   #5
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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.
 
Old 10-21-2005, 06:27 PM   #6
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
Question

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.
 
Old 10-22-2005, 09:06 AM   #7
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
I had a similar problem when I installed Fedora Core 3 on a desktop system. My fix was to revert to FC2.
 
Old 10-23-2005, 07:01 AM   #8
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
Reverting to the previous kernel is not really an option because my hardware doesn't work with it...

Anyone any other ideas?
 
Old 11-17-2005, 05:55 PM   #9
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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.
 
Old 11-18-2005, 10:54 AM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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.
 
Old 11-18-2005, 10:58 AM   #11
ring16master
LQ Newbie
 
Registered: Nov 2005
Location: Puerto RIco
Posts: 4

Rep: Reputation: 0
whats the local login for
 
Old 11-18-2005, 02:16 PM   #12
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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. :/
 
Old 11-18-2005, 02:50 PM   #13
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Rep: Reputation: 15
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.
 
Old 11-18-2005, 05:30 PM   #14
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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.
 
Old 11-18-2005, 06:20 PM   #15
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
Question

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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New kernel installed, laptop won't power off rollo Linux - Laptop and Netbook 8 12-07-2005 03:40 PM
Installer Fails on Power System jasybee2000 Mandriva 1 01-17-2005 11:23 PM
Enabling power save/power management/cpu freq scaling features for a Debian system zero79 Debian 0 12-19-2004 01:17 PM
Check system after power breakdown? nostromo Linux - General 1 09-28-2004 06:43 PM
apmd power/off system suspend knight-rider Linux - Hardware 0 02-17-2004 07:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration