You are not logged in.

#1 2008-12-15 10:35:03

benji.ijneb
Member
Registered: 2008-12-13
Posts: 84

configuring suspend commands with kde

for a long time (ok, 2 days...) i battled against pm utils on my dell latitude c400 - I always got a succesful suspend, but the computer resumed with no display - i could turn it off by entering the right commands...

recently i installed aswsusp from the aur and got s2ram. when i run "s2ram", i get:

/dev/mem: Permission denied
This machine can be identified by:
    sys_vendor   = ""
    sys_product  = ""
    sys_version  = ""
    bios_version = ""

when i run "sudo s2ram", it works perfectly! yay! i get a successful suspend in a few seconds!
my question is, how to i alter the command that hitting suspend on the kde(mod) shutdown dialog runs to make it do s2ram? at the moment, it looks as if it's still running pm-utils...
also, any way of getting powerdevil also to run s2ram instead of pm-utils? (you can see that i'm very new to all this!)

Thanks for all your help!

Offline

#2 2008-12-15 10:50:28

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: configuring suspend commands with kde

I do not know about kde, but, assumed that kde resorts to pm-utils, pm-utils can be configured to use s2ram.
In any file in /etc/pm/config.d (create a file if you haven't any: the name shouldn't matter), put the following:

SLEEP_MODULE="uswsusp"

Last edited by patroclo7 (2008-12-15 10:53:40)


Mortuus in anima, curam gero cutis

Offline

#3 2008-12-16 11:56:34

benji.ijneb
Member
Registered: 2008-12-13
Posts: 84

Re: configuring suspend commands with kde

patroclo7 wrote:

I do not know about kde, but, assumed that kde resorts to pm-utils, pm-utils can be configured to use s2ram.
In any file in /etc/pm/config.d (create a file if you haven't any: the name shouldn't matter), put the following:

SLEEP_MODULE="uswsusp"

thanks, but that doesn't appear to have done anything...
suspending from the kde shutdown dialog + shutting the laptop lid (which i think powerdevil deals with...) suspends properly, but there's no display on resume (as it does with pm-utils), however running sudo s2ram does the trick nicely...

Offline

#4 2008-12-16 17:11:57

benji.ijneb
Member
Registered: 2008-12-13
Posts: 84

Re: configuring suspend commands with kde

looking through my pm-suspend.log, i'm seeing:

Tue Dec 16 16:46:06 GMT 2008: Awake.
Tue Dec 16 16:46:06 GMT 2008: Running hooks for resume
/usr/lib/pm-utils/sleep.d/99video resume suspend: disabled.  <---- that looks important...
/usr/lib/pm-utils/sleep.d/98smart-kernel-video resume suspend: success.
/usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
/usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/90chvt resume suspend: disabled.
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
/usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend: success.
/usr/lib/pm-utils/sleep.d/49bluetooth resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/11netcfg resume suspend: success.
/usr/lib/pm-utils/sleep.d/01grub resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
/usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
/usr/lib/pm-utils/sleep.d/00auto-quirk resume suspend: success.
Tue Dec 16 16:46:07 GMT 2008: Finished.

interesting...
anyone got any other ideas of how to integrate s2ram?

Offline

#5 2008-12-16 18:55:12

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: configuring suspend commands with kde

The "important" line seems to show that s2ram is used: pm-utils disables the video hook because s2ram takes care of the video by itself. But I do not know why it fails, probably another hook interpheres with s2ram. Anyway the hooks are simple shell scripts, you can inspect them.


Mortuus in anima, curam gero cutis

Offline

#6 2008-12-16 19:39:00

benji.ijneb
Member
Registered: 2008-12-13
Posts: 84

Re: configuring suspend commands with kde

patroclo7 wrote:

The "important" line seems to show that s2ram is used: pm-utils disables the video hook because s2ram takes care of the video by itself. But I do not know why it fails, probably another hook interpheres with s2ram. Anyway the hooks are simple shell scripts, you can inspect them.

so how come sudo s2ram still works...? but that's very handy, anyway! How do i inspect the hooks?

EDIT: gaah! i'm confused - i found the hooks in /usr/lib/pm-utils/sleep.d , but that doesn't help me! how could i find out what hook is interfering with s2ram? should i try enabling hook 99video resume?

EDIT 2: or... surely i could just remove s2ram altogether, if i am able to get hook 99video resume to run...

thanks for all your help so far!

Last edited by benji.ijneb (2008-12-16 19:56:29)

Offline

#7 2008-12-16 21:51:58

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: configuring suspend commands with kde

Just grep all the hooks to see what uswsusp does specifically. Probably pm-utils attach mistaken options to s2ram (so it works standalone beacuse you do not pass to it those options).
But perhaps you can tell kde to use s2ram directly, only I do not know how because I am not a kde user. All the guis for hibernating tend to add a level of abstraction such that it is difficult to catch the problems. Pm-utils is another level of abstraction, and an heavy one, because it adopts a lot of quirks and workarounds which should allow a safe a reliable suspension cycle, but often have the opposite effect: they make impossible to suspend machine which would not have any issue if the core method is used.


Mortuus in anima, curam gero cutis

Offline

#8 2008-12-17 12:16:44

benji.ijneb
Member
Registered: 2008-12-13
Posts: 84

Re: configuring suspend commands with kde

whoa i'm out of my depth here...
to be honest, i'm clueless as to where to start or what to do (i'm still quite new to all this...) but thatnks for your help so far!
on a side note, when i do suspend to disk from the kde logoff dialog, it tells me that it's using s2disk, and it works perfectly... is that any help?

Offline

#9 2008-12-17 12:18:21

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: configuring suspend commands with kde

It confirms that kde resorts to pm-utils and pm-utils resorts to uswsusp stuff. So, the problem is that pm-utils breaks s2ram in some way


Mortuus in anima, curam gero cutis

Offline

Board footer

Powered by FluxBB