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

How does hibernate and suspend options work in KDE4?

Tags: suspend, hibernate, hal, dbus suspend, hibernate, hal, dbus suspend, hibernate, hal, dbus
(comma "," separated)
User avatar
Madman
Registered Member
Posts
593
Karma
1
OS
This was a problem with the linux kernel that was far improved in 2.6.30.


Madman, proud to be a member of KDE forums since 2008-Oct.
L_V
Banned
Posts
104
Karma
-3
OS
There is still something broken somewhere.

With Debian /testing/SID / kernel 2.6.30
- /usr/sbin/pm-hibernate works fine
- suspend to disk from KDE4 logout GUI works fine

With Kubuntu Karmic / Kernel 2.6.31
- /usr/sbin/pm-hibernate works fine
- suspend to disk from KDE4 logout GUI does not work (just a black screen and nothing else).

How to check and reassign the KDE4 "suspend to disk" GUI command to /usr/sbin/pm-hibernate ?
User avatar
vbatts
Registered Member
Posts
102
Karma
0
OS
is your user a member of the "power" group?


vbatts, proud to be a member of KDE forums since 2008-Sep.

http://hashbangbash.com/
L_V
Banned
Posts
104
Karma
-3
OS
I don't have any power group, neither in Debian (not full install).

/usr/sbin/pm-hibernate CLI works fine.

The key question is still this one: "How to check and reassign the KDE4 "suspend to disk" GUI command ".

Never got a clear answer to this one. It seems really nobody knows.
However, installing uswsusp solves the problem, although the conclusion was some time ago that pm-hibernate was used by "suspend to disk" KDE4 GUI command.

We also read sometimes that the GUI command should be:
echo mem > /sys/power/state
which gives:
bash: echo: write error: No such device

Things need to be clarify, may be completely depending on distributions, which does not help.
User avatar
vbatts
Registered Member
Posts
102
Karma
0
OS
well that is an issue i'm sure. the "power" user is one that is in the stock installation for slackware-13.0 and is used by dbus and hal. for kde4 the guidance-power-manager and the power-devil use it.
to test it, i had hacked out part of the guidance-power-manage to test it. you can download it and play with it yourself http://cardinal.lizella.net/~vbatts/downloads/test-suspend.py
of course try it as your user first, then as root or whatever.
i hope that helps.

Take care,


vbatts, proud to be a member of KDE forums since 2008-Sep.

http://hashbangbash.com/
L_V
Banned
Posts
104
Karma
-3
OS
I don't have guidance-power-manager installed. Not necessary for a desktop.

To make it clear: in which file can we reassign the KDE4 "suspend to disk" GUI command " ?

However, it now works fine both with Debian and Ubuntu (on the same PC).
The only difference is that Ubuntu requires uswsusp, and not Debian, which means the "suspend to disk" is probably not configured the same way.
L_V
Banned
Posts
104
Karma
-3
OS
"To make it clear: in which file can we reassign the KDE4 "suspend to disk" GUI command " ?"

The answer is finally ..... : /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux

Different behaviors of KDE4 suspend GUI command is explained by the content of hal-system-power-hibernate-linux.

Now clarified.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
KDE 4 uses Solid which instructs its backend to perform the hibernation / suspend. The only available backend for Linux at this time is HAL.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
L_V
Banned
Posts
104
Karma
-3
OS
For those having troubles with "suspend to disk" at least with Kubuntu, there is a straight solution:

Install uswsusp

cd /usr/lib/hal/scripts/linux/
sudo mv hal-system-power-hibernate-linux hal-system-power-hibernate-linux.bak
sudo ln -s /usr/sbin/s2disk ./hal-system-power-hibernate-linux

The "suspend to disk" KDE4 GUI command will directly point to /usr/sbin/s2disk
lisonator
Registered Member
Posts
1
Karma
0
OS
I have a question regarding suspending. I'm using KDE 4.3 with Debian Testing/Sid and want to change the behavior of the "Suspend to ram" button script. What I exacly need is to stop network-manager service before suspend and start it after resume. As I understand the first can be done by modifying the
Code: Select all
hal-system-power-suspend
script (or am I wrong?). What about starting after resume?

Now I am using following combination:

1.
Code: Select all
#service network-manager stop

2. run suspend to ram from KDE menu
...sleeping and after wake:
3.
Code: Select all
#service network-manager start
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
KDE instructs HAL to perform the system suspension, therefore the correct script to modify is the script your distribution uses to perform the suspend.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]