Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653
Rep:
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 ...
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653
Rep:
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
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653
Rep:
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
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,433
Rep:
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.
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653
Rep:
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.
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?
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.
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...
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!
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.