Suspend to ram - almost works but small problem
Hello, All I have a Dell laptop that can be made to suspend to ram and resume almost with 10.0. (I actually can do it with a script, but not quite using the SUSE tools.) Just one thing needs to be sorted. The display is an NVidia that needs to be kicked back into life with a little utility that I have called postvga. I need this to be run automatically on a text VT immediately after resume and before changing back to the X VT. Now, looking at /etc/sysconfig/powersave/sleep I read: # Should we switch to a text console _in userspace_ before entering # a sleep mode? The kernel usually does this anyway, but if you need # to run some initialization code before switching back to X, this # might be handy. Also on ppc, the kernel does not switch, so this needs # to be "yes" there. SUSPEND2RAM_SWITCH_VT="yes" Just what I am after! The question is, how do I tell the system to run the initialisation code? Alistair
On Sat 08. Oct 16:34:43, Alistair Hamilton wrote:
Hello, All
I have a Dell laptop that can be made to suspend to ram and resume almost with 10.0. (I actually can do it with a script, but not quite using the SUSE tools.)
Just one thing needs to be sorted. The display is an NVidia that needs to be kicked back into life with a little utility that I have called postvga. I need this to be run automatically on a text VT immediately after resume and before changing back to the X VT.
Now, looking at /etc/sysconfig/powersave/sleep I read:
You mentioned not to use SUSE tools above. If you are not using the powersave daemon, this config file does not have any effect for your suspend cycle.
# Should we switch to a text console _in userspace_ before entering # a sleep mode? The kernel usually does this anyway, but if you need # to run some initialization code before switching back to X, this # might be handy. Also on ppc, the kernel does not switch, so this needs # to be "yes" there. SUSPEND2RAM_SWITCH_VT="yes"
Just what I am after! The question is, how do I tell the system to run the initialisation code?
If you are using the powersave daemon, you can trigger the execution of your postvga by the daemon. In your case you can change the variable EVENT_GLOBAL_RESUME_SUSPEND2RAM="restore_after_suspend_to_ram" to something like that EVENT_GLOBAL_RESUME_SUSPEND2RAM="postvga restore_after_suspend_to_ram" in /etc/sysconfig/powersave/events and put your script in /usr/lib/powersave/scripts/. Refer to /usr/share/doc/packages/powersave/powersave_manual.html#Events for more information. Additionally, if you want to get suspend2ram working with with the powersave daemon, read /usr/share/doc/packages/powersave/powersave_manual.html#SuspendNvidia for more information. Bye, Holger
participants (2)
-
Alistair Hamilton
-
Holger Macht