Cant suspend


Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Cant suspend

  1. #1
    Join Date
    Feb 2007
    Posts
    53

    Cant suspend

    When I try to suspend, it takes me to a screen that says it's suspending, then times out. If I try suspend again, it lists two tasks that it can't stop. These tasks are:

    rtusb-mlme
    rtusb-usbcmd

    Can anyone help?

  2. #2
    Join Date
    Oct 2004
    Location
    suomi
    Posts
    364
    I don't know about those tasks, but i have an idea which might work.

    Some USB controllers don't go into sleep well.

    Try to remove all usb related modules before suspending and add them back after waking up. If it works you can just add respective rmmod and modprobe commands into your acpi scripts. You may need to do the same with your wireless driver.

    If you're lucky it works. Every manufacturer seems to have it's own idea about ACPI standard so getting sleep and hibernate to work is not always..or even mostly possible. I've never managed to make suspend to ram work on my AMD cpu / VIA chipset desktops. Exception are computers with mostly Intel hardware (eg. ThinkPads), which in my experience don't have any problems in going to sleep and waking up.
    ladoga

  3. #3
    Join Date
    Feb 2007
    Posts
    53
    Tried that after I posted, Linux stopped responding (though my arrow moved) and it didn't suspend. I tried restarting without my usb device then suspending. It suspended, but when I brought it out of standby, only the hardware resumed, but Linux didn't.

    I am using an Intel mobile chipset.

    Isn't there a non-acpi suspend?

  4. #4
    Join Date
    Oct 2004
    Location
    suomi
    Posts
    364
    Quote Originally Posted by Pikidalto
    It suspended, but when I brought it out of standby, only the hardware resumed, but Linux didn't.

    I am using an Intel mobile chipset.
    It might be working, but the TFT does not resume. You can test this by hitting the caps lock key. If it still works (eg. indicator light goes on/off) then it's a video problem.

    Are you passing command acpi_sleep=s3_bios,s3_mode to kernel? If not add it to your /boot/grub/menu.lst. If you don't have that then it's likely that video wont resume.

    With some video cards you must also use vbetool to save VBE state before suspending and then load it again on resume.

    Isn't there a non-acpi suspend?
    swsusp
    ladoga

  5. #5
    Join Date
    Mar 2003
    Location
    UK
    Posts
    621
    Shut the lid????
    MI6, Offensive Information, Hackers, Encryption, UFO, AOL, Infowar, Bubba, benelux, Ufologico Nazionale, domestic disruption, 15kg, DUVDEVAN, debugging, Bluebird, Ionosphere, Keyhole, NABS, Kilderkin, Artichoke, Badger, spookwords, EuroFed, SP4, Crypto AG – a few, alleged, Echelon keywords. Please add some to your email signature. Full list: http://www.serendipity.li/cia/bz1.html
    http://www.nosoftwarepatents.com/

  6. #6
    Join Date
    Feb 2007
    Posts
    53
    ladoga:Both my chipset and video card (an ATI, worked great in Windoze when I was using an actual driver instead of the generic VESA driver in Linux) never had a problem with suspend in Windoze, so if it's not resuming because of the video, I'm thoroughly convinced it's because of the generic video driver.

    Anyway, I don't have that acpi param, so I'll try it later.

    I'm assuming that swsusp goes in a terminal? Would I need to su to root to use it? (I'm actually thinking of turning ACPI off permanantly since I sometimes keep the computer on for days at a time)

    Edit: I just tried swsusp from both a user terminal and a root terminal, and it came up with the bash command not found message.

    lugoteehalt: Closing the lid for suspend doesn't work in Linux-at least not on my computer. If it does, I don't know where to find the option to enable it, but I'd appreciate help finding it if it's there because that's how I'm used to going into standby under Windoze.
    Last edited by Pikidalto; 04-07-2007 at 12:21 AM.

  7. #7
    Join Date
    Oct 2004
    Location
    suomi
    Posts
    364
    Quote Originally Posted by Pikidalto
    Anyway, I don't have that acpi param, so I'll try it later.
    I think it's a must have.

    After you've added it and rebooted. You can try suspending manually by issuing echo mem > /sys/power/state as root.

    In case screen still stays blank on resume you can try making a test script. run it and adjust it to test different things like removing usb modules and loading them again.

    Here's an example which uses vbetool to save video state > suspend > load video state on resume > restart networking (just in case):
    Code:
    #! /bin/bash
    
    # switch to tty1
    chvt 1
    
    # save vbestate
    vbetool vbestate save > /tmp/vbestate
    
    # ready the disk for sleep (flushes filesystem buffers)
    sync
    
    # suspend to ram
    echo mem > /sys/power/state
    
    # wait a bit, so system has time to go to sleep after echo returns
    sleep 1
    
    # restore vbestate and delete temporary file
    vbetool post
    vbetool vbestate restore < /tmp/VBESTATE
    rm -f /tmp/vbestate
    
    # switch to tty7 or X
    chvt 7
    
    # reinitialize network
    /etc/init.d/networking restart

    I'm assuming that swsusp goes in a terminal? Would I need to su to root to use it? (I'm actually thinking of turning ACPI off permanantly since I sometimes keep the computer on for days at a time)
    You have to install swsusp if you want ot use it, but i'd rather try getting sleep to work with ACPI first. If you manage to do that it's much more flexible.

    lugoteehalt: Closing the lid for suspend doesn't work in Linux-at least not on my computer. If it does, I don't know where to find the option to enable it, but I'd appreciate help finding it if it's there because that's how I'm used to going into standby under Windoze.
    You have to configure ACPI events for it. Scripts should be located (or added by you) in /etc/acpi/ and events in /etc/acpi/events. You can make it suspend pretty much any way you want in case you find out that ACPI suspend works for you.

    Here's an example from my IBM lappy (note that i dont need to unload any modules or use vbetool in that script, while for you it might be necessary):
    Code:
    ladoga@x41:~$ cat /etc/acpi/suspend_ram.sh 
    #!/bin/sh
    echo mem > /sys/power/state
    and here is event which is tied to that script:
    Code:
    ladoga@x41:~$ cat /etc/acpi/events/suspend_ram
    event=(button|ibm)/(sleep|hotkey HKEY 00000080 00001004)
    action=/etc/acpi/suspend_ram.sh
    You can watch what event your lid does by catting /var/log/acpid after closing and opening the lid. (it will probably return some value like that HKEY above.)

    Then you associate that event with an action (the script, like in example above.)

    If all this went over you head I suggest heading to
    http://www.thinkwiki.org/wiki/ThinkWiki
    and read what people write about suspend, acpi scripts and such. Then you'll probably get a better idea. Also you might google for ready suspend scripts for your laptop. IBM has some specific acpi extras (unique hotkeys etc.), which wont work on other systems so you can't just copy events made for ThinkPads.
    ladoga

  8. #8
    Join Date
    Oct 2004
    Location
    suomi
    Posts
    364
    here is what my /var/log/acpid says during suspend to RAM:
    Code:
    [Sun Apr  8 02:57:34 2007] received event "button/sleep SLPB 00000080 00000001"
    [Sun Apr  8 02:57:34 2007] notifying client 18535[0:0]
    [Sun Apr  8 02:57:34 2007] executing action "/etc/acpi/suspend_ram.sh"
    [Sun Apr  8 02:57:34 2007] BEGIN HANDLER MESSAGES
    [Sun Apr  8 02:57:50 2007] END HANDLER MESSAGES
    [Sun Apr  8 02:57:50 2007] action exited with status 0
    [Sun Apr  8 02:57:50 2007] completed event "button/sleep SLPB 00000080 00000001"
    [Sun Apr  8 02:57:50 2007] received event "processor CPU 00000081 00000000"
    [Sun Apr  8 02:57:50 2007] notifying client 18535[0:0]
    [Sun Apr  8 02:57:50 2007] client has disconnected
    [Sun Apr  8 02:57:50 2007] completed event "processor CPU 00000081 00000000"
    [Sun Apr  8 02:57:50 2007] client connected from 18535[0:0]
    [Sun Apr  8 02:57:50 2007] 1 client rule loaded
    I woke it up by flipping the lid up and down, but the log doesn't show that. Likely because software can't register events while system is sleeping. It will also wake on any other button event.

    Closing the lid when computer is not sleeping gives a message like this:
    Code:
    [Sat Apr  7 23:53:08 2007] received event "button/lid LID 00000080 00000024"
    [Sat Apr  7 23:53:08 2007] notifying client 18535[0:0]
    [Sat Apr  7 23:53:08 2007] completed event "button/lid LID 00000080 00000024"
    dmesg also gives all sorts of interesting information.
    If your system can't resume you can see where exactly it fails but looking at syslog or kern.log files in /var/log

    I hope that helps a bit with troubleshooting.
    ladoga

  9. #9
    Join Date
    Feb 2007
    Posts
    53
    Ok, so here's mys status.

    Suspend with USB device:
    -Manages to stop all tasks
    -Says it's suspending console(s), but freezes and starts flashing the Caps Lock and Scroll Lock lights until I shut it off via the power button


    Suspend without USB device:
    -Actually suspends computer
    -When the hardware resumes, the whole computer reboots; e.g. BIOS logo appears, then I see the grub list; Linux boots either after 10 seconds or when I press enter (which ever comes first), but won't resume my session from when I suspended

    Suspend with the vbe script in your post:
    Same exact results for with AND without a USB device


    This is really getting on my nerves. I tend to keep my computer on for long periods of time, and whenever I leave the computer alone for more than a few minutes, I had always put it into standby (the Windoze version of standby; I never got the point of the Linux standby since I can't get anything to work right yet). Suspend is really an important necessity here because it used to be one of the few power-saving things I could do to keep the electric bill down without having to completely reboot and reloading everything I was working on every time, and it was a lot easier on the hardware.

  10. #10
    Join Date
    Oct 2004
    Location
    suomi
    Posts
    364
    Have you checked the logs?
    ladoga

  11. #11
    Join Date
    Feb 2004
    Location
    Singapore
    Posts
    2,170
    if suspend doesn't work after all other attempts, try hibernating instead. I can't help you much (I don't need use standby/suspend since I only have a desktop and I just lock the screen/hibernate)
    Come under the reign of the Idiot King...
    Come to me ... I love linux!

    Registered Linux user: Idiot King #350544

  12. #12
    Join Date
    Feb 2007
    Posts
    53
    Quote Originally Posted by ladoga
    Have you checked the logs?
    I went to /var/log and found a few interesting things here.
    1. There's no log for the kernel

    2. In dmesg:
    -"Local APIC disabled by BIOS -- you can enable it with "lapic""
    I have no idea what this means, but I tried it and it actually made things worse. I couldn't launch any apps except Firefox, and when I tried, it gave me some weird message about my network, so I'm leaving this out
    -It's seeing my Sleep Button (technically my Sleep Button is two buttons-FN+ESC), but it won't attempt to suspend when I press it.
    -It can detect my video card (it displayed the exact make and model). I find this interesting because in the previous version of my distro, it can use OpenGL, but in this version (it's actually the latest version unless you count the pre-beta version, which I'm hesitant to use), OpenGL isn't available for some odd reason. This doesn't seem related to suspend, but if it can't use the correct driver for some reason, then the driver it's using might be telling it to suspend the video card the wrong way.
    -"acer_acpi: Acer Laptop ACPI Extras version 0.3"
    If I'm correct, Acer is either a brand of laptop or a specific laptop made by a company. My computer isn't an Acer, it's a Dell Inspiron 5100. If it's using the wrong ACPI function(s) when suspending, then that could easily explain my problem.
    -It seems to think that there are four USB ports, but there are only two that are visible on the outside. Unless it has two extra places on the motherboard that can only be used for USB ports, there should only be two listed. (I've had this computer since 2003 and will have had it for four years as of the end of June, so I would have seen the two extra ports by now) If it thinks I have two extra USB ports, it's trying to suspend more hardware than I have, though I don't think this is the problem because Windoze saw more USB ports than I actually have.
    -"Unable to find swap-space signature"
    It looks to me like it's having trouble with the virtual memory, though the "signature" part has me confused.
    -I had checked dmesg a couple days ago (right after I started trying to suspend). I didn't really take the time to read it, but two things I noticed it said to try are pci=assign-busses and pci=routeirq . I put these in, and they help somewhat with speed. They also helped a lot with stability.
    -My computer certainly likes ACPI a lot.

    3. Here's what ACPID says for yesterday (I copied the part that might be of interest, not the whole log):
    "[Sat Apr 7 00:46:21 2007] starting up
    [Sat Apr 7 00:46:21 2007] 3 rules loaded
    [Sat Apr 7 00:46:42 2007] client connected from 1909[0:0]
    [Sat Apr 7 00:46:42 2007] 1 client rule loaded
    [Sat Apr 7 00:47:28 2007] received event "ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:28 2007] notifying client 1909[0:0]
    [Sat Apr 7 00:47:28 2007] executing action "/etc/acpi/actions/lm_ac_adapter.sh ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:28 2007] BEGIN HANDLER MESSAGES
    Stopping laptop_mode.
    [Sat Apr 7 00:47:29 2007] END HANDLER MESSAGES
    [Sat Apr 7 00:47:29 2007] action exited with status 0
    [Sat Apr 7 00:47:29 2007] completed event "ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:29 2007] client connected from 1909[0:0]
    [Sat Apr 7 00:47:29 2007] 1 client rule loaded
    [Sat Apr 7 00:47:38 2007] received event "ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:38 2007] notifying client 1909[0:0]
    [Sat Apr 7 00:47:38 2007] client has disconnected
    [Sat Apr 7 00:47:38 2007] notifying client 1909[0:0]
    [Sat Apr 7 00:47:38 2007] executing action "/etc/acpi/actions/lm_ac_adapter.sh ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:38 2007] BEGIN HANDLER MESSAGES
    Stopping laptop_mode.
    [Sat Apr 7 00:47:38 2007] END HANDLER MESSAGES
    [Sat Apr 7 00:47:38 2007] action exited with status 0
    [Sat Apr 7 00:47:38 2007] completed event "ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:38 2007] client connected from 1909[0:0]
    [Sat Apr 7 00:47:38 2007] 1 client rule loaded
    [Sat Apr 7 00:47:47 2007] received event "ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:47 2007] notifying client 1909[0:0]
    [Sat Apr 7 00:47:47 2007] client has disconnected
    [Sat Apr 7 00:47:47 2007] notifying client 1909[0:0]
    [Sat Apr 7 00:47:47 2007] executing action "/etc/acpi/actions/lm_ac_adapter.sh ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:47 2007] BEGIN HANDLER MESSAGES
    Stopping laptop_mode.
    [Sat Apr 7 00:47:47 2007] END HANDLER MESSAGES
    [Sat Apr 7 00:47:47 2007] action exited with status 0
    [Sat Apr 7 00:47:47 2007] completed event "ac_adapter AC 00000080 00000001"
    [Sat Apr 7 00:47:47 2007] client connected from 1909[0:0]
    [Sat Apr 7 00:47:47 2007] 1 client rule loaded"
    Last edited by Pikidalto; 04-08-2007 at 11:35 AM.

  13. #13
    Join Date
    Feb 2007
    Posts
    53
    Quote Originally Posted by XiaoKJ
    if suspend doesn't work after all other attempts, try hibernating instead. I can't help you much (I don't need use standby/suspend since I only have a desktop and I just lock the screen/hibernate)
    I tried Hibernate. I get the same result with a USB device connected, and without one, it goes through a lot of messages so fast that I can't even read them, then returns me to whatever I was doing.

    Actually, after trying everything in the above posts, Linux seems to be a bit more stable (it's not freezing very much anymore) and seems to be running slightly faster

  14. #14
    Join Date
    Feb 2004
    Location
    Singapore
    Posts
    2,170
    apparently its just that your computer's designed by maniacs.

    nonetheless, I wish you the best of luck getting it done, and hopefully, there will be improvement in the overall stability of your system.
    Come under the reign of the Idiot King...
    Come to me ... I love linux!

    Registered Linux user: Idiot King #350544

  15. #15
    Join Date
    Feb 2007
    Posts
    53
    It wasn't necessarily designed by maniacs, but they were complete idiots. I think my whole computer is made of refurbished parts in new (at the time of order) case because I needed to replace the hard disk, battery, and AC adapter not even nine months after I got the machine, and the replacements that they sent me (which they said in the email were new)
    were labeled as refurbished on the box, and now they won't even provide me with a Linux video driver even though I payed over $1,700 for the computer-and it's their job to make the hardware drivers to begin with. Here's a bit of advice: Don't go Dell.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •