I've been trying for weeks to get a proper suspend to ram on my Dell E1705, and for the most part I now have a working solution. The only issue I'm coming across is vbetool. It will never properly save video state on suspend and so cannot properly restore it on resume. I'm using hibernate-ram command to suspend with suspend2 on a 64-bit system. I was wondering if anyone else has had sucess in getting this to work, if they use vbetool or not, etc.

Any info would be appreciated.

Last edited by Buddman on Thu Feb 15, 2007 2:51 am; edited 2 times in total

Ok, I've been able to get suspend2 working with VBEtool and can suspend to ram (or swap rather), but if I leave my laptop in suspend for more than 30 minutes, upon resuming X will crash saying it cannot load on any of the screens it finds (it finds screens which it can load on, but says none are manageable). I can suspend/resume all day if the laptop is suspended less than say 15 min, but sometime around the 15-30min mark this will happen. Anyone run into this?

x86. I had trouble getting video to return at first. I'm beginning to think that it wasn't my script or any settings that helped, but possibly the kernel modules. I think I'm using the bleeding edge video modules. YMMV.

Also, make sure that the /proc/ path to the video state that I posted is the same on your system. I'm not sure how that works..

Could you be more specific? Did you use your own compiled video module or do you mean the lastest mesa driver?

EDIT: I still don't see why hibernate will allow me to suspend/resume without issue unless more than 15 min pass (hibernate still works of course, just no screen on resume). It almost seems like something else, maybe xorg's DPMS, is causing the issue. However I'm not sure how to disable DPMS in xorg - trying Option "DPMS" false doesn't seem to do this when adding it in xorg.conf. Will continue to research...

# Add code here to handle when the system is plugged in
# (maybe change cpu scaling to performance mode)
#*1)
# ;;

*) log_unhandled $* ;;
esac
;;

*) log_unhandled $* ;;
esac

I have the acpi lid event calling the following script so I can close my lid and reopen without losing video on opening:

Code:

#!/bin/sh
if grep -q open /proc/acpi/button/lid/*/state
then vbetool dpms on
else vbetool dpms off
fi

And finally, I have my power event executing hibernate. Pushing the power button, or opening the lid (if I close it after suspending) will resume my laptop, and if under 15 min, will do so successfully. My hibernate is using suspend2 - here is my suspend2.conf:

Code:

# Example suspend2.conf file.
#
# See hibernate.conf(5) for help on the configuration items.
#
# NOTE: Suspend2 is an improved version of suspend-to-disk which currently
# requires patching your kernel. For more information, see www.suspend2.net
#
# If you do not wish to patch your kernel but still be able to suspend to
# disk, see disk.conf instead.

##############################################################################
### Scriptlets
### Scriptlets provide support for doing all sorts of things before and after
### suspending. The defaults settings here should work for most people, but
### you may wish to edit these to taste. Consult "hibernate -h" for help on
### the configuration settings.
##############################################################################

### bootsplash
## If you use bootsplash, also enabling SwitchToTextMode is recommended if
## you use X, otherwise you may end up with a garbled X display.
# Bootsplash on
# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

This works except for the fact that, again, if I suspend for more than 15 min, I don't have video after resuming. I can suspend/resume multiple times under 15 min and it never crashes - always works. Funny thing is if the no video problem arises, I can kill X, but X won't restart and give me the "screens found, but none manageable" error.

So, any ideas?

BTW, using latest version of Vbetool (earlier versions give the same result), using Xorg 7.1 with AIGLX and Beryl, mesa 6.5.1-r1, and have tried this with multiple kernels that have suspend2 support.

EDIT: What is causing the screen to go black/blank in gentoo after 10 min of inactivity? I ran xset -dpms and the screen still went black. I'm sure this has to be causing the issue with suspend (I ran suspend for exactly 10 minutes and have the resume video blank issue, anything before 10 min is fine) - if I can just have the screen stay on all the time without it going to black then I think my issue will be resolved. At the very least I need to test this theory out. I'm using XFCE 4.4, so it's not the desktop causing it (no built in power manager - maybe I need something like this?). Any help would be appreciated.

EDIT#2: Figured out what is causing the blank screen after 10 min of inactivity. It's a xorg setting, but I'm not sure how to disable it. Running xset q tells me DPMS is disabled, but it also tells me this:

Using a bleeding edge i915 driver now - no change. Tried a few different options in xorg.conf, disabled DPMS (left it enabled as well), disabled all the blank time settings on the screen, left them the same - it's always the same issue. This is the oddest problem I've ever run across. Again, if I suspend for more than 10 min, I get a blank screen on resume and cannot restart X. However, I CAN go to chvt1 and then back to chvt7 and get my screen back like that, but as soon as X is restarted, it gives me the above error I posted. If I suspend under 9 min this does not happen and I can restart X all I want. There HAS to be a solution to this. Can anyone help?

The X errors you're getting seem to indicate with a problem re-initializing the video card. But you say that console still displays stuff, and your X session still displays stuff, so maybe this is a problem with the X drivers and your card?

If you're willing to live with the screwy X after resume, you can automate the VT switching by setting

Code:

OnSuspend "chvt 1"
OnResume "chvt 7"

It is a bit messy though. Also, have you tried fiddling with "UseTextModeEnable" and/or "UseDummyXServer" in common.conf?

I've tried SwitchtoTextmode setting, but not the dummy x. I still don't see why after exactly 10 min this will happen. Also, if I try to suspend/resume again after X crashes, on resume my PC will reboot, and when the kernel attempts to load it will load the suspend image and I'm back at my desktop again. Weird....

Ok, enabling UseDummyXServer resolves the issue! I can restart X, etc. Will do more testing to confirm. If this works then looks like 64-bit users with 950GMA will finally have a good working solution for suspending.

Edit: NM, spoke too soon. X still gives the error if I try to restart it, but at least the screen is coming back without having to chvt1 and then back to 7. Really not a solution as still suffering from the same problem, but it's a step forward.

Found the issue about the 10 min deal. Seems it has something to do with DPMS not suspending. I found that when attempting to resume after 10 minutes, VBETool (or rather hibernate-ram) gives the following error when trying to post video state: