Hibernate Script
In my experiments with swsusp on my ThinkPad, I initially had been using a homegrown script to do lots of things before and after suspend. I eventually learned that most of that (resetting the clock, unloading lots of modules, etc) wasn't actually necessary, so I trimmed it aggressively. All along, my only issue with swsusp has been occassional lockups within 10 minutes of resuming, so I knew I still had some work to do.
Debian packages the hibernate script, and it has switchable modes for swsusp, acpi sleep, and suspend2, so I thought I'd give it a try and see if it did anything wiser than I did. I also had hoped to someday give suspend2 a try, so this seemed like an easy way to transition.
It seemed to work nicely enough, and even ran for a while. It eventually did crash after a resume, but that has always been so hit and miss -- I've gone 2 weeks without a crash to have it happen 3 resumes in a row. I'm not sure when I'd be able to declare it fixed.
Then I noticed that my sound was getting blocked up and only an unload and reload of all all the ALSA-related modules would fix it. That's no fun. Assuming it came with a kernel upgrade, I spent lots of time rebuilding every stable release kernel from 2.6.14.3 back to 2.6.13. I also switched in and out suspend2 (which doesn't seem to leave swsusp in working order after patching). All the different kernels exhibitted this error, and I knew I hadn't been seeing this issue for that long.
I finally casted a suspecting eye back upon the hibernate script. I disabled module blacklist which unloads a whole list of modules before suspending. This fixed the issue, and sound continued to work nicely after a resume. I've not had time to go back and figure out exactly which module was doing it. I've also not had time to go back to see if suspend2 still works with no modules being reloaded. The script seems to have been primarily written by suspend2 people, so I'm guessing the blacklist may be more important to getting suspend2 to behave. Maybe after I see a few lockups using swsusp, I'll give suspend2 a shot again.
Filed Under: Computers ThinkPad-R40 Linux