# Dell Inspiron 640m/e1405: suspend to ram?? [SOLVED] :)

## Fran

All right, I have everything working great in my new Dell Inspiron 640m -same model as e1405-, except... suspend to ram. To be precise, resume from suspend. Suspend seems to work with echo -n mem > /sys/power/state, but when I push the power button to resume, the computer hangs. The hard disk and the fans start spinning, but the rest (keyboard, screen, net) doesn't work.

I have tried unloading all modules and disabling the ondemand governor. I always try outside X. The last lines of the logs are:

/var/log/kern.log:

```
Jul 29 16:14:52 localhost kernel: Freezing cpus ...

Jul 29 16:14:52 localhost kernel: CPU 1 is now offline

Jul 29 16:14:52 localhost kernel: SMP alternatives: switching to UP code

Jul 29 16:14:52 localhost kernel: CPU1 is down

```

And that's all, after that are the messages of the reboot.

/var/log/hibernate.log (yeah, I've also tried with hibernate-script)

```
Starting suspend at Sat Jul 29 16:14:50 CEST 2006

hibernate-ram: [01] Executing CheckLastResume ...

hibernate-ram: [01] Executing CheckRunlevel ...

hibernate-ram: [01] Executing LockFileGet ...

hibernate-ram: [01] Executing NewKernelFileCheck ...

hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...

hibernate-ram: [11] Executing XHacksSuspendHook1 ...

hibernate-ram: [89] Executing SaveKernelModprobe ...

Saved /proc/sys/kernel/modprobe is /sbin/modprobe

hibernate-ram: [91] Executing ModulesUnloadBlacklist ...

Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

Module version for ipw2100 is

Module version for ipw2200 is

Module version for ndiswrapper is

hibernate-ram: [95] Executing XHacksSuspendHook2 ...

xhacks: changing console from 1 to 15

hibernate-ram: [97] Executing VbetoolSaveState ...

^[[H^[[Jhibernate-ram: [98] Executing CheckRunlevel ...

hibernate-ram: [98] Executing FullSpeedCPUSuspend ...

Switched to performance, with min freq at 1600000

Switched to performance, with min freq at 1600000

hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ...

hibernate-ram: Activating sysfs power state mem ...

```

I have a core duo and have enabled CPU hotplugging in the kernel. I've tried with 2.6.17.6, 2.6.17.7 and 2.6.18-rc2.

Anyone else with this laptop? Or with a similar problem? I'm not interested in soft suspend to disk.

Thx  :Smile: Last edited by Fran on Wed Aug 02, 2006 12:55 pm; edited 1 time in total

----------

## optics

I have a 9300 Inspiron and having the same problem, stuck as "activating sysfs power state mem" in hibernate.log...  when resuming.

 I did get suspend to disk working great though.

----------

## Fran

I don't know what I've done, but it works now  :Smile: . Probably the kernel update (2.6.17.7 -> 2.6.18-rc3). I just need vbetool to restore the video card and I have to make sure that the ipw3945 module is unloaded. That's all. It doesn't even have to be outside X. I'm pretty sure that I had tested this before, but... oh well, it works now  :Very Happy: . vbetool gives me strange messages:

```
Allocated buffer at 0x20000 (base is 0x0)

ES: 0x2000 EBX: 0x0000

Save video state failed

Calling INT 0x15 (F000:F859)

 EAX is 5F14

Leaving interrupt call.

Calling INT 0x15 (F000:F859)

 EAX is 10005F00

Leaving interrupt call.

Calling INT 0x10 (C000:0014)

 EAX is 3

Leaving interrupt call.

Restore video state failed

```

but it works.

----------

## diogot

Can you post your ram.conf file?

 *Fran wrote:*   

> I don't know what I've done, but it works now :). Probably the kernel update (2.6.17.7 -> 2.6.18-rc3). I just need vbetool to restore the video card and I have to make sure that the ipw3945 module is unloaded. That's all. It doesn't even have to be outside X. I'm pretty sure that I had tested this before, but... oh well, it works now :D. vbetool gives me strange messages:
> 
> ```
> Allocated buffer at 0x20000 (base is 0x0)
> 
> ...

 

----------

## Fran

I can't, because I don't use hibernate script anymore. I prefer having a small script that does just the necessary:

```
#!/bin/sh

# Unload ipw3945

/etc/init.d/net.eth1 stop

/etc/init.d/ipw3945d stop

modprobe -r ipw3945

# Save screen state and sync

tmp_file=$(mktemp /var/tmp/video_state.XXXXXX)

trap 'rm -f $tmp_file' 0 1 15

chvt 1

vbetool vbestate save > $tmp_file

sync

# Suspend

echo -n mem > /sys/power/state

# Restore screen state

vbetool post

vbetool vbestate restore < $tmp_file

rm -f $tmp_file

# Reload net

modprobe ipw3945

/etc/init.d/ipw3945d start

# Make sure the ondemand governors are active

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

```

It works great in my laptop, even from inside X (it doesn't return atomatically to vt7, you can add a "chvt 7" line if you want)

----------

## diogot

 *Fran wrote:*   

> I can't, because I don't use hibernate script anymore. I prefer having a small script that does just the necessary.
> 
> It works great in my laptop, even from inside X (it doesn't return atomatically to vt7, you can add a "chvt 7" line if you want)

 

Do you use framebuffer?

----------

## Fran

 *diogot wrote:*   

>  *Fran wrote:*   I can't, because I don't use hibernate script anymore. I prefer having a small script that does just the necessary.
> 
> It works great in my laptop, even from inside X (it doesn't return atomatically to vt7, you can add a "chvt 7" line if you want) 
> 
> Do you use framebuffer?

 

Yep, 1024x768. Sometimes some garbage appears at the top when I resume from suspend, but changing the virtual terminal just gets rid of it.

----------

