LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-11-2003, 05:33 AM   #1
Westdog976
LQ Newbie
 
Registered: Jun 2003
Location: Los Angeles, CA
Posts: 25

Rep: Reputation: 15
Linux Won't Power Down Computer


I have two machines running Mandrake Linux 9.1. When I halt the systems, one will power down all the way and the other will just say 'Power Down' and I have to shut it off manually. This is annoying, can anyone help?

Thanks
 
Old 06-11-2003, 09:08 AM   #2
DazeiHead
Member
 
Registered: May 2003
Posts: 56

Rep: Reputation: 15
this happens to me too it really is annoying lol
 
Old 06-11-2003, 09:20 AM   #3
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
it;s an option in the kernel compile thing. Provided your mother board is capable of powering down in linux that is.

go into the source code directory for the linux kernel , make xconfig (or whatever you want to use to configure it, then check General Setup, the APM section in particular (last eight settings)

edit 1:
Oh yeah, you'll need to recompile the kernel after that and so forth ...

edit 2:
Oh yeah, and if it's a module (called apm.o) you might just need to modprobe it ...

Last edited by chakkerz; 06-11-2003 at 09:21 AM.
 
Old 06-11-2003, 10:18 AM   #4
Westdog976
LQ Newbie
 
Registered: Jun 2003
Location: Los Angeles, CA
Posts: 25

Original Poster
Rep: Reputation: 15
Geeez, and I thought this was the Newbie forum... could you put that in stupid terms?
 
Old 06-12-2003, 01:46 AM   #5
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
sorry...erm ... ok let's see (after writting it and reading it, i'm afraid it didn't get much simpler, i hope it helps somewhat never the less)

provided your motherboard actually supports a software off feature then it has to do with your kernel configuration

If you motherboard doesn't support it, then you can't get it to work ... check the motherboard manual if it supports it ... if you have a cable running from you powersupply to the switch and LEDs at the front of the case, it doesn't support it (most likely)

Assuming that it does support it (in other words you can do it in Windows or another Linux distro)
You need to check that your kernel either has the feature statically compiled into it. or as a module, try running:

cat /boot/config | grep CONFIG_APM=

You will get something like this:
CONFIG_APM=m

an m at the end indicates it's a module, a y indicates it's static in the kernel. a # CONFIG_APM is not set means it's not available either way.

If it is a y or not set, you will need to recompile the kernel and toy with the settings that become available when you turn on APM
You do that by changing into the /usr/src/linux directory (or wherever you put the kernel source)
at this stage on that particular train of thought i have to say, good luck. saying yes to APM and leaving the subsequently available options as no should get it working unless you have a buggy BIOS. On that i can't offer advice

If it isn't compiled it, make it a yes, go to the main menu, save and exit
make dep clean bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/vmLinuz_new
cp System.map /boot/System.map_new
edit /etc/lilo.conf to add an option to the newly compiled kernel

you'll need to add something like this:
image = /boot/vmLinuz_new
root = /dev/hda3
label = Linux_NEW
read-only

(the root = value is the same as the one that's already in the lilo.conf file for the existing kernel, in my case it's on the third hard drive partition)
leave are reference to the existing kernel in there, in case the new one doesn't boot, you can use the old one to get back into linux
if you are using GRUB find out what to do ... i've forgotten.
(if you don't know what you're using ... check during bootup, it should tell you when you see the menu asking you what kernel to load)

after you've edited and saved lilo.conf, exit the editor and run
lilo
and are now ready to reboot. (and if that fails curse my name ... so be careful and check with other sources on what to do [this was a crash course])

Ok, now say it's a module, ie CONFIG_APM=m
all you need to is
modprobe apm
whilst superuser / root
and a shutdown -h now should turn your system off

NOTE
a full guide on how to compile a kernel can be found here:
http://www.linuxquestions.org/questi...threadid=49035

compiling a kernel ain't a big thing, but it can still throw you out ... i'm sure that forum gives a closer description.

The essence is, you need APM as a module, or statically compiled into the kernel.

Last edited by chakkerz; 06-12-2003 at 01:48 AM.
 
Old 06-12-2003, 02:34 AM   #6
DazeiHead
Member
 
Registered: May 2003
Posts: 56

Rep: Reputation: 15
LMFAO westdog
 
Old 06-12-2003, 02:51 AM   #7
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
Look ... i'm sorry K :P
I've been recompiling my kernel for three days cause i couldn't get my GFX card to work, more to the point, i couldn't get linux to use the AGP bit, the card was working fine.

So UnrealTournament2003 ran, giving me performance that would cause some of my friends to cream their pants, and i (who doesn't really play the game ... maybe 10 hours all up since i bought it day of release) and sitting there thinking ... i should be getting about 4 times as many frames a second. So while trying to get the AGP working i was trying to get my computer to soft power down ... did i succeed ?? NO. So i see this thread, and figure, lets have a look, check my system, and what do you know, my computer soft powers down all of a sudden...

We aren't discussing computer science in my eyes, this is voodoo ... LOLOL
 
Old 06-12-2003, 03:37 AM   #8
DazeiHead
Member
 
Registered: May 2003
Posts: 56

Rep: Reputation: 15
do you get better performance running games under linux?
like lets say counter-strike?
 
Old 06-12-2003, 07:26 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,065

Rep: Reputation: Disabled
Might be it's not so complicated after all. I think, it stands to reason, that he uses the same system on both machines. Since power down works on one of them, it's not a Linux problem.

Look into your BIOS advanced settings and make sure that APM and ACPI (both) are enabled. If my above guess is correct, that might well be the cause for the trouble.
 
Old 06-12-2003, 07:44 AM   #10
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
Good call... of course that assumes no customization has taken place, and updates are mirrored. Especially since Mandrake is pretty up to scratch on these matters.

Nevertheless, JZL2401-U is right, make sure APM and APIC are enabled in the bios.

As for game performance ...
No it's more about reboot time, i'd rather play my games in the OS i'm in, which is usually Linux, because i develop in Linux (and yes, i get far better performance out of Linux in that regard). UT2K3, Quake3 all work in linux and they work well, Half-Life i've tried, but didn't really play, but considering that it will work fine on a 133 in windows, i'm sure my AthlonXP2400+ will run it just fine as well. MaxPayne and other new games work just as well as in windows ... mind you Windows gives more options generally, but then i haven't looked into getting advanced gfx functions to happen in Linux yet.

In the end, the CPU i run drives the games just fine, and the GF4 Ti4200 renders everything i throw at it to make it look good. Performance and frame rate isn't that important, aslong as it doesn't chug, and it doesn't.
 
Old 06-12-2003, 02:31 PM   #11
Westdog976
LQ Newbie
 
Registered: Jun 2003
Location: Los Angeles, CA
Posts: 25

Original Poster
Rep: Reputation: 15
I ran cat /boot/config | grep CONFIG_APM= and it returned CONFIG_APM=y so its not a module.

Quote:
You do that by changing into the /usr/src/linux directory (or wherever you put the kernel source)
I have no /usr/src/linux directory... How would I find out the directory where the kernel source is located? Are there other default directories it might be in?

What do you think about this? I wasn't able to find /etc/lilo/conf so I just ran append="apm=on apm=power-off" from root but it didn't work. Any suggestions?
 
Old 06-12-2003, 03:02 PM   #12
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Quote:
Originally posted by JZL240I-U
Might be it's not so complicated after all. I think, it stands to reason, that he uses the same system on both machines. Since power down works on one of them, it's not a Linux problem.
I use Mandrake 9.1 and had the same problem till I went into the BIOS settings and turned automatic power management on. After that, Linux turned the power off for me when I told it to.
 
Old 06-12-2003, 03:07 PM   #13
Westdog976
LQ Newbie
 
Registered: Jun 2003
Location: Los Angeles, CA
Posts: 25

Original Poster
Rep: Reputation: 15
Well I have Windows xp on a different partition of my hdd and it powers down just fine. Wouldn't that mean the APM is on? I try it any way though, thanks for the tip...
 
Old 06-12-2003, 03:11 PM   #14
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
To judge from what I've read everywhere, automatic power management must be one of the touchiest, most unpredictable areas in computer design. It almost seems like it doesn't work the same for any two people or systems! Good luck!
 
Old 06-13-2003, 12:29 AM   #15
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
oh not only does it not work for two people using the same hardware and software, it doesn't necessarily work for the same person. I've spent more time trying to get it to work in debian than i did anything else with the kernel in that distro (gee was it fun).

(WTF can't i copy and paste now?? ... never mind)
erm... if it return CONFIG_APM=y then it's compiled into the kernel, so in theory everything is as good as it will get (oh yeah ...)

Which leads to problems when it isn't as good as it should be (which is why we're all here). Ok, so the first thing to do is to check that APM is turned on in the BIOS, just cause windows can turn your computer off doesn't really mean anything (since it probably is using APIC).

If it's on in the BIOS and doesn't work ... count your losses and leave things as they are ... or find someone with the same bios + mobo as you, get their kernel config file and compile from that. (Alternatively indulge in the joy of waiting for the kernel to compile )

As to where the kernel sources are, well /usr/src/linux is actually not a real directory, it's a symlink to the directory that contains the kernel sources. Not everyone has that link, i usually don't bother, last time i installed the linux source code, the package created the link for me. So where is the kernel source...
hopefully if you type:
cd /usr/src/lin -----> and hit the <TAB> key it will auto complete.

if that isn't the case, just looking at what makes that directory unique on my system, there is nothing really there that stands out... sorry
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Computer won't power on habiblove Linux - Hardware 18 10-27-2004 09:21 PM
Power issue with an older linux computer randyriver10 Linux - Hardware 4 07-11-2004 11:38 AM
Computer soesn't power off Gramphos Red Hat 5 09-24-2003 11:09 AM
power off the computer after shut down gary.chan Linux - Software 1 01-05-2003 11:35 AM
computer power problem ronss Linux - Hardware 3 08-06-2002 04:22 AM

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

All times are GMT -5. The time now is 12:55 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration