What a lot of searching this particular thing has cost me... and it all seems so simple: close the lid (or press Fn/F4) and the machine goes to sleep. Open it up and it wakes up again.
Right... not straight away, because the awakening always resulted in a black screen and the need to just reboot the whole thing.
At first I found postings about fiddling with power management settings (pm deamon), changing options in /etc/default/acpi-support, but that all wasn't it. Then I found a lot of postings on other machines than a Lenovo laptop or my T60p in particular that experienced the same problems. It all seemed to be related to two things: the AMD graphics card (a FireGL 5200 in my case) and Compiz...
Knowing what to look for, I found Dave Hay's blog; a friend and very knowledgeable colleague of mine who found the solution! (And, reportedly, this works on other machines as well).
Dave, in turn, had found a "solution" (work-around is the proper definition here) for this problem as posted by Dave Abrahams here.
Dave has created two scripts:
1. a script ( /etc/pm/sleep.d/00compiz-fglrx ) to kill compiz during the suspend process, and restart it on resume;
2. A second script ( /etc/pm/config.d/50compiz-fglrx-noclear ) is used to stop the Change Foreground Virtual Terminal ( chvt ) command from running until compiz is killed ( to be more specific, it "blacklists" the default /usr/lib/pm-utils/sleep.d/00clear script from running on resume, thus preventing the chvt command from being run ).
And these two scripts magically solved my sleep/resume problem!
These scripts can be found here (Dave Abrahams repository, where he maintains them).
Here are some short intructions on how to install these scripts. If my directions arn't clear, you can cross reference them with Dave Hay's instructions on his blog.
1. download the script files
2. copy them to their respective directories
3. make both scripts executable by setting the execute bit to them. E.g.:
# sudo chmod +x /etc/pm/sleep.d/00compiz-fglrx
4. reboot
5. done!
If needed, you can enable logging on the /etc/pm/sleep.d/00compiz-fglrx script by setting a value to the parameter LOG_FILE_NAME e.g. LOG_FILE_NAME='/home/your_username/suspend.log'.
This newly-created logfile, along with /var/log/pm-suspend.log should help determine the cause of the problem.
Thanks to Dave Hay I managed to get this working (I use it a lot). And with WICD (see my previous post) I have no problems with the wireless network connection hanging over a sleep/resume cycle!
PS. I did copy/paste some of Dave Hay's work in here; thx Dave! ;-)
This blog has moved
14 years ago
No comments:
Post a Comment