Find the answer to your Linux question:
Results 1 to 3 of 3
please if anyone have slackware linux and ibm r51 can you send me your scripts for suspends to ram / hdd. i can't run lid action when i close notebook ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    1

    suspen to disk / ram


    please if anyone have slackware linux and ibm r51 can you send me your scripts for suspends to ram / hdd.
    i can't run lid action when i close notebook my suspend to rma script doesnt start.
    my suspend to ram script is
    Code:
    #!/bin/sh
    
    # if launched through a lid event and lid is open, do nothing
    echo "$1" | grep "button/lid" && grep -q open /proc/acpi/button/lid/LID/state && exit 0
    
    # remove USB 1.1 driver
    rmmod uhci_hcd
    rmmod usbhid
    rmmod ipw2200
    
    # sync filesystem and clock
    sync
    /sbin/hwclock --systohc
    
    # switch to console
    #FGCONSOLE=`fgconsole`
    chvt 6
    #/usr/sbin/radeontool light off
    
    # go to sleep
    echo -n "mem" > /sys/power/state
    
    # readjust the clock (it might be off a bit after suspend)
    /sbin/hwclock --adjust
    /sbin/hwclock --hctosys
    
    # reload USB 1.1 driver
    modprobe uhci_hcd
    modprobe usbhid
    modprobe ipw2200
    # turn on the backlight and switch back to X
    #radeontool light on
    chvt 7
    big thnx for help me
    sorry about my english

  2. #2
    Just Joined!
    Join Date
    Nov 2004
    Posts
    45
    Let me copy the script and see. I might be able to help you. Do not worry about your english; it is all right. Just let me get the script and check some things. The computer I am running also has what is called "advanced power management", meaning that it can do things like a lid-action task. Please wait; a reply will be given within the hour.

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Posts
    45
    The only help I might be able to offer is that the modprobe can list the modules. If you want to see if they are available, you can egrep the output of modprobe -c to determine what modules you have, and then you can try insmod when you want to turn them on again.

    I think that if rmmod removes them, then insmod ought to insert them. When they are inserted, I think that they will start up again when you want them to.

    Also, another way you can try to cause the computer to stop what it is doing may be the use of the sleep command. Once you have saved the system state to memory, you can tell it to sleep, which means that it stops what it is doing. While sleeping, you may be able to tell it that if the lid is opened up, to stop the sleep, restore the information, and bring your computer back to a point as though you were not closing the lid, causing it to stop what it is doing.

    I hope this helps, because I have used the sleep command, and it seemed to work as well, so I guess that you could see what the sleep command does, and use that in the script.

    I am sorry if I was going on, or if I did not address the specific issue.

    I hope this helps.

Posting Permissions

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