Skip navigation.
Home
Now Shipping Version 7.0

suspend to ram problem


Posts: 46

I recently switched to SimplyMEPIS 6.0 from openSUSE 10.0. My box is a Dell Inspiron 710m. I definitely like MEPIS better for the most part, but just a couple of issues to resolve:

1. When I use the kpowersave suspend to ram function, it suspends no problem. I can press the lid button on my laptop and it will resume its normal operations, except the screen stays blank. Nothing I try will bring it back on and I have to reboot.

2. Although the lid button will bring the laptop out of suspend (mostly), I can't seem to make it initiate the suspend (By closing the lid while machine is on).

Here's the kicker: In SUSE 10, ACPI's suspend worked flawlessly every time, including the closing/opening the lid on my laptop. Is there any way to figure out what is different between the ACPI code in the two distros and use the code that works (SUSE 10)? I assume it's just a configuration issue.

Thanks!

I prefer using the hibernate

I prefer using the hibernate script instead of kpowersave. It offers more tweaks, and allows therefore for more flexibility.

If you are not afraid of editing a config file, you should be in no trouble.

Install the packages hibernate - vbetools - acpid (if not already present)

As roo, edit the file /etc/hibernate/hibernate.conf. This file is quite self-explanatory. You can play around with the settings. Try hibernating from the command line with the command hibernate. if it all works fine, you can proceed to create a small script in /etc/acpi/events to activate the hibernate script to the lid switch. If I'm not mistaken, there will already be an example script installed by kpowersave which you can use to create your own (it's only one line, basically). The command to invoke when the lid switch is activated would be /usr/sbin/hibernate.

Good luck, and ask if you have more questions.

Newbie or not Newbie, there's always a question

Normally in 6.0 hibernate is

Normally in 6.0 hibernate is enabled by default (means, nothing to install). All you need is add into your boot line:

resume=/dev/DISK

where DISK is the name of your swap device.

I also prefer hibernate too much (once it works) - hibernate gives you a real freedom, no matter when you'll poweron your laptop, even it's open accidentally, etc., may stay for weeks in your bug, or you may boot Windoze for some reasons and then come back to your working session with one click...

Rgds,
-dim

getting closer

carlops and dim,

Thanks for the help, I'm definitely getting there. I now have both "suspend to ram" and "suspend to disk" (hibernate) working (using kpowersave).

Personally, I prefer "suspend to ram," because hibernate takes too long on my machine. It takes nearly the same time to hibernate and resume as it does to do a complete reboot (about 1 minute).

That said, how should I write /etc/acpi/lid.sh so that it will suspend to ram when I close the lid on my laptop? Is there a suspend to ram shell command (I already have an event in /etc/acpi/events/ that will call lid.sh when the lid button is pressed)?

Thanks!

only one line

Invoking suspend to ram is only one line:
echo 3 > /proc/acpi/sleep

If you do that as root from the command line, the laptop will suspend to ram, so put it into your lid.sh and you're done.

Newbie or not Newbie, there's always a question

Maybe too dangerous use

Maybe too dangerous use directly 'echo 3'...

I would vote for: 'powersave --suspend-to-ram'
should be much more secure, no?

Rgds,
-dim

I guess so

.. but I assumed he wanted to know the basic command. If you use powersave that would be the way to go. I'm not really sure though if you could not set the lid switch option directly from kpowersave...

Newbie or not Newbie, there's always a question

And you are right! Seems

And you are right! Seems there is an option 'POWERSAVE_EVENT_BUTTON_LID_CLOSED=action' in /etc/powersave.conf to be assigned (goodle: http://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9.1/adminguide9.1/ch09s05.html (first found, but enough info))

so, seems if you use suspend action - its should be ok! Smiling

However, personally, it's the first thing I'm looking for to _disable_ Smiling I prefer to avoid any auto-action! I like to close lid and walk with my laptop from my office to the machine room, or meet customers in other suite, etc. it continues to work, wifi connected and ready to action Smiling

But, it's up to every one to have different preferences Eye-wink

BTW, my preference for hibernate came from simple travel when one brutal US custom checking my laptop simply broke my lid lock and there was no more way to keep lid closed! so there was no more way to keep my laptop suspended (stupid, but that's life), and I discovered hibernate Smiling

Rgds,
-dim

Got it!

So I ended up putting "powersave --suspend-to-ram" in my lid.sh file and making it executable. Now it'll suspend when I close the lid and resume when I open it. As a student, I have more time between when I close the lid (at my apartment) and open it (in class or the library), so the sleep works well to save battery. Fortunately, Mepis 6.0 works really well with my wireless card (ipw2200) so it works again automatically after a sleep.

Thanks for the help!

By the way, I couldn't find powersave.conf in /etc. Perhaps the latest version of powerave stores it's configuration in a different location?

Excellent! Finally

Excellent! Smiling

Finally 'powersave.conf' is only Suse-specific Smiling (what's fine with forum - all the time we discovering new things), so I went to the main source (powersave.sourceforge.net), and once more loved MEPIS Smiling MEPIS respecting powersave config 'a la lettre', and config file managing lid and others is called 'events'. And as all other powersave config files, saved in '/etc/powersave' directory...

Rgds,
-dim

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.