You are not logged in.

#1 2003-08-11 00:03:32

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Power Management

OK, So I dont really know anything about Power Management, as ive never really cared. tongue

But now that ive been keeping my system on all the time, id like some help getting Standby (sleep) mode working.

If I understand it, this either uses APM or ACPI, its a desktop system, a year old. Which would it use? When I was recompiling my kernel, I noticed APM was enabled, but not ACPI.

Anyway, When pressing the Power button in Windows, it puts the computer into Standby mode. How would I do set this up in Arch?

Also, when powering down, my computer doesnt actually turn itself off. I tried "apm=power-off" in Lilo, from another thread, but it didn't work (just didn't turn off). Actually, I may not have set it up right. tongue

I already have: append="hdd=ide-scsi" , in LILO, so im not sure if I add the line after "hdd=ide-scsi", thats what I did though.

Any help would be appreciated. If its not possible to have it standby on pressing the power button, I could set it up using the Xscreensaver Daemon. That seems to have an option for automatic standby.


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#2 2003-08-11 00:07:20

kritoke
Member
From: Texas, USA
Registered: 2003-08-01
Posts: 211
Website

Re: Power Management

Not sure about sleep mode.  But I just throw apm in the /etc/rc.conf MODULES section and it turns off when I tell my computer to power off.

Kritoke


http://counter.li.org/ Registered Linux User #318963 kritoke@jabber.org

Offline

#3 2003-08-11 00:33:58

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: Power Management

That didnt work, and when doing a "modprobe apm", it said the module didn't exist.

By the way, heres my kernel config:

# CONFIG_ACPI is not set
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#4 2003-08-11 00:43:36

kritoke
Member
From: Texas, USA
Registered: 2003-08-01
Posts: 211
Website

Re: Power Management

Ahh, well mine is set as a module and it works perfectly.  Everything else in my config file is the same as yours.  So you probably will have to pass some type of thing to apm.  I ran into a thing on the net that talks about this happening in SuSE, they recommend using this: apm=real-mode-poweroff , but I would assume you would have to enable that in your kernel as well.  It really should work if it was built into the kernel though, it may be some other type of issue.  Although I have had issues with other things when they are built in, rather than modules, and vise versa.

Kritoke


http://counter.li.org/ Registered Linux User #318963 kritoke@jabber.org

Offline

#5 2003-08-11 01:27:43

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Power Management

some general notes about this:

the button you call "power-button" is not always a power-button: some manufactors have "soft-buttons", that are interpreted in the BIOS ... this the BIOS can then make a signal that can be interpreted by a windows-tool/windows-driver-for-power-for-your-machine

the funny thing is, that not all manufactors use the same things ... you have to look in your BIOS if there exist a option for the button (what i know for sure: on some Compaq Presarios, some Dell Inspirions and on some IBM Thinkpads there is a function that says: What should be done if the button is pressed:
a)make signal
b)go standby
c)do hibernate=copy RAM to disk and go sleeping)

-> the apm=real-mode-poweroff is for shutdown-poweroff, and does not work with every bios

-> going to standby in linux (with apmd running) is easy: run simply

apm -s

-> you can also play with apmsleep:

[root@Asteraceae damir]# apmsleep
apmsleep: missing argument.
Usage:

apmsleep [+]hh:mm

Example:
   apmsleep +1:15    will suspend for one hour and 15 minutes
   apmsleep 8:00     will suspend until 8:00 am

Bugs: Daylight saving jumps are not taken into account.
      Modem ring detection may trigger early wake-up.
      Does not work with Suspend to Disk.
Bug reports to author Peter Englmaier <ppe@mpe.mpg.de>.

... if your poweroff/standby-button is a softkey-button ... and you find out (with Google or somewhere else on the internet about your machine) the keycode ... set it to start "apm -s" ... voilà you have the same function

----------------------------------------------
here the possibilities:

1) look in the bios about setting "Standby" instead of "Signal to OS"

2) internet: what is the speciality about my machine ... "gg: myMachine myMachineModel standby" -> maybe a firmware-upgrade?

3) "apm -s" or apmsleep


The impossible missions are the only ones which succeed.

Offline

#6 2003-08-11 01:53:42

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: Power Management

Thanks for the help.

When running apmd or apm or apmsleep, I get:

APM is not supported by the Kernel.


Which is wierd, because as you can see, APM was built into the kernel.

I suppose it wants some of those other APM options enabled.

I will try recompiling my kernel with them all set to "y", then see if your tips work.


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#7 2003-08-11 01:57:47

Gyroplast
Member
From: Germany
Registered: 2002-09-03
Posts: 166
Website

Re: Power Management

If in doubt, tuck your own kernel package safely away and install the stock kernel if possible. The apm=power-off kernel parameter definitely works with that one, unless your BIOS somehow bitches around, in which case you'd need to fiddle with your BIOS, not Arch. smile


"That's the problem with good advice. Nobody wants to hear it."
-- Dogbert

Offline

#8 2003-08-11 03:08:16

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: Power Management

OK, I first compiled the kernel with APM and ACPI (and the options) into the kernel, but I got the same problems. Then I compiled them as modules, and I get this when modprobing apm:

/lib/modules/2.4.21/kernel/arch/i386/kernel/apm.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.21/kernel/arch/i386/kernel/apm.o: insmod /lib/modules/2.4.21/kernel/arch/i386/kernel/apm.o failed
/lib/modules/2.4.21/kernel/arch/i386/kernel/apm.o: insmod apm failed


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#9 2003-08-11 04:22:35

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Power Management

Gyroplast wrote:

... unless your BIOS somehow bitches around, in which case you'd need to fiddle with your BIOS, not Arch. smile

it's not at all Arch that is the problem, that's sure --- i'm using APM on different machines on Arch without problems (well, one does not want to go sleeping because of a USB-problem, but that is surely not the case with your machine :-) )

what kernel do you use? (version, patches)
-> try to use a 2.4.21 from kernel.org --- without patches

-> Gyroplast is right saying to use the original 2.4.21 from Arch 0.5 ... and this is the easiest way

it is not really good to work with APM and ACPI both compiled in the kernel ... they are not compatible with each other!!!! use only one compiled in, or both as modules


The impossible missions are the only ones which succeed.

Offline

#10 2003-08-11 04:36:13

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: Power Management

I was using the relatively stock kernel origionally. The only thing I added was the line for BootSplash.

And even before that, it wouldnt power down.

Im thinking conspiracy.  :shock:


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#11 2003-08-11 06:16:00

MasterC
Member
Registered: 2003-08-10
Posts: 11

Re: Power Management

dp wrote:

some general notes about this:

the button you call "power-button" is not always a power-button: some manufactors have "soft-buttons", that are interpreted in the BIOS ... this the BIOS can then make a signal that can be interpreted by a windows-tool/windows-driver-for-power-for-your-machine

the funny thing is, that not all manufactors use the same things ... you have to look in your BIOS if there exist a option for the button (what i know for sure: on some Compaq Presarios, some Dell Inspirions and on some IBM Thinkpads there is a function that says: What should be done if the button is pressed:
a)make signal
b)go standby
c)do hibernate=copy RAM to disk and go sleeping)

-> the apm=real-mode-poweroff is for shutdown-poweroff, and does not work with every bios

-> going to standby in linux (with apmd running) is easy: run simply

apm -s

-> you can also play with apmsleep:

[root@Asteraceae damir]# apmsleep
apmsleep: missing argument.
Usage:

apmsleep [+]hh:mm

Example:
   apmsleep +1:15    will suspend for one hour and 15 minutes
   apmsleep 8:00     will suspend until 8:00 am

Bugs: Daylight saving jumps are not taken into account.
      Modem ring detection may trigger early wake-up.
      Does not work with Suspend to Disk.
Bug reports to author Peter Englmaier <ppe@mpe.mpg.de>.

... if your poweroff/standby-button is a softkey-button ... and you find out (with Google or somewhere else on the internet about your machine) the keycode ... set it to start "apm -s" ... voilà you have the same function

----------------------------------------------
here the possibilities:

1) look in the bios about setting "Standby" instead of "Signal to OS"

2) internet: what is the speciality about my machine ... "gg: myMachine myMachineModel standby" -> maybe a firmware-upgrade?

3) "apm -s" or apmsleep

Just wanted to say that this is one of the best 'understandable' replies I've ever seen for a response on apm. 

Thank you!

Offline

#12 2003-08-11 07:25:48

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: Power Management

Hi,

just a thought:

# CONFIG_ACPI is not set
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

the "is not set" thing, means (at least is what i think) you didnt compiled the kernel with that niether with a module, for what i know, to turn your PC off with an ATX and a ACPI motherboard you need to have the "CONFIG_ACPI"  and the "CONFIG_APM_REAL_MODE_POWER_OFF" compiled in the kernel or as a module, also i set the CPU_IDLE (powersaving) and the DISPLAY_BLANK, they are both usufull, i think you should read the ´help´ to see  if you need the others.

hope it helps.


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#13 2003-08-11 07:34:14

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: Power Management

Hi,

just a thought:

# CONFIG_ACPI is not set
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

the "is not set" thing, means (at least is what i think) you didnt compiled the kernel with that niether with a module, for what i know, to turn your PC off with an ATX and a ACPI motherboard you need to have the "CONFIG_ACPI"  and the "CONFIG_APM_REAL_MODE_POWER_OFF" compiled in the kernel or as a module, also i set the CPU_IDLE (powersaving) and the DISPLAY_BLANK, they are both usufull, i think you should read the ´help´ to see  if you need the others.

hope it helps.


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#14 2003-08-11 08:49:28

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Power Management

sud_crow wrote:

Hi,

just a thought:

# CONFIG_ACPI is not set
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

the "is not set" thing, means (at least is what i think) you didnt compiled the kernel with that niether with a module,

right! if you look at .config by hand ... better use

make menuconfig
#or
make xconfig

to configure your kernel, because then you dont have to wonder for funny "is not set" behind out-commented lines

sud_crow wrote:

for what i know, to turn your PC off with an ATX and a ACPI motherboard you need to have the "CONFIG_ACPI" ...

 

Kernel-docs: ACPI wrote:

CONFIG_ACPI:

ACPI/OSPM support for Linux is currently under development. As such,
this support is preliminary and EXPERIMENTAL.  Configuring ACPI
support enables kernel interfaces that allow higher level software
(OSPM) to manipulate ACPI defined hardware and software interfaces,
including the evaluation of ACPI control methods.  If unsure, choose
N here.  Note, this option will enlarge your kernel by about 120K.

This support requires an ACPI compliant platform (hardware/firmware).
If both ACPI and Advanced Power Management (APM) support are
configured, whichever is loaded first shall be used.

-> it is generally a bad idea to include ACPI and APM both in the kernel, because you then cannot decide whichone is used and which not ...

sud_crow wrote:

... and the "CONFIG_APM_REAL_MODE_POWER_OFF" compiled in the kernel or as a module, also i set the CPU_IDLE (powersaving) and the DISPLAY_BLANK, they are both usufull, i think you should read the ´help´ to see  if you need the others.

==> here the docs for these "additionals" for APM :

Kernel-docs wrote:

CONFIG_APM_REAL_MODE_POWER_OFF:

Use real mode APM BIOS calls to switch off the computer. This is
a work-around for a number of buggy BIOSes. Switch this option on if
your computer crashes instead of powering off properly.

Kernel-docs wrote:

CONFIG_APM_CPU_IDLE:

Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
On some machines, this can activate improved power savings, such as
a slowed CPU clock rate, when the machine is idle. These idle calls
are made after the idle loop has run for some length of time (e.g.,
333 mS). On some machines, this will cause a hang at boot time or
whenever the CPU becomes idle. (On machines with more than one CPU,
this option does nothing.)

Kernel-docs wrote:

CONFIG_APM_DISPLAY_BLANK:

Enable console blanking using the APM. Some laptops can use this to
turn off the LCD backlight when the screen blanker of the Linux
virtual console blanks the screen. Note that this is only used by
the virtual console screen blanker, and won't turn off the backlight
when using the X Window system. This also doesn't have anything to
do with your VESA-compliant power-saving monitor. Further, this
option doesn't work for all laptops -- it might not turn off your
backlight at all, or it might print a lot of errors to the console,
especially if you are using gpm.

actually APM should work without --- except you are a special case with a funny bios or something else funny ... then you should consider activating them, but gernerally you dont need them


:!:


The impossible missions are the only ones which succeed.

Offline

#15 2003-08-11 18:01:30

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: Power Management

OK, I recompiled with these options:

#CONFIG ACPI is nto set
CONFIG_APM=y
#CONFIG_APM_IGNORE_USER_SUSPEND is not set
#CONFIG_APM_DO_ENABLE is not set
CONFIG_APM_CPU_IDLE=y
CONFIG_APM_DISPLAY_BLANK=y
CONFIG_APM_RTC_IS_GMT=y
#CONFIG_APM_ALLOW_INTS is not set
CONFIG_APM_REAL_MODE_POWER_OFF=y

and it still says:

APM support is not in the kernel.


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#16 2003-08-12 00:35:07

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: Power Management

hi

well, dp is right on the "additionals", anyway i like experimental things and my mother says ACPI Motherboard on startup so...

this is what i was thinking...

1) you are not replacing the kernel "bzImage" in the /boot with the proper name, or at all.

2) you should try ACPI without APM, and then if that doesnt work either, try them both on.

good luck
ps. im not on my linux box (for a week or more) so i cant help that way and im using my memory.


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#17 2003-08-12 02:04:36

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: Power Management

Ive been using ABS, so it has been replacing the kernel.


I have tried every combination of APM, ACPI, and its options as modules and buil t in.

Every time, it just says APM is not in the kernel.


Since ive been rebuilding my kernel, ive been cutting out stuff I wont ever need (PCMCIA, ISDN), anybody got tips on big things to cut out? My kernel is at about 1.6MB now, big.  :oops:


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#18 2003-08-12 07:05:34

Mork II
Member
From: Visby, Sweden
Registered: 2003-05-14
Posts: 87

Re: Power Management

1.6 Mb! Try building stuff as modules if possible, that should decrease size.

Offline

Board footer

Powered by FluxBB