Request for Testing: Suspend/Resume (pm-utils backend)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Request for Testing: Suspend/Resume (pm-utils backend)
After seeing a recent post on this subject and the poster being referred to my pm-utils package (thanks allend), I decided it might be a good idea to expose a wider audience and maybe get some more testing on it.
pm-utils is a set of scripts that aim to handle suspend and resume from userspace in a reliable manner. It uses the "quirks" database from hal (actually hal-info) to use known-good combinations of special flags needed for specific hardware to sleep and wake back up reliably. However, it's certainly not perfect - some hardware simply can't handle the suspend/resume properly for whatever reason (generally things that need to be fixed in the actual device drivers), and other hardware may not have the correct (or any) quirks listed in hal-info. The first problem generally is something that nothing in userspace can solve - it has to be fixed in the driver(s) involved. However, the second problem is the primary aim of my testing - ideally, we can get fixes upstream in hal-info, and these benefit everyone, regardless of the distribution in use.
Long term, I'd like to be able to consider pm-utils reliable enough to recommend it for inclusion in Slackware, but that's down the road a bit. In the meantime, testing and feedback are what's needed.
The package is here: http://rlworkman.net/pkgs/
Please subscribe to my RSS feed so that you'll be notified of any updates as they appear.
More importantly, be sure to read the README.SLACKWARE file in the pm-utils package documentation directory. A copy of it is also online here: http://rlworkman.net/pkgs/12.1/sourc...ADME.SLACKWARE
Be sure to read that file - it's important, as it has information to get you started as well as suggestions to try if things don't work for you.
You'll also want to grab the latest hal-info package from my repository; I don't normally like to distribute packages of things that are in Slackware, but in this case, the benefits outweigh the drawbacks -- it's important to have the latest release of that before concluding that pm-utils doesn't work.
Finally, PLEASE be sure to make backups before you try any of this, and if you can't afford to do a clean reinstallation of your system, don't try it at all. This is at least somewhat risky stuff, and there's a very real possibility that it could go tits-up, so consider yourself warned...
I will certainly give your package a try on my new-ish Lenovo laptop on which I have got suspend working just about and under some circumstances but not others. I have picked up the pm-utils package from your site but note that the link to hal-info 20081022 seems to be broken and you say this is needed.
The remainder of the stuff is pulled from the config file.
Quote:
The command "pm-suspend" issued as root causes my T61
to sleep. Pressing Fn+F4 wakes it up.
Issuing "pm-hibernate" seems to work. But, it won't come
back from hibernate by pressing the On/Off button.
If suspend to ram works, then suspend to disk should definitely work. It's suspend to ram that normally causes problems. Try it with the new kernel append line and see what happens.
The remainder of the stuff is pulled from the config file.
If suspend to ram works, then suspend to disk should definitely work. It's suspend to ram that normally causes problems. Try it with the new kernel append line and see what happens.
If you look again at my post, the append line in my
/etc/lilo.conf contains resume=/dev/sda10. I have
all my append statements on one line.
Is this the first you've ever played with suspend at all, or does a "vanilla" suspend to disk via:
Code:
echo -n disk > /sys/power/state
work for you?
Also, when you say that pressing the power button won't wake it back up, do you mean that it won't come back on at all, or that it boots a "fresh instance" of the OS? If the second, then does this swap partition happen to be shared by the other linux installations, and if so, were any of them booted in the meantime?
The entire process works flawlessly on the MSI Wind.
I do run into a problem with hibernation when I want to hibernate slackware, but need to boot into another linux system, since the swap is being used by the slackware hibernation.
Is it possible for slackware to use the swap partition but hibernate to a swap file?
The entire process works flawlessly on the MSI Wind.
I do run into a problem with hibernation when I want to hibernate slackware, but need to boot into another linux system, since the swap is being used by the slackware hibernation.
Is it possible for slackware to use the swap partition but hibernate to a swap file?
You can specify what paritition you want to hibernate to in some file, I forget where exactly
Your READMEs make it clear that this is not for amateurs and I may not be the sort of user you want to test these utilities as I do not have 100% understanding of the underlying stuff. About 80% though, so perhpas these comments will not be totally useless.
First what happened when I tried on my Lenovo 3000 N200 (Slack 12.1 and KDE 3.5.9):
First time I tried pm-suspend at console as root - it suspended. Random key on the keyboard woke it up. pm-hibernate then put it into hibernation. I was very impressed as I had not seen this working previously on this machine. Pressing the main power switch then started the normal power-up routine, but pretty quickly it realised that it was resuming rather than booting and put me right back where I was. Wow.
Then I got ambitious and edited my xorg.conf to use standard "nv" nvidia driver rather than the nvidia-distributed alternative. I did this because in the past when using nv, my usual way of suspending (KDE Klaptop suspend button) fails to resume. I wondered if your utility was going to be superior in this respect.
After that however, your utilities seem to just do nothing. pm-suspend and pm-hibernate just return straight to the command line prompt. Even when I go back to the nvidia-distributed driver in xorg.conf!
Summary - I have had your utility working great - but just once. Something has now happened which stops it working.
I have a feeling that this might be connected with my ignorance of what I should be entering for the "Suspend=/dev/xxxx" parameter in lilo.conf and mkinitrd.conf. Should this be my swap partition (/dev/sda3)? I have increased the size of this to cover just over 2 x installed memory as you suggest. I have tried both with and without this entry in these conf files and it seems to make no difference.
Hope this helps some and that you can also help me in understanding what I should be doing to fix it.
The entire process works flawlessly on the MSI Wind.
I do run into a problem with hibernation when I want to hibernate slackware, but need to boot into another linux system, since the swap is being used by the slackware hibernation.
Is it possible for slackware to use the swap partition but hibernate to a swap file?
You can indeed specify a swap file to be used, but I've never done than and really can't give decent advice on the best way to accomplish it. I think it would probably be easiest to tell your other distributions to use swap files and let Slackware have exclusive use of the partition though.
Some additional feedback:
I looked at the discussion on the lock files and this indeed seemed to be the problem which stopped my calls to pm-suspend and pm-hibernate working. Deleted the lock file and tested again, now a bit more confident that my lilo.conf and mkinitrd.conf files were correct (is it right that the "RESUME=" entries should have the swap partition as the parameter?). pm-suspend then worked OK with my usual nvidia-supplied X driver, but again installing the nv driver screwed things up, this time quite badly when attemptng a pm-hibernate. Awaking from the hibernation failed and subsequent re-boot required a lot of fsck on the root file system to correct errors which seem to have arisen (there were references to .Xauthority and /var/run/pm-utils among the filesystem fixes that fsck undertook). Finally got back to bootable (and undamaged as far as I can make out) system, changed back to the nvidia driver and both pm-suspend and pm-hibernate working again.
Conclusion for me : Apart from ability to bibernate, no obvious gain over using other utilities that I have (KDE Klaptop "suspend" function and "acpitool -s" both of which seem to work (but only with the nvidia driver), and have the advantage for me in routine use of not having to be run as root. None of the suspend utilities, including yours, seem to live happily with the nv driver which is a pity since there are other features of this driver that I prefer over the nvidia one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.