# sleep mode with xen

## meyerm

Hi,

I've installed xen on my laptop to get some server domU to work. But apart from that I would like to continue to use my laptop as laptop  :Wink: . This includes getting it to sleep. Is it somehow possible to say the hypervisor "go to bed"? Using the normal kernelinterface within a dom0 doesn't work.

```
yavin ~ # echo -n mem > /sys/power/state

-su: echo: write error: Operation not permitted

yavin ~ # uname -r

2.6.16.13-xen
```

----------

## thesnowman

Did you compile ACPI support into your kernel?

What is the output of:

```
cat /sys/power/state
```

----------

## meyerm

Hi,

sure. It's the same kernel config as for my native kernel. Only xen got added.

```
meyerm@yavin ~ $ cat /sys/power/state

standby mem

meyerm@yavin ~ $ zgrep -i acpi /proc/config.gz

# Power management options (ACPI, APM)

# ACPI (Advanced Configuration and Power Interface) Support

CONFIG_ACPI=y
```

I understand why my dom0 isn't able to change the cpu frequency and go to sleep. But is the hypervisor itself capable of doing this? If yes, how can I tell him? If not, will it be possible within - let's be precise  :Wink:  - the xen 3.x lifetime?

Thank you for reading and answering  :Smile: 

M

----------

## thesnowman

Sorry, I don't know the answers to your questions.  They are probably better directed to one of the Xen mailing lists:

http://lists.xensource.com/

----------

## thesnowman

Just found this on the Xen FAQ:

 *Quote:*   

> Does Xen run on laptops?
> 
> Xen will typically run on laptops, but there's currently no support for APM or ACPI, hence you'll experience reduced battery life and no suspend/resume. We hope to add ACPI support in the future, exploiting Linux's existing support.

 

http://wiki.xensource.com/xenwiki/XenFaq#head-cb7861c9865fc8fbae3bb472f04c5d0819fa8273

----------

## meyerm

Thank you for looking it up. I'm currently lurking on the xen-lists to learn a little bit.  :Smile: 

It's a pity that xen doesn't support it yet. But perhaps I'm more motivated to keep working on one topic when I have to reboot my computer for it  :Wink: 

greetings,

M

----------

