This forum has been archived. All content is frozen. Please use KDE Discuss instead.

suspend to disk shortcut

Tags: None
(comma "," separated)
L_V
Banned
Posts
104
Karma
-3
OS

suspend to disk shortcut

Tue Aug 04, 2009 9:13 am
I am looking to create a shortcut of the default "suspend to disk" command used in KDE4.3.
(the suspend to disk choice hidden in ctrl+alt+del)

Any idea ?

Looked at:
http://api.kde.org/4.x-api/kdebase-work ... Space.html
http://majewsky.wordpress.com/2009/07/1 ... om-remote/
http://foss-boss.blogspot.com/2008/11/r ... sktop.html

No success with qdbus.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: suspend to disk shortcut

Wed Aug 05, 2009 5:24 am
This is controlled by KSMServer. It has a D-Bus interface, but unfortunately I do not know how to operate it.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
L_V
Banned
Posts
104
Karma
-3
OS

Re: suspend to disk shortcut

Wed Aug 05, 2009 10:18 am
Not being able to make such operation which should be very simple is a problem.

The "suspend to disk" command is very hidden, and not so convenient to use.
Still looking for a qdbus specialist.

And another question:
Where are hidden the command of "kmenu > leave > sessions/system choices" ??
I don't find a way to edit the hybernate shortcut.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: suspend to disk shortcut

Thu Aug 06, 2009 4:14 am
If you use Powerdevil, then the following will work:

- Suspend to RAM
Code: Select all
qdbus org.kde.kded /modules/powerdevil suspend 1


- Suspend to Disk
Code: Select all
qdbus org.kde.kded /modules/powerdevil suspend 4


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
L_V
Banned
Posts
104
Karma
-3
OS

Re: suspend to disk shortcut

Thu Aug 06, 2009 8:32 am
bcooksley wrote:If you use Powerdevil
No I don't.
No uswsusp, no Powerdevil, no ACPI package (just BIOS + kernel ACPI).
The default "suspend to disk" works with no extra.

Kernel info:
Hibernation (aka 'suspend to disk') (HIBERNATION)

Enable the suspend to disk (STD) functionality, which is usually called "hibernation" in user interfaces.
STD checkpoints the system and powers it off; and restores that checkpoint on reboot.

You can suspend your machine with 'echo disk > /sys/power/state'

'echo disk > /sys/power/state' works (as root), but does not behave the same as the KDE4 default command.

Still to be clarified.
L_V
Banned
Posts
104
Karma
-3
OS

Re: suspend to disk shortcut

Thu Aug 06, 2009 9:00 pm
Probability is high that the default "suspend to disk" KDE4 command is:
/usr/sbin/pm-hibernate
User avatar
Gen2ly
Registered Member
Posts
6
Karma
0
OS

Re: suspend to disk shortcut

Fri Nov 13, 2009 2:10 am
Not sure if things have changed from here since Aug 05 2009 but for Suspend to Ram I had to use:

Code: Select all
qdbus org.kde.kded /modules/powerdevil suspend 2


Good tip, bcooksley. Thanks.
ecy3323
Registered Member
Posts
1
Karma
0
OS

Re: suspend to disk shortcut

Sun Nov 22, 2009 9:33 am
Thanks bcooksley

qdbus org.kde.kded /modules/powerdevil suspend 4 works nicely... now i can assign reassign one of extra keys on my keyboard for one touch Hibernation


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]