Bug 296360 - Desktop 12.1 system does not hibernate since KDE 4.8.1
Summary: Desktop 12.1 system does not hibernate since KDE 4.8.1
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: solid
Classification: Unmaintained
Component: powermanagement (show other bugs)
Version: 4.9.0
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-19 13:51 UTC by krienke
Modified: 2013-04-28 12:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krienke 2012-03-19 13:51:09 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build Identifier: 

I am running openSuSE 12.1 with  kde4.8.1 rpms from openSuSE installed.
My problem is I can no longer hibernate my linux desktop system. The machine seems to do nothing when I initiate hibernation but then hangs. The systems condition is strange, eg usually the KDE desktop is still visible, I even can still close eg firefox. However KDE itself seems to hang completey. No KDE menu no KDE apps respond to any mouse actions.   Even a reboot does not work, so I have to turn the system off by long pressing the power switch. 
The linux system is using the binary nvidia drivers.

I tried to start hibernation via KDE-Menu  as well as by pm-hibernate (being root).
If I do not start KDE but instead use eg fvwm and then run pm-hibernate, everything works just fine. 
The very same system did not have any problem hibernating using KDE 4.8.0 or earlier versions. The trouble started right after an update from 4.8.0 to 4.8.1

Thanks
Rainer

Reproducible: Always

Steps to Reproduce:
1. Selecr hinbernate from KDE menu or run pm-hibernate as root
2.
3.
Actual Results:  
System seems to do nothing but then gets into an undefined state.
Comment 1 krienke 2012-05-07 08:40:31 UTC
Just tested 4.8.3. The bug is still there.

However it seems to make a difference if the system uses a local disk or NFS for the users home directory. I have a office system that uses NFS to mount the users home directory. Mount is done via automount. On this system hibernation does no longer work since KDE 4.8.1 (before 4.8.1 it worked fine). 
On my home system (same linux, same kde version)  with a local disk hibernation still works fine. So I guess that this bug is related to NFS or autofs in some way.
The bug is still there in 4.8.3
Comment 2 krienke 2012-08-02 11:10:51 UTC
Now KDE 4.9 is installed, still on openSuSE 12.1

The bug is unfortunately still not fixed. If any developer needs more information to di this, just tell me what you need and I will try to provide it.

Rainer
Comment 3 Wolfgang Mader 2012-12-10 13:35:22 UTC
I fell like I have the same issue. Since I can use hibernation using pm-hibernate from command line (even within KDE) I guess the kde power management disables the swap partition, such that pm does not find it any more. This breaks hibernation. See [1] for my post in the KDE forum.

Anyone needs some background information? I would be grad to provide.


[1] http://forum.kde.org/viewtopic.php?f=225&t=108990
Comment 4 Alex Fiestas 2013-03-03 16:23:32 UTC
Do you have a swap partition? if so how big is it? is it bigger than RAM?
Comment 5 Alex Fiestas 2013-04-25 16:29:24 UTC
Closing bug for lack of feedback.

Please, if you can reproduce this with KDE 4.10, upower and a "recent" kernel and with a swap parition feeel free to reopen the bug.

Thanks !
Comment 6 Wolfgang Mader 2013-04-27 11:02:50 UTC
Sorry for the lack of feedback. I didn't ment to be rude.

Abstract:
KDE hibernation mechanism works for me on two different machines using a dedicated swap partition as well as using a swap file.


Long description:
I tested the issue on a current KDE (4.10.2) and current kernel 3.8.8 on two machines. One is using a dedicated swap partition, the other a swap file. I am using the kernel suspend and hibernation system, and pm-utils are installed as wrapper. I am also running systemd, but according to documentation, its power management is cut out of the loop when running KDE. Therefore, I assume, the pm-utils wrapper are used.

First, you have to make sure, that the system is set-up correctly for hibernation. Suspent to RAM should work out of the box. On my Archlinux system setting up hibernation means adding the 'resume' hook to the initial RAM disk (/etc/mkinitcpio.conf) and appending a boot parameter to the kernel for your swap solution. In the case of a swap partition this is
resume=/dev/sdaX
where X is the number of your swap partition. For a swap file you have to give the partition on which the swap files is locatet as well as the offset to the beginning of this file. This reads as
resume=/dev/sdaX resume_offset=12346
The offset can be determined using the command filefrag -v /path/to/swapfile. Please consult the excelent Arch wiki page on hibernation for more details.

After adjusting the configs you have to built a new initramfs using
mkinitcpio -p imageName
with imageName the name of your image. For me this in linux. Furthermore, you have to make sure that the new kernel parameter take effect. Please consult the documentation of your boot loader.

After this, I tested hibernation first by issuing pm-hibernate as root two times in a row, which completed successfully on both machines. After this I tested the KDE suspend mechanism using Logout->Suspend to disk. This also did the job.

For the machine with the swap file the hibernation takes around 30sec to complete. I am not sure if this as due to the swap file or connected to the used wifi driver (broadcom something) or then nvidia driver blob.
Comment 7 Alex Fiestas 2013-04-28 12:26:54 UTC
Nice to know it is working for you now :)
30s does not sound too bad for hibernation.

Cheerz !