# acpi standby

## kronon

I have a laptop with apm and acpi support. But apm is shitty. Battery monitor doesn't work and it's buggy. So I decided to use acpi. Every thing works except sleep etc. I can only make is shutdown.

So would like to know if it's posible to put my computer into sleep/standy or something like that. I know I have to put a value into /proc/(something)

But the only value that works is the one that will make my laptop power off (not shut down).

So is it posible for me to do a little bit more with acpi then watch my battery power?

I also have another problem that is probably somewhat more hardware related.

Since a few days ago my battery suddenly decreased in power. My hd crashed so I had to re-install gentoo. Is it probably hardware related or software related? If it's hardware related, than is there an option appart from buying a new battery for my laptop?

Many thanks in advanced

----------

## masseya

What model is your laptop?  Some of the early ACPI implementations were (and are) buggy and had (have) spotty support in Linux.

The battery issue isn't uncommon for a battery that has been used often.  Even nice Lithium-Ion batteries will change slightly as they are used.  I would cetainly watch it closer, but I'm not sure I would buy a replacement yet.  If it was as drastic a change as you describe there's a very good chance that it was a software issue.  However, it would help to know what model your laptop and it's chipset are.

----------

## kronon

I have a (probably won't say anything to you) targa visionary xp.

my specs are

AMD mobile athlon xp

512 ddr-ram pc2700

ati mobility radeon 9000

li-ion battery

VIA KT 333 (NB VT8367 + SB VT8235 chipset

hope this enough + some extra:).

----------

## masseya

 *kronon wrote:*   

> VIA KT 333 (NB VT8367 + SB VT8235 chipset

 I don't know anything about that particular chipset, but it is newer than the ones that I have found to be on the fuzzy side of things with respect to ACPI.  Thus, I am inclined to think that it's possible to get it fully working.

----------

## kronon

Any ideas how? Or where to ask?

----------

## Kesereti

APCI suspend modes (suspend to RAM/suspend to disk) are currently somewhat shaky -- some people get them to work, but from what I can divine on the ACPI mailing list, here are some general rules(to which there are always exceptions, of course, but this is the most common experience I've seen):

-Suspend to RAM only works reliably if you have no USB support compiled in, do not have USB modules loaded at all, do not use X, and no framebuffer (plain console only)

-Some people have written scripts for suspend to RAM that get around some of these issues, but basically what they amount to is unloading every module, killing X, dropping to a console, suspending, then trying to re-load every module and restart X after coming out of suspend, and even that doesn't work all the time.

-For reasons that are beyond the ken of mere mortals, suspend to RAM does in fact work flawlessly on random machines, with no rhyme or reason to them.  For me, suspend to RAM does put my laptop into sleep mode, but when I attempt to bring it out, it powers up everything but the display and then hardlocks (must turn the machine off then back on to get back in)

-Suspend to disk works, but you have to make a change to your lilo.conf/grub.conf to indicate that your swap partition is where the suspend data is, and then you have to re-create your swap partition every time you come out of suspend because it trashes it; I suppose it would be possible to create a partition just for suspend data, and just use that, but you'd probably have to re-mke2fs it after each suspend as well.

The big reason that suspend to RAM is so quirky at the moment isn't actually an ACPI issue, it's a driver issue; many device drivers were not written to deal with suspend gracefully, and so simply cause a kernel panic when the system attempts to bring those devices out of suspend =\

----------

## kronon

all I get to see is 

"

stoping tasks =============================================================

stoping tasks failed (1 task remaining)

Restarting tasks ... <6> Strainge, mtdblock not stopped 

"

Is this normal?

----------

## Tronic

 *kronon wrote:*   

> all I get to see is 
> 
> "
> 
> stoping tasks =============================================================
> ...

 

I get that too, with 2.6.1. With earlier versions it just wouldn't ever resume. Now it won't even suspend, to any suspend mode. Just gives those messages...

----------

## kronon

So it's a 2.6 thing? I got suspend to ram working once (with this laptop) it whas with 2.4 but that's a long time ago...

----------

## TheMoog

Suspend to disk (swsusp2) is pretty much sorted on 2.4.  2.6 works fine for some people but there are still some problems as the development was done on 2.4 and it is now being ported to 2.6.

Look at swsusp.sf.net for more details.

The in kernel suspend has many problems and will probably be replaced by this version.

----------

## kuemmel

Hi Kronon,

I think I own quite the same laptop as yours. I never tried to put my box into standby-mode, but cpufreq works great with this box. Have you tried it ?  It extended my battery working time a lot. The laptop even gets quiter.

drop me a line if you are interested - I could post you my .config

greetings Joachim

----------

## kronon

That would be nice. I could use a conf for cpufreqd

----------

## kuemmel

here you go (2.6.1-rc1-mm1)

you have to emerge "cpudyn", and load the modules 

cpufreq-userspace

powernow-k7 (for a mobile athlon-xp)

#

# ACPI (Advanced Configuration and Power Interface) Support

#

CONFIG_ACPI=y

CONFIG_ACPI_BOOT=y

CONFIG_ACPI_INTERPRETER=y

# CONFIG_ACPI_SLEEP is not set

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_TOSHIBA is not set

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_BUS=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_PCI=y

CONFIG_ACPI_SYSTEM=y

# CONFIG_ACPI_RELAXED_AML is not set

CONFIG_X86_PM_TIMER=y

#

# CPU Frequency scaling

#

CONFIG_CPU_FREQ=y

# CONFIG_CPU_FREQ_PROC_INTF is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=m

# CONFIG_CPU_FREQ_24_API is not set

CONFIG_CPU_FREQ_TABLE=y

#

# CPUFreq processor drivers

#

# CONFIG_X86_ACPI_CPUFREQ is not set

# CONFIG_X86_POWERNOW_K6 is not set

CONFIG_X86_POWERNOW_K7=m

# CONFIG_X86_POWERNOW_K8 is not set

# CONFIG_X86_GX_SUSPMOD is not set

# CONFIG_X86_SPEEDSTEP_CENTRINO is not set

# CONFIG_X86_SPEEDSTEP_ICH is not set

# CONFIG_X86_SPEEDSTEP_SMI is not set

# CONFIG_X86_P4_CLOCKMOD is not set

# CONFIG_X86_LONGRUN is not set

# CONFIG_X86_LONGHAUL is not set

----------

## kronon

any idea how to enable the control?

I have modprobe the module (cpufreq-userspace)

but I get this error:

bash-2.05b# cpudynd   

cpudynd version 0.6.1 Copyright: Ricardo Galli <gallir@uib.es>

cpudynd: CPU frequency control disabled

Error: Nothing to do, exiting

help would be very welcome:)

----------

## kuemmel

hm, no idea, sorry. I checked Ricardo Galli's FAQ, but didn't find your problem. Doesn't look like an error - just like a "wrong" setting.

Have you checked dmesg output, and lsmod ?

greets Joachim

----------

## kronon

lsmod = okey

dmesg  won't work because it's bloated with semaphore error's.

Well I'll try some more:)

----------

## tuxlover

I was successful with swsusp2 and made a little how-to:

howto: get swsusp2 (hibernate, suspend to disk) working.

Have fun!

----------

