LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 12-02-2004, 02:51 PM   #1
MadMusician_uk
LQ Newbie
 
Registered: Oct 2004
Location: Denver, USA
Distribution: Ubuntu 9.04
Posts: 20

Rep: Reputation: 0
How do I disable APM?


Hi, I have a desktop system (an ancient thing -PII 233, 96Mb RAM...) that I'm trying to use as an internet server for the home network, but APM keeps putting it into suspend or standby (I don't know which!) unless the keyboard is being used. I've tried killing kapmd, but it seems to restart almost insantly.

I've looked in all the files etc/rc.d/ for anything apm related, but can't find anything. Would the best way be to disable apm in the BIOS?

I'm using Mandrake 10.0 Official (with 2.6.something kernel), but without gnome, so I can't use any of the pretty GUI configuration tools!

At the moment its running Win2k (dual boot), but I don't trust it (it reboots for no reason!), and want to get linux working asap

can anybody offer any insights?!

cheers
 
Old 12-02-2004, 03:02 PM   #2
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
edit /etc/lilo.conf and add

noapm

To the line with all of the arguements for the kernel you want to use.

Then run lilo.
 
Old 12-09-2004, 08:48 AM   #3
MadMusician_uk
LQ Newbie
 
Registered: Oct 2004
Location: Denver, USA
Distribution: Ubuntu 9.04
Posts: 20

Original Poster
Rep: Reputation: 0
Ok, I tried that and it didn't work...

any other suggestions?!
 
Old 12-09-2004, 02:17 PM   #4
RockmanExe
Member
 
Registered: Aug 2003
Distribution: Mandriva, Slackware
Posts: 265

Rep: Reputation: 30
mmmm from memory... check if you have a line in /etc/rc.d/rc.modules which looks like

/sbin/apmd

if so, comment it

Good luck
 
Old 12-09-2004, 02:53 PM   #5
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Eh, no.

to disable APM you must do so at the kernel level, the above is an (incorrect) way to disable the APMD service which is different.

To correctly disable the service as root in a console type

service apmd stop

then

chkconfig --del apmd

to prevent it from restarting upon subsequent boots.
 
Old 12-12-2004, 09:42 AM   #6
MadMusician_uk
LQ Newbie
 
Registered: Oct 2004
Location: Denver, USA
Distribution: Ubuntu 9.04
Posts: 20

Original Poster
Rep: Reputation: 0
Why is everything so complicated?! - I tried that and got this response:

[root@gertrude gertrude]# service apmd stop
Shutting down APM daemon: [FAILED]

[root@gertrude gertrude]# chkconfig --del apmd
[root@gertrude gertrude]#

I rebooted, in case "chkconfig --del apmd" had done anything useful, but no.


I also looked for anything that said /sbin/apmd, and found nothing...

Am thinking about rigging up some mechanical device to hit the keyboard every 10 mins, as a possible work-around!! (though would prefer not to!)

does anyone know why "service apmd stop" would fail, and how to fix it ? any help is much appreciated!
 
Old 12-12-2004, 11:03 AM   #7
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
It says [FAILED] because the service is NOT running.

This is what you want.

Did you add the "noapm" entry as indicated?
 
Old 12-12-2004, 04:09 PM   #8
MadMusician_uk
LQ Newbie
 
Registered: Oct 2004
Location: Denver, USA
Distribution: Ubuntu 9.04
Posts: 20

Original Poster
Rep: Reputation: 0
yes, I put the "noapm" entry in...

I have something called kapmd running, but if I try "service kapmd stop" it tells me "cannot find kapmd service". Should I use "nokapmd" in the lilo.conf?
 
Old 12-12-2004, 04:18 PM   #9
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
No.

Lilo entries are only for kernel parameters.

kapmd is not a kernel item nor is it a "service" per se.

It's an extension to KDE so it operates at a much more removed level.

The

service apmd stop

only applies to those items which are brought up during the bootup process and not by the gui or the DM.

I suspect that what you termed apm isn't.

From everything you've posted, you don't even have it running.

It's more likely that you have DPMS turned on which is totally different.

That is it attempts to blank the display and blank it it does, but never turns it on again in your case.

Start up your system and go into KDE.

Make sure that the screensaver is NOT enabled.

In the KDE control panel also make sure that no other powersavings functions are turned on for the SCREEN.


Then reboot and open a console.

In the console type

xset -dpms

xset s off

And see if you still get the problem.
 
Old 12-13-2004, 02:50 PM   #10
MadMusician_uk
LQ Newbie
 
Registered: Oct 2004
Location: Denver, USA
Distribution: Ubuntu 9.04
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for the help so far, but I 'm afraid it hasn't worked...

maybe I should explain my setup in more detail...

The machine I'm having this problem with is sitting in a cupboard, with no monitor attached. I'm configuring it remotely through ssh - when it boots, it doesn't go to a GUI, it just gets as far as a log-in screen (admittedly, a graphical one). It doesn't have KDE installed - the only GUI on there is IceWM. If I run top, it lists these things beginning with k:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kapmd
4 root 5 -10 0 0 0 S 0.0 0.0 0:00.02 kblockd/0
236 root 15 0 0 0 0 S 0.0 0.0 0:00.06 khubd
989 root 16 0 2580 1540 1416 S 0.0 1.6 0:00.62 klogd
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
8 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0


ls /proc gives me this:

1/ 1351/ 1586/ 1784/ 5/ 980/ cpufreq execdomains ioports mdstat partitions sys/
11/ 1381/ 1590/ 1785/ 6/ 989/ cpuinfo fb irq/ meminfo pci sysrq-trigger
110/ 1387/ 1763/ 2/ 7/ apm crypto filesystems kallsyms misc self@ sysvipc/
1219/ 1479/ 1780/ 236/ 8/ buddyinfo devices fs/ kcore modules slabinfo tty/
1295/ 1535/ 1781/ 2369/ 9/ bus/ diskstats ide/ kmsg mounts@ splash uptime
1327/ 1540/ 1782/ 3/ 930/ cmdline dma interrupts loadavg mtrr stat version
1341/ 1585/ 1783/ 4/ 956/ config.gz driver/ iomem locks net/ swaps vmstat


cat apm :

1.16ac 1.2 0x03 0x01 0xff 0x80 -1% -1 ?


the relevant bit of lilo.conf looks like this :

image=/boot/vmlinuz
label="linux"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=ht splash=silent noapic nolapic noapm"
vga=788
read-only


I also found something called suspend.control in /etc/sysconfig/suspend-scripts/ and these files in /etc/sysconfig/suspend-scripts/suspend.d :

anacron* beep* clock* hddisks* modules* network* pcmcia* services* sound* usb* xfree*


This is more than just a screensaver issue, as it shuts down the USB system and the harddisc when it goes into suspend - the LED's on my USB modem go out, then flash again when I press a key on the keyboard, and I hear the harddisc spin up. The power LED flashes as well when its in suspend mode.


btw, xset -dpms, xset s off didn't work either!

I hope this makes sense!
 
Old 12-13-2004, 07:51 PM   #11
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
The problem is that Mandrake uses both Gnome and KDE for it's configuration stuff.

It's likely that some values are set to their out of box defaults, and since you have neither of these installed you are unable to manipulate these values.

e.g.

the KDE control center has both hibernate and suspend controls to deal with the scripts you listed above.
 
Old 01-05-2005, 03:58 PM   #12
MadMusician_uk
LQ Newbie
 
Registered: Oct 2004
Location: Denver, USA
Distribution: Ubuntu 9.04
Posts: 20

Original Poster
Rep: Reputation: 0
ha!! I've fixed it!

It took a kernel re-compile to turn off apm, but it worked!

uptime is now 1876 - it was going down at about 1020 before! yay!!
 
  


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
disable lid button, apm laurentwahl Linux - Laptop and Netbook 3 05-30-2005 03:23 PM
disable apm standby on lid close laurentwahl Linux - General 0 05-03-2005 03:54 PM
apm vs. acpi ? (modprobe: FATAL: Error inserting apm) OneManArmy Linux - Laptop and Netbook 0 05-12-2004 04:39 PM
How to Disable APM Bios Detection on Boot leeach Mandriva 4 10-01-2003 08:25 AM
Need to Disable APM Bios detection leeach Linux - Newbie 0 09-30-2003 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 02:34 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
Open Source Consulting | Domain Registration