LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-27-2008, 12:01 AM   #1
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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...
 
Old 10-27-2008, 05:09 PM   #2
bogzab
Member
 
Registered: Mar 2006
Location: Dyserth, Wales
Distribution: Slackware 14.0, Slackware 14.1, Slackware-current
Posts: 306

Rep: Reputation: 33
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.
 
Old 10-27-2008, 05:35 PM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Try this link for the hal-info pkg.

Looks like Robby maybe rebuilt the pkg and changed $ARCH from
i486 to noarch and forgot to change the link on his page.
 
Old 10-27-2008, 05:49 PM   #4
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Sorry, I fixed the link. I typed that in manually, and habit made me type "i486" -- hal-info is truly a noarch package. Thanks!
 
Old 10-27-2008, 09:09 PM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Robby,

I installed:
Code:
mingdao@jeremiah mingdao $ ls -lrt /var/log/packages/
-rw-r--r-- 1 root root    2551 2008-10-28 06:41 pm-utils-1.2.2.1-i486-2_rlw
-rw-r--r-- 1 root root    4305 2008-10-28 06:43 hal-info-20081022-noarch-1_rlw
and did all the sweet things to /etc/lilo.conf and initrd.

Code:
mingdao@jeremiah mingdao $ egrep -v "(^#|^ *$)" /etc/lilo.conf
boot = /dev/sda
compact        # faster, but won't work on all systems.
  bitmap = /boot/slack.bmp
  bmp-colors = 255,0,255,0,255,0
  bmp-table = 60,6,1,16
  bmp-timer = 65,27,0,255
append="panic=15 vt.default_utf8=1 resume=/dev/sda10"
prompt
timeout = 50
vga=869
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/sda7
  label = Slack-current
  read-only  # Partitions should be mounted read-only for checking
image = /kubuntu/boot/vmlinuz-2.6.24-19-generic
  initrd = /kubuntu/boot/initrd.img-2.6.24-19-generic
  root = /dev/sda9
  label = Kubuntu
  read-only
other = /dev/sda1
  label = Windoze
  table = /dev/sda
I created this file:
Code:
mingdao@jeremiah mingdao $ cat /etc/mkinitrd.conf
MODULE_LIST="jfs"
ROOTDEV="/dev/sda7"
ROOTFS="jfs"
RESUMEDEV="/dev/sda10"
And used this mkinitrd command:
Code:
root@jeremiah:~# mkinitrd -c -k 2.6.24.7-smp -f jfs -r /dev/sda7 -m jfs -F -h /dev/sda10
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. NYRFPT

I did not try any of the other scripts listed in the README.
 
Old 10-28-2008, 10:07 AM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by Bruce Hill View Post
Code:
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/sda7
  label = Slack-current
You also need this:
Code:
  append="resume=/dev/sda10"
Quote:
I created this file:
Code:
mingdao@jeremiah mingdao $ cat /etc/mkinitrd.conf
MODULE_LIST="jfs"
ROOTDEV="/dev/sda7"
ROOTFS="jfs"
RESUMEDEV="/dev/sda10"
And used this mkinitrd command:
Code:
root@jeremiah:~# mkinitrd -c -k 2.6.24.7-smp -f jfs -r /dev/sda7 -m jfs -F -h /dev/sda10
With the mkinitrd.conf file, you only need this:
Code:
mkinitrd -c -k 2.6.24.7-smp -F
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.

Last edited by rworkman; 10-28-2008 at 10:08 AM.
 
Old 10-28-2008, 01:45 PM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by rworkman View Post
You also need this:
Code:
  append="resume=/dev/sda10"


With the mkinitrd.conf file, you only need this:
Code:
mkinitrd -c -k 2.6.24.7-smp -F
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.
 
Old 10-28-2008, 03:29 PM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by Bruce Hill View Post
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.
Oh. Yeah. I'm blind. :/
 
Old 10-28-2008, 03:34 PM   #9
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Bruce,

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?
 
Old 11-04-2008, 12:25 AM   #10
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Rep: Reputation: 31
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?
 
Old 11-04-2008, 09:38 AM   #11
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
Quote:
Originally Posted by Romanus81 View Post
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
 
Old 11-07-2008, 02:12 PM   #12
bogzab
Member
 
Registered: Mar 2006
Location: Dyserth, Wales
Distribution: Slackware 14.0, Slackware 14.1, Slackware-current
Posts: 306

Rep: Reputation: 33
Robby

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.

Thanks

Bogus Zaba
 
Old 11-07-2008, 02:25 PM   #13
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
I suspect that you have a stale lock file, but I don't know why yet. See this thread:
http://lists.freedesktop.org/archive...er/001734.html
 
Old 11-07-2008, 02:27 PM   #14
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by Romanus81 View Post
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.
 
Old 11-08-2008, 04:54 AM   #15
bogzab
Member
 
Registered: Mar 2006
Location: Dyserth, Wales
Distribution: Slackware 14.0, Slackware 14.1, Slackware-current
Posts: 306

Rep: Reputation: 33
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.
 
  


Reply

Tags
suspendtoram



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gnome-powermanager suspend error (quriks/pm-utils) vatten Linux - Software 0 09-06-2008 09:24 AM
Nothing on display after suspend/resume rangalo Debian 2 06-26-2007 04:19 AM
No resume from suspend mehlkelm Debian 3 11-22-2005 10:48 AM
ssh ->suspend and resume... alaios Linux - Networking 4 01-10-2005 11:57 PM
resume and suspend pthreads okhan Programming 3 07-30-2004 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration