Suspend to ram - several problems

My laptop supports suspending to ram, and it works fine, when I start it from root, but it fails some certain points when I start it from user.

When I ask information about my machine, or run a test, it tells me, that /dev/mem has god an invalid operation, (previously no permission, but I have added myself to the kmem group!) and all the parameters are empty.
In root, the result is the following:


:~ # s2ram -n
Machine unknown
This machine can be identified by:
    sys_vendor   = "FUJITSU SIEMENS"
    sys_product  = "AMILO Pro Series V3525         "
    sys_version  = "20             "
    bios_version = "R01-A0S   "
See http://en.opensuse.org/S2ram for details.

...

Results with user:


:~ > s2ram -n
/dev/mem: Operation not permitted
Machine unknown
This machine can be identified by:
    sys_vendor   = ""
    sys_product  = ""
    sys_version  = ""
    bios_version = ""
See http://en.opensuse.org/S2ram for details.

...

Every thing seems right…

If I give the command in force, user fails, root succeed.

result of user and root:


:~ > s2ram -f
fgconsole: getconsolefd: Invalid argument
Switching from vt-1 to vt1
chvt: VT_ACTIVATE: Bad file descriptor
VT_WAITACTIVE: Bad file descriptor
Szegmens hiba*
:~ > su -lc 's2ram -f'
Jelszó: 
Switching from vt7 to vt1
fbcon fb0 state 1
fbcon fb0 state 0
switching back to vt7
:~ >

*It says Segmentation fault

I know, that if I give the su command the l (L) parameter, it will change the environment, and I have not tested yet what it does if I don’t give that parameter.

I’ve already put my user name in to the kmem, and console group.
What else do I need to change to make the s2ram to access the peripherals, and what steps do I need to make, to make s2ram be a known machine, now and then?

I have wrote “Everything seems right …” after I wrote the user output. I meant it on the code within root. :embarrassed:

I’ve figure it out how to put it work immediately, by examine through once more the wiki pages on s2ram. :embarrassed:

Now its works smoothly, and also sent my computer parameters, hoping, that I don’t have to force it forever. :wink:

Can you outline what specific steps you took from the wiki that helped you out?

Certainly!
On the SuSE wiki about s2ram, there is a topic named Integration into other projects (or “How to get the GUI buttons working”)

It has three sub-topic. First I followed the link for the 10.1 version, but it said that after that version, that solution is not working.
I didn’t toke any steps from that page, but you should insert the line below in to this file /etc/powersave/sleep ONLY if you are in the same case, like me, who’s machine is supports suspend, but not works by default, AND using SuSE 10.1.

SUSPEND2RAM_FORCE="yes"

You have to check further settings in the topic, if s2ram not worked with Only -f.

Since SuSE 10.2 and above not using the powersave module, I needed to check the other topic about Pm-utils instead.
Probably you have to create a “config” or “modules” file in /etc/pm/config.d directory. If one of the files is exists, you only have to edit them. :wink:
To add extra parameters to s2ram command from the system, you need to add the following line:

S2RAM_OPTS=""

Where in the “” you have to type the proper parameter, like -f.

BUT FIRST!
You need to check what does support your computer, and what parameter do you need to add, what options you have to trigger.
A guide on find out what is working, is told in the My machine is not in the whitelist, what can i do? topic. I personally switched in to super user, and give the s2ram -f command, which had worked for me.

Just for advice
And also don’t forget to send them your machine type, so they can put it in the whitelist, and then you don’t need to done it by hand, if you ever need to reinstall your system.

Good luck! :slight_smile:

Ps. - I don’t know why the command cannot be started from user, but this fact is irrelevant.