Getting Suspend working properly on a Lenovo T61
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 29
  1. #1
    ciphermonk Guest

    Getting Suspend working properly on a Lenovo T61

    Suspend is one of the last things that I had to tackle as far as getting the things that I commonly use working on the T61. Here is how I did it.


    You're going to need to use to use a utility called s2ram. It's part of the suspend package. You can pull it off the 0.5 build of it off of SourceForge but the makefile in that tarball is broken. I've attached the tarball with the makefile fixed so that it'll build cleanly. To get suspend to ram working, you'll need to do the following.


    tar zxvf suspend-0.5.tar.gz
    cd suspend-0.5
    make
    sudo make install


    This will compile and install the s2ram utility and supporting apps. They'll be installed under /usr/local/sbin. With s2ram installed, there are a few house keeping tasks that we need to do before the utility will integrate cleanly into gnome. First we'll need to set the SUID on the installed binaries so that they can be run as a non-root user.

    sudo chmod +s /usr/local/sbin/s2ram
    sudo chmod +s /usr/local/sbin/s2disk
    sudo chmod +s /usr/local/sbin/s2both
    sudo chmod +s /usr/local/sbin/resume
    sudo chmod +s /usr/local/sbin/swap-offset

    With that complete, we'll need to make a quick hack to the script that the "Suspend" menu option calls to put the laptop into suspend mode. The scripts associated with suspend and hibernate are located at /usr/lib/hal/scripts if you're running the 32bit kernel and /usr/lib64/hal/scripts if you're running x86_64. The script that we're interested for suspend is called hal-system-power-suspend. We'll make a backup of the script and then modify it to suit our needs. The following instructions are written for 32 bit users. Just substitute, "lib64" for "lib" if you're running 64 bit Fedora.

    cd /usr/lib/hal/scripts
    sudo cp hal-system-power-suspend hal-system-power-suspend.backup

    Now using the editor of your choice open the hal-system-power-suspend file and modify so that the only thing in the file is the following

    #!/bin/sh

    /usr/local/sbin/s2ram -f -a1


    I've uploaded mine (hal-system-power-suspend.txt) so you can see what the file should look like. At this point reboot your computer. Log back in and try out the "System -> Suspend" menu option. It should suspend your laptop. You can then press power to resume. I've found that everything works including wireless although wireless can take 15 - 25 seconds or so to reconnect. The beauty of this method is that there aren't any modules to unload and reload. It just "works". At this point, you can goto System --> Preferences --> System --> Power Management to setup how/when suspend is enabled; ie; whether the laptop goes into suspend when the lid is closed or not.

    If I've missed anything or if a point needs more clarification, please let me know. :-)
    Attached Files Attached Files
    Last edited by ciphermonk; 9th July 2007 at 04:09 AM.

  2. #2
    Join Date
    Sep 2006
    Location
    UK, Bucks.
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I'm sure I'll find this useful when I get my T61

    How do you like the T61?

  3. #3
    ciphermonk Guest
    Absolutely love it. Best computer I've ever owned bar none. Assuming the quality and support for linux remains, I can't see myself buying anything else.

  4. #4
    Join Date
    Jul 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, thank you for all the helpful posts, Ciphermonk! Fedora 7 x86_64 on my T61 rocks

    For the record, one can also use the pm-utils package from ATrpms to get reliable suspend without having to compile anything by hand. See http://carrot.hep.upenn.edu/wiki/dok...suspend_to_ram

  5. #5
    Beren Guest
    I've tried using these suggestions with a Lenovo R61i without success.

    The laptop /will/ suspend and resume, even without these instructions. However, the backlight fails to come on again.

    Any suggestions?

  6. #6
    Join Date
    Jul 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apparently the T61 and R61i are different enough to break different things during suspend, interesting

    Did you try switching the backlight on again via /proc/acpi/ibm/backlight or /sys/class/backlight/*/brightness?

  7. #7
    Beren Guest
    Quote Originally Posted by vbraun
    Apparently the T61 and R61i are different enough to break different things during suspend, interesting

    Did you try switching the backlight on again via /proc/acpi/ibm/backlight or /sys/class/backlight/*/brightness?
    uhoh. Just tried, no ibm dir, and under backlight brightness is 50. But the backlight is currently off!

  8. #8
    Join Date
    Jul 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You probably don't load the thinkpad_acpi module by default, try modprobe thinkpad_acpi. Although it can't actually turn on/off the backlight you could try to set it to max via echo "level 0" > /proc/acpi/ibm/brightness

    If you have the pm-utils package installed you can try to call suspend with various options, see pm-suspend --help. Some combination might correctly re-initialize everything for you.

  9. #9
    Beren Guest
    pm-suspend --quirk-s3-bios true seems to work properly after modprobing the thinkpad acpi. How do I add that as the default for suspend/hibernate?

  10. #10
    Join Date
    Jul 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "pm-suspend --quirk-s3-bios" should be the same as "s2ram -f -a1".

    In any case, you can configure Fedora's use of pm-suspend with xml config files in /usr/share/hal/fdi/information/10freedesktop, like
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> 
    <deviceinfo version="0.2">
      <device>
        <match key="system.hardware.vendor" string="LENOVO">
          <!-- R61i -->
          <match key="system.hardware.version" prefix_ncase="ThinkPad R61i">
            <merge key="power_management.quirk.s3_bios" type="bool">true</merge>
          </match>
        </match>
      </device>
    </deviceinfo>
    But here I guessed the correct system.hardware.version string for your machine, you might want to check the output of lshal.

    More details are here.

  11. #11
    Beren Guest
    'lshal | grep hardware' provided the proper string. I added it to the existing Lenovo quirks file under 10freedesktop and suspend/resume works fine with pm-suspend now.

    Thanks for the help!

  12. #12
    OlegSokol Guest
    I have a different problem than any I've seen reported. I am running F7 on T61, 14'' wide screen, and use pm-suspend. It suspends, but immediately bounces back, and I cannot find error messages in any of the logs. Has anyone seen this problem before?

    Thanks,
    Oleg

  13. #13
    sweetrain Guest
    Does this work on T60?

    I am newbee, don't wanna mess things up.

  14. #14
    ciphermonk Guest
    Yes... it should work with a T60

  15. #15
    sweetrain Guest

    make error

    I downloaded the tar ball, and got the following make error. Can anyone offer some help here?

    Code:
    #make
    cc -O2 -Wall -c vt.c -o vt.o
    cc -O2 -Wall -DHAVE_INTTYPES_H -DHAVE_STDINT_H -c md5.c -o md5.o
    cc -O2 -Wall -DHAVE_INTTYPES_H -DHAVE_STDINT_H -I/usr/local/include -c encrypt.c -o encrypt.o
    cc -O2 -Wall -I/usr/local/include -c config.c -o config.o
    cc -g -O2 -Wall -I/usr/local/include -c bootsplash.c -o bootsplash.o
    cc -g -O2 -Wall -I/usr/local/include -c splashy_funcs.c -o splashy_funcs.o
    cc -g -O2 -Wall -I/usr/local/include -c splash.c -o splash.o
    cc -g -O2 -Wall -I/usr/local/include vt.o md5.o encrypt.o config.o suspend.c -o s2disk splash.o bootsplash.o  -L/usr/local/lib -lz
    /usr/bin/ld: cannot find -lz
    collect2: ld returned 1 exit status
    make: *** [s2disk] Error 1

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 11
    Last Post: 19th July 2009, 02:58 AM
  2. acpi doesn't work properly on lenovo x60 tablet
    By freund in forum Hardware & Laptops
    Replies: 2
    Last Post: 9th April 2009, 01:44 PM
  3. Lenovo y530 suspend problems
    By avix1000 in forum Hardware & Laptops
    Replies: 0
    Last Post: 23rd March 2009, 12:22 PM
  4. Replies: 4
    Last Post: 24th August 2007, 11:24 AM
  5. Replies: 6
    Last Post: 11th July 2007, 03:19 AM

Tags for this Thread

Posting Permissions

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