# Resuming from suspend to RAM doesn't work [Nearly Solved]

## Onion Avenger

My laptop (Inspiron e1505) has been having troubles resuming from a suspend-to-RAM.  Well, actually the troubles are that the machine is totally frozen.  The display is blank and the computer is unresponsive to keyboard input (or any input for that matter.  I haven't tried ssh-ing in into it yet, maybe I should...).  It suspends just fine, it just doesn't resume.

I'm running beyond-sources-3 on 2.6.17 (which has the suspend2 patches).  Suspend to disk, incidentally, works flawlessly.  I'm using sys-power/hibernate-script for both suspend to disk and to ram.

I've searched the forums and the web and found that others had similar problems but nothing seems to work for me.  One suggestion that seems to help many with this trouble is vbetool.  When I enable that in /etc/hibernate/ram.conf, and run hibernate-ram, vbetool errors out and makes my screen very interesting, it has patches of green and is completely unreadable, though at least the computer is still responsive to keyboard input.  I also tried radeontool, that didn't work.

Some specs that may help:

Inspiron e1505

Intel Core Duo

ATI Mobility Radeon x1300 (using fglrx normally, but even if I'm not running X and fglrx is unloaded, the same thing happens, so it's something deeper than that)

I'll post my kernel's .config if requested and anything else as well.

Thanks in advance,

onion_avenger

[EDIT]

Using the 2.6.18 kernel and having X running seems to fix things for me so far.  Refer to my post further down.

[/EDIT]Last edited by Onion Avenger on Mon Oct 02, 2006 12:21 am; edited 1 time in total

----------

## benrich

Unfortunately, I can't offer you a solution; I'm having a similar problem myself.  I my case, when I try to resume the machine powers off completely.  I have no idea what to do, but I believe it is possible to achieve suspend-to-ram with this machine, an ASUS z33ae notebook.  I would love to find a solution.

----------

## benrich

OK, I just found the solution to my problem in another thread.  I added the line

```

RestartServices acpid

```

to the file /etc/hibernate/ram.conf.  I don't know if that will help in your case.

----------

## Omega21

Mine does that too.. (Satellite A70)

----------

## badgers

sorry, I am trying to get suspend2 setup

what command do you issue to suspend to ram (S3 state)?

----------

## Zarhan

For me, downgrading to 2.6.16 kernel helped - with several different computers.

Haven't tested kernel 2.6.18 yet.

----------

## Zarhan

Mmm, 2.6.18 does not work for me either. I wonder what's broken in there.

----------

## Cottonee

Suspend2 for 2.6.18 requires hibernate-script version 1.93 to work. You better check the script and make sure you get the right version. This might help.   :Wink: 

----------

## Zarhan

Not interested in suspend to disk - just suspend to RAM (S3).

----------

## Cottonee

I think you can use hibernate-script for both suspend to disk and ram. Anyways, I think it might be a bug on this suspend-core itself because, there are a few people already have similar problem. Why don't you try it out with kernel 2.6.16 & 2.6.18 and hibernate-script. Just remember to use script v.19.3 for kernel 2.6.18 and maybe try script v.1.12 with kernel 2.6.16.

----------

## Zarhan

I filed a bug http://bugzilla.kernel.org/show_bug.cgi?id=7183 - In 2.6.17 it seemed to be a wider issue (since I couldn't get *any* of my laptops resume) but in 2.6.18 I have problems only with one of them. Seems to be a driver issue now.

----------

## Onion Avenger

Hooray!  Today I tried the 2.6.18 kernel (vanilla-sources) and am pleased to note that progress has been made with this aggravating issue!  I checked out the changelog for the new kernel version and there have been not a few updates that related to suspend/resume issues, for quite a variety of drivers.

At any rate, this is what happens:

```
echo -n "mem" > /sys/power/state
```

puts the laptop into S3 sleep rather quickly.  And it does a better job at it than Ubuntu Dapper does, in that only the Power LED on my laptop is on (well, actually it's pulsating) and all other LEDS are off.  In Ubuntu, my Caps Lock/Num Lock/Scroll Lock keys light up as well as my CD drive LED in addition to the throbbing power LED.

So thus far into the suspension process things are looking mighty fine.  I then try resuming from suspend (I've tried both opening the lid and pressing the power button, same results) and, as before 2.6.18, I am greeted with a blank screen.  However, this time around if I hit keys like Num Lock, my laptop is still responsive.  I found I can even blindly type commands and things happen (about the only useful command at this point is "reboot").  Under 2.6.17 my laptop would totally lock up and not respond to ANYTHING, so this is excellent progress.

I'm now going to try mucking around with vbetool and possibly radeontool and see if I can get things working from here.

Thanks guys!

[Edit]

I said the only useful command was "reset" when I meant "reboot".  Resetting the screen like that doesn't affect anything for me.

[/Edit]Last edited by Onion Avenger on Mon Oct 02, 2006 12:24 am; edited 1 time in total

----------

## Onion Avenger

Alright, gentlemen, here are some results:

Using 2.6.18-ck1 kernel, I have suspend-to-ram (S3 sleep) working thus far!  One test is remaining, but I figured I'd post what I have for those following this thread.

First off, vbetool doesn't play nice with my Radeon.  Trying to save (or restore) the vga state always results in vbetool segfault-ing.  I did get 

```
vbetool post
```

 to work, but it made my framebuffer console quite wierd.  radeontool doesn't seem to do anything to my laptop.

For the following tests I was running 2.6.18-ck1, and suspended by issuing 

```
echo -n "mem" > /sys/power/state
```

First test: From vesafb console (X not loaded)

Suspended fine, it would resume but the screen would be blank.  The laptop was responsive though.  vbetool post turned the display on but the screen was all stretched out and stuff.  Workable but not desirable.

Second test: No framebuffer

Suspended fine, resumed fine, same results as using a framebuffer console (IIRC, that is).

Third test:  No framebuffer, issued the suspend command in an xterm within X (using the standard vesa driver).

Suspends well, resumes! and X comes up!  The display is on!  Hooray!

Fourth test: Framebuffer, suspended within X

Suspend and resumes beautifully (read: as desired).

Fifth test: Framebuffer, X was running on VT7 (startx issued on VT1), switched to VT2 and suspend from there.

Suspends and resumes as desired!  Wow!

Sixth test: Framebuffer, X running, ipw3945 module loaded and connected to a wireless network

Suspends and resumes without a hitch!

Conclusion:

It seems the only was I can get the display to turn on upon resuming from suspend is for X to be running.  Whether I issue the suspend command from within X or not makes no difference.  ipw3945 module (which I thought may be problematic) seems to have no negative effect.

When I have time, I have one final test to make (and I'll post the results):  seeing if the fglrx (binary ATI driver) module interferes with S3 sleep.

Hope this information helps others out there!

--Onion Avenger

----------

## GNUtoo

http://kerneltrap.org/node/7176

gentoo kernel developers should help kernel developers to solve this issue

----------

## menschmeier

Hi,

I recognized the following behaviour:

calling hibernate-ram from konsole: suspend-to-ram is working

calling suspend via klaptop, the system doesn't come back, the X-server seems to be not been restored correctly ...

Maybe you have the same problem.

menschmeier

----------

## Onion Avenger

 *menschmeier wrote:*   

> Hi,
> 
> I recognized the following behaviour:
> 
> calling hibernate-ram from konsole: suspend-to-ram is working
> ...

 

I don't even have KDE installed yet and my test results are such as they are.  I do know that the hibernate-ram script does do more than simply passing "mem" to /sys/power/state, you can configure it to let vbetool do its stuff, unload/reload various kernel modules, etc.  I don't know how klaptop suspends the system.  Perhaps there are settings in klaptop to fine-tune your suspend behavior?

All I know is that at least the basics are working for me now without even needing the hibernate script.

----------

