LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Getting Software Suspend 2 to work (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/getting-software-suspend-2-to-work-349060/)

microsoft/linux 08-01-2005 09:25 PM

Getting Software Suspend 2 to work
 
Ok, so I downloaded the patch for kernel 2.6.8 I believe it patch software-suspend-2.0.0.105-for-2.6.8.1. I applied it using the command
Code:

../software-suspend<version here>/apply
in the kernel sources directory. I recompiled the kernel, and installed it. But when I run
Code:

hibernate
I get some error, and the computer does not hibernate. thoughts? I'll have to get the error. Something about /proc/sys/<something here> not existing I think.

Half_Elf 08-02-2005 02:30 PM

*posting your error here could help*

microsoft/linux 08-02-2005 08:08 PM

here's the error, sorry about the delay
Code:

awk: cannot open /proc/sys/kernel/osrelease (No such file or directory)
grep: /proc/sys/kernel/osrelease: No such file or directory
grep: /proc/sys/kernel/osrelease: No such file or directory
grep: /proc/sys/kernel/osrelease: No such file or directory
shift: 795: can't shift that many


Half_Elf 08-02-2005 10:13 PM

Ok... the hibernate script change often, nearly as often as the software-suspend patch. Make sure you have the "old" script installed, the one relative to the 2.6.8.1 kernel patch. Your hibernate script is probably too recent or too old, depending, it is probably looking for something that doesn't exist in your software-suspend version.

microsoft/linux 08-03-2005 11:31 AM

ok, I installed the debian package hibernate. I know I have a kernel that is 2.6.8, but I don't know if it's 2.6.8.1, will that make a huge difference? Where do I get the hibernate source?

Half_Elf 08-03-2005 11:49 AM

I don't know about the exact version of the kernel, I suppose you will have to try :)

You can find hibernate at http://www.suspend2.net/

Kdr Kane 08-03-2005 11:56 AM

You might check to see if you have a swap partition - separate from your root partition - that is at least as large as your memory.

microsoft/linux 08-03-2005 12:16 PM

which version of hibernate should I use? theres anywhere from 0.95.1 to 1.10. Thoughts?

microsoft/linux 08-05-2005 08:45 PM

nobody knows what version of hibernate I need to download? Thoughts?

Noth 08-06-2005 07:10 PM

Is /proc mounted? I looked on one of my boxes (running 2.6.8-2-sparc64-smp) and it's there for me.

microsoft/linux 08-07-2005 11:38 AM

yes /proc is mounted. Why does that affect which version of hibernate I need to download? I was told I need to download a certain version because I have a 2.6.8 kernel

Noth 08-07-2005 12:54 PM

It doesn't affect it, but the errors you're getting make it seem like it's not mounted. I'm using hibernate 1.10-1 from unstable with kernel 2.6.9 and it works fine.

microsoft/linux 08-07-2005 08:48 PM

hmmmm....I'll hvae to check and make certain that /proc is mounted, but I'm pretty sure it is. Other thoughts? Should the most recent version of hibernate support all old patches?

Half_Elf 08-07-2005 08:52 PM

I'm not quite sure... maybe but it's hard to tell.
My guess would be to upgrade to the latest kernel wih the latest software suspend2 patch as well, so you will be sure it is fine.

microsoft/linux 08-07-2005 09:09 PM

is it possible that the version of hibernate in Sarge is too old for the version of the patch I applied?

Half_Elf 08-07-2005 10:38 PM

that's what I think. Again, my guess is to try various version of hibernate from swsusp2 website... it's hard to tell which version should work with which version of the patch. There might be some mention in the readme file, thought.

microsoft/linux 08-08-2005 10:06 PM

would using the debian kernel-patch package work w/ their version of hibernate?

Noth 08-08-2005 10:11 PM

If you're talking about kernel-patch-suspend2, it's only available in experimental right now.

microsoft/linux 08-08-2005 10:15 PM

I thinks it's in sarge as well, at least, I thought so

microsoft/linux 08-08-2005 10:19 PM

nope your right, it that etch? or sid? etch is testing right?

Noth 08-08-2005 10:19 PM

Not according to packages.debian.org. It shows up in the list for me in sid because some other package references it but it's not installable.

Generally you should grab the newest version of the hibernate script and suspend2 patch from suspend2.net, grab the kernel it was created against and use those.

microsoft/linux 08-08-2005 10:21 PM

ok, I'll have to wait until I get internet(high-speed) acess. Can I do make-kpkg on so called 'pristine' kernel sources? do I need to apply any debian patches?

Noth 08-08-2005 10:23 PM

make-kpkg will work on any kernel source.

microsoft/linux 08-08-2005 10:25 PM

k, thanks. If there are any other thoughts that'd be great, other wise...I guess this is it

Noth 08-08-2005 10:54 PM

I've never seen your particular problem, infact the only part of the hibernate script that references /proc/sys/kernel/osrelease is /usr/share/hibernate/scriptlets.d/modules. AFAIK everything you should need to get things working is on wiki.suspend2.net

Hibernation in the form of swsusp or suspend2 can be a real pain to get working sometimes, the infrastructure for power management is pretty new in the kernel so not all drivers place nice and it can take a good amount of work to track down what's broken. It's the reason I'm still using 2.6.9, anything newer and the box hangs on resume.

basileus 08-09-2005 03:28 AM

I'd download several different suspend script versions and try them one after another. Or you could google (www.google.com/linux) with the error message, if you have not already done that.

Noth 08-09-2005 09:59 AM

Or you could just stop by the suspend2 IRC channel and talk to the developers. The only annoying thing is that Nigel lives in Australia, so it can be hard to get ahold of him sometimes.

taboom 08-27-2005 08:50 AM

I have the same problem. I use kernel 2.6.12.5, software suspend 2.1.9.9 for 2.6.12 and hibernate script 1.10-1.

By doing "hibernate -v4" (verbosity) I find that it seems as

+ echo Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules
Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

---snip---

+ FindModuleDeps nvidia
+ Get26ModulesFile
+ grep -q ^2\.4\. /proc/sys/kernel/osrelease
grep: /proc/sys/kernel/osrelease: No such file or directory
+ cat /proc/modules

and the same happens for:
FindModuleDeps acx100
FindModuleDeps acx_pci
FindModuleDeps prism54

All modules I don't have, but are blacklisted in /etc/hibernate/blacklisted-modules

The module "usbhid" causes the same problem, and this is a module I do have, and need.

I don't have a directory called /proc/sys, maybe I should (I will have to look at my kernel configurations obviously). But just wanted to know there are other ones with the same problem.

taboom 08-27-2005 10:37 AM

SOLVED
 
And this solved the problem:
I enabled
General setup --->[*] Sysctl support
in the kernel. This gave ma a /proc/sys and within that all I needed. Now suspending works fine.

Noth 08-27-2005 12:05 PM

Why would you remove that in the first place?

microsoft/linux 08-28-2005 08:17 PM

ok, it was the Sysctl that was the problem. I had removed it from my kernel because I didn't know what it did. Once I added this it went into hibernate mode, but then it hung. Here's where it hangs
Quote:

SOFTWARE SUSPEND

Freezing Processes: syncing remaining I/O
[--------------------------- 55/56 --------------------------- ]


Noth 08-28-2005 08:34 PM

Quote:

I had removed it from my kernel because I didn't know what it did
Which is why you should start with a known-good config, especially if you don't understand what the options in the kernel mean. Hell in this case the help text for the option states that it will populate the /proc/sys tree if you have procfs support enabled and to only disable it if you have a very good reason.

Read the hibernate.log file or possibly dmesg, one of them should mention which process refused to freeze. I had it freeze at that point one time myself, attempting to hibernate a second time worked fine. I assume that the sync took too long and caused suspend2 to abort, since there was less work to do the second time it completed just fine.

taboom 08-29-2005 05:52 AM

..by accident, but not it's fixed.

microsoft/linux 08-30-2005 11:20 AM

here's the stuff from hibernate.log, there was nothing in dmesg
Quote:

Starting suspend at Tue Aug 30 11:43:11 EDT 2005
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [10] Executing EnsureSwsusp2Capable ...
hibernate: [89] Executing SaveKernelModprobe ...
hibernate: [91] Executing ModulesUnloadBlacklist ...
hibernate: [97] Executing ChangeToSwsuspVT ...
hibernate: [98] Executing Swsusp2ConfigSet ...
hibernate: [99] Executing DoSwsusp2 ...
hibernate: Activating suspend ...


All times are GMT -5. The time now is 02:36 AM.