I'm running Debian Squeeze on a Dell Studio 1558 laptop, and I have my laptop set to suspend when my lid is closed. Resuming from suspend seems to work but the screen remains blank, forcing me to hard reboot every time. Upon reading this thread: http://forums.debian.net/viewtopic.php?f=5&t=59618, I checked /var/log/pm-suspend.log, and found this:

The previously mentioned thread suggested moving the 99video script out of the way to a new directory. I did so, and my laptop did resume the next time I tried suspending, but it seems very unstable. It won't always resume correctly, and upon resume gnome will often be slow, and sometimes things like audio won't work correctly. I definitely don't feel comfortable leaving my configuration this way. Considering that the log tells us exactly what's wrong (can't get a file descriptor referring to the console), I was hoping for some more direct solutions. Any help would be appreciated.

Last edited by meridionaljet on 2011-06-25 09:42, edited 1 time in total.

The suggestion of moving it out of the way is just a diagnostic exercise, not a solution per se. The solution would be to determine what quirks, if any, provide reliable resume from suspend.

I believe I referenced a couple sites that explain how to do that, but to sketch it out for you, this is how I troubleshoot suspend resume problems.

1) I move those scripts out of the way, the ones under pm-utils/sleep.d--> Create a subdirecty called disabled, and move all those that in the log you see "not applicable" since they don't do anything anyway, then move the two video ones as well. I also move the modules one. --> We can always just move them back and restore default functionality (or in your case, non-functionality)

2) Now when we suspend resume what's happening is pm-suspend is being invoked without any arguments. Go ahead and try it. It probably won't work. But if it comes back up, and switching to another vt (Ctrl+Alt+F1), then back to vt7 (where 'x' is), restores your video, guess what, there's a workaround for that. You need to tell it to do pm-suspend --quirk-switch-vte or whatever the quirk is called.

3) Testing it in this way is rather tedious. So make a script to do it for you, and test the various combinations (ie. quirks) that are available. The easiest way to do this is to copy the video script from disabled back to the sleep.d directory, and rename it something like 99-video-test. Open it up in your favourite editor, and get rid of all the 'if then' or match statements, and comment out all the possible quirks, and just have it apply one quirk at a time. When you stumble upon one that definitely doesn't work, comment it out and try the next. Using the script method makes it a bit easier to track what you've tried, and to test it out under various conditions, like autosuspend after a set amount of time, suspend on lid close, and from the menu. Also, you can test it for a few days and not have to use the terminal as root everytime you want to suspend.

If after some time of troubleshooting you can't find any quirk that works, then it may be time to look at a backported kernel, and whether there are any newer drivers for your video card available. If you have a newer laptop, say, past 6 months or so, chances are it won't be supported very well in Squeeze, since the drivers and kernel were locked down before your laptop was even released.

If you need help with the script, post the contents of the 99 video file in code tags and I or someone else can maybe help you out there. I don't have a debian box with pm-utils anymore, and I'm not sure if the files on Fedora are identical to those in Squeeze.

oOarthurOo wrote:The suggestion of moving it out of the way is just a diagnostic exercise, not a solution per se. The solution would be to determine what quirks, if any, provide reliable resume from suspend.

I believe I referenced a couple sites that explain how to do that, but to sketch it out for you, this is how I troubleshoot suspend resume problems.

1) I move those scripts out of the way, the ones under pm-utils/sleep.d--> Create a subdirecty called disabled, and move all those that in the log you see "not applicable" since they don't do anything anyway, then move the two video ones as well. I also move the modules one. --> We can always just move them back and restore default functionality (or in your case, non-functionality)

2) Now when we suspend resume what's happening is pm-suspend is being invoked without any arguments. Go ahead and try it. It probably won't work. But if it comes back up, and switching to another vt (Ctrl+Alt+F1), then back to vt7 (where 'x' is), restores your video, guess what, there's a workaround for that. You need to tell it to do pm-suspend --quirk-switch-vte or whatever the quirk is called.

3) Testing it in this way is rather tedious. So make a script to do it for you, and test the various combinations (ie. quirks) that are available. The easiest way to do this is to copy the video script from disabled back to the sleep.d directory, and rename it something like 99-video-test. Open it up in your favourite editor, and get rid of all the 'if then' or match statements, and comment out all the possible quirks, and just have it apply one quirk at a time. When you stumble upon one that definitely doesn't work, comment it out and try the next. Using the script method makes it a bit easier to track what you've tried, and to test it out under various conditions, like autosuspend after a set amount of time, suspend on lid close, and from the menu. Also, you can test it for a few days and not have to use the terminal as root everytime you want to suspend.

If after some time of troubleshooting you can't find any quirk that works, then it may be time to look at a backported kernel, and whether there are any newer drivers for your video card available. If you have a newer laptop, say, past 6 months or so, chances are it won't be supported very well in Squeeze, since the drivers and kernel were locked down before your laptop was even released.

If you need help with the script, post the contents of the 99 video file in code tags and I or someone else can maybe help you out there. I don't have a debian box with pm-utils anymore, and I'm not sure if the files on Fedora are identical to those in Squeeze.

Thanks for posting. With 99video still being run, I tried ctrl+alt+F1 and ctrl+alt+F7 and my video came back like you said, so I need that "quirk-switch-vte" or whatever its real name is. I don't know if it's in my 99video script or not. Nothing seems to be commented out, so perhaps I need to add it, but you said you didn't know its real name. I also wouldn't know how to append it to the script properly. Any suggestions? Here's the full 99video script:

#!/bin/sh## Copyright 2006-2007 Richard Hughes <richard@hughsie.com># Copyright 2007 Peter Jones <pjones@redhat.com>## This program is free software; you can redistribute it and/or modify# it under the terms of version 2 of the GNU General Public License as# published by the Free Software Foundation.

# Handle video quirks. If you are having suspend/resume issues,# troubleshooting using this hook is probably the best place to start.# If it weren't for video card quirks, suspend/resume on Linux would be # a whole lot more stable.

You'll need to try them a few times, to see if they work semi-reliably. Run both in terminal as root.

Also, check out this page:http://hal.freedesktop.org/quirk/quirk-suspend-index.html

Neither of those quirks worked. The 2nd one caused the screen to display a gray-colored pattern before suspend, but it would not resume.

I'm unsure how to use what is on the link you gave me. Perhaps if I had a list of quirks to try with trial and error, that would be at least a place to start. Hopefully there is a quirk out there for me that works.

I'm on the stock 2.6.32 kernel. I recently tried installing 2.6.38 with backports and it was unstable, not supporting my graphics card for some reason, and I wasn't in the mood to try reinstalling when it already worked perfectly fine on the stock kernel.

I have, too, some issues with suspend/resume (custom pc : Asrock H67m-itx, i5-2500)The main problem is that the system does not resume after suspend.... in fact I noticedthat during the resume, the HDD and the CPU fan are working, but there is no keyboard (PS/2) nor USB (optical mouse's laser led is not working) nor video output...

I even installed the 2.6.39-bpo.2-amd64 kernel (plus some xorg etc, packs for the sandy bridge) from backports (using now the 2.6.32-5-amd64).

After I reading this thread, I noticed that I have some good results by issuing the "pm-suspend --quirk-vbemode-restore " in this case the resume is ok, just I have to do ctrl-alt- F1 / ctrl-alt-F7 to see the desktop again...

anyway, I don't know really how can I use permanently this quirk, as my effin hardware is displayes like this :

It's quite a while since this thread was last posted. But I just wanted to say, that the solution by meridionaljet solved it for me. I had just removed Nouveau from my squeeze (crunchbang) rig and installed Nvidia's proprietary via sgfxi. After that I could not restore from suspend - but hibernate was fine. After creating a file

/etc/pm/config.d/10no-vt-switch and added the line ADD_PARAMETERS=" --quirk-no-chvt "

as noted, and then testing suspend, it immediately worked. In my case, there was no file 10no-vt-switch in the above mentioned directory. So I literally created it using root and gedit, and just pasted the verbatim line ADD_PARAMETERS=" --quirk-no-chvt " and saved the file. I was skeptical it'd work, but it was picked up and worked immediately. So I'm very grateful.