Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Hardware Software Linux

ACPI and S3 Sleep on the Linux Desktop? 104

niko9 asks: "After reading that development would be ramped up in the ACPI department of the 2.6 kernel series, I was hoping to finally get the one feature that Mac and Windows users have been enjoying for more than a few years: S3 Sleep, also known as Suspend-To-Ram. How important is ACPI and the sleep states on the desktop to you? Are there any ACPI S3 success stories on the Linux desktop out there? If yes, what hardware are you guys using? I would also welcome comments from Mac and Window users concerning their use of sleep on the desktop."

"For those of you not familiar with S3, this feature allows you to save the current state of your machine to RAM, power down all of your internal devices (PCI cards, AGP, CPU) and shut down down all your fans. The machine is now in a deep sleep, using but only a few watts to keep the RAM refreshed. Pressing a key or the power switch brings you back to your desktop and applications in a matter of seconds. In contrast to leaving your machine on constantly, and with today's high wattage processors and graphics cards, using S3 is not only environmentally friendly, but can save you more than a few bucks on your electric bill. Getting Linux and ACPI working is a whole other story. I have had no luck getting ACPI sleep states working on an Intel D875PBZ motherboard, even with extensive help from the gentlemen on the ACPI mailing list."

This discussion has been archived. No new comments can be posted.

ACPI and S3 Sleep on the Linux Desktop?

Comments Filter:
  • by josefcub ( 212738 ) on Monday May 10, 2004 @10:29PM (#9113250) Journal
    I have never, ever, in all the years of using Windows or Linux had suspend, either S3 or suspend-to-disk work properly. None of the machines (many of them at this point) ever resumed, forcing a hard reset, fsck, and all the usual attendant issues. It also doesn't matter the vintage of the machine, or even the vintage of the OS. My experience (or lack of a successful one) spans everything from Linux kernel 2.0 and Windows 95 to kernel 2.4 and Windows 2000 Pro.
    • by mdielmann ( 514750 ) on Monday May 10, 2004 @10:52PM (#9113389) Homepage Journal
      I'm supplied with an IBM laptop through work, previous was Win2KPro, current is WinXPPro. I didn't have (many) problems with the 2K box - about once a week, it would require a full reboot, and certain (non-standard) apps would fail in one way or another after S3 or suspend-to-disk. Overall, it was worth the more-regular-than-I-hoped-for reboots. My WinXP works fine for both S3 and suspend-to-disk, no noticeable issues requiring reboots, and same issues with the non-standard apps. I only reboot once or twice a month now, mostly to clean up the garbage from apps that don't quite behave (which probably isn't a suspend issue).

      Not to say your experience is an exception. These are the first two computers where I've had it work, and only in the last 3 years. There were others where I work that didn't behave sufficiently to do S3 at all.
    • I have never, ever, in all the years of using Windows or Linux had suspend, either S3 or suspend-to-disk work properly.

      I've got a generic AMD Athlon machine I built from pieces with a recent MSI motherboard running Windows XP Pro that goes in and out of S3 perfectly. Press the power button or select suspend and the system saves the state to memory in a couple of seconds and powers off all the peripherals including the fans. Press power again (don't have a USB keyboard to try, but PS/2 keyboard doesn't

    • From what I've seen, S3 didn't work well til 2000, and only on certain configurations. When XP rolled around, both worked on every single machine I tried.

      I know that doesn't help you, but that's my experience.
    • by FattMattP ( 86246 ) on Tuesday May 11, 2004 @12:30AM (#9113955) Homepage
      Interesting. That doesn't reflect my experience at all. I have an IBM Thinkpad T30 running WinXP. I suspend it all the time. It's better than rebooting and I rarely have a problem.

      I suspend two or three times a day: I suspend it before I go to sleep, and before I leave work to take it home. Sometimes I listen to MP3s in the morning while I'm getting ready for work and I suspend it when I leave to go to work. I reboot maybe once every month, sometimes I go longer without a reboot. This is using a real mix of software: Cygwin, xemacs, resin, Oracle 9, Mozilla, SecureCRT, Winamp, Photoshop, MS Outlook, Cisco VPN client, OpenOffice, Propellerheads Reason, ACID Pro, and even some games (Warcraft III, Diablo II, Dungeon Siege). All work without causing any problems and without needing to reboot.

      I'd say that you have faulty hardware if you haven't been able to get anything to suspend with all of those operating systems.

      • I have a T30 too. The last time I tried ACPI on it under Linux, it would either kernel panic or fail to find things like the power adapter or batteries - leaving ACPI worthless for power monitoring.
    • Actually, a DELL Inspiron 7500 notebook worked very well under RH8.0 for a suspend to disk (hibernate). It also worked ok under Windows 98SE and 2K but sucked under 95.

      It can b done and slowly a lot of big companies want it for their desktops. Power and especially room heat are issues now, especially outside the US where energy prices are higher. If a business PC isn't working, particularly overnight or at weekends then it should sleep.

    • The old Panasonic CF-41 (a 486 based laptop) has a sleep function that works perfectly with any OS. I'm not sure how it works, but it works really well. Because of it, my 486 laptop's uptime is now better than my server.
    • You've had bad hardware.

      My first desktop (IBM something or other) was a 486/100 running Windows 95. Suspend and sleep worked great.

      My first laptop (Fujitsu Lifebook 765 Dx) was a P166 running Windows 95 OSR2.1. Suspend, sleep, and hibernate (suspend to disk) worked flawlessly. It's now running DragonflyBSD; suspend and sleep still work.

      My work systems running Windows 98, 2000, and XP all suspend and sleep without problems (Seanix, Compaq, and Dell systems). My laptop running FreeBSD 5.x has working s
  • by kdm ( 21948 ) on Monday May 10, 2004 @10:33PM (#9113275)
    Using a stock 2.6.x kernel, I've gotten my Dell Latitude C610 to sleep fully and come out of it 95% of the time. The other 5% of the time I get weird video issues. I've not taken the time to debug this properly yet. I use "echo 3 > /proc/acpi/sleep" to put it to sleep, and pressing the power button brings it out.

    Hope this helps.
    • HOW?!?! I know this is slashdot, and maybe not the place to ask for help, but I have a Dell Latitude Cpx and I would kill to get some help with this process. My experiences have been quite negative and I used to have this on Win2K, so I crave it. Then again I have some weird hardware issues we might not share, but please, email!
    • by blixel ( 158224 ) on Tuesday May 11, 2004 @07:04AM (#9115170)
      I use "echo 3 > /proc/acpi/sleep" to put it to sleep

      Is that a requirement?

      I can just hear myself on the phone with my mom "OK ... click on your K menu, go to system, tools, now click on Konsole. Now type "su" and hit enter. Now type your root password. No, your *root* password, not your user password. Of course I don't know what *your* root password is." .... an hour later ... "OK now type echo, that's e like edward, c like cat, h like house, o like oliver. Now press the space bar, now type the number 3, now press space again, now type the greater than sign. Hold down shift and press the period key. Now press space again. Now forward slash. That's the one on the same key as the question mark. Now type proc. That's p like postal, r like romeo, o like oliver, c like cat. Now type another forward slash, again that's the one with the question mark. No mom, no space. Now type acpi. That's a like apple, c like cat, p like postal, i like illusion. Now type another forward slash. No mom, no space. Now type sleep. That's s like scott, l like linda, e like edward, e like edward - yes mom - 2 e's, p like postal. Now press enter." ..... "OK. You must have made a typo. Let's try again..."
      • I can just hear myself on the phone with my mom ...

        My mom doesn't even want to suspend to RAM you insensitive clod.

      • Ummm
        1) Havn't you heard of menu items?
        2) Havn't you heard of shell scripts?
        3) If you are supporting your mom and she doesn't have a network connection and vncserver running on her machine you are stupid :}
        • 1) Havn't you heard of menu items?
          2) Havn't you heard of shell scripts?
          3) If you are supporting your mom and she doesn't have a network connection and vncserver running on her machine you are stupid :}


          Yeah - you are right. Silly me. All of that is so much easier than the hardware simply suspending to RAM when the lid is closed as part of the Laptop's default behavior.
          • The point of ACPI is that the software has a say in what happens -- that is the failing of APM (the hardware controls it all).

            It's very trivial to configure acpid to switch to S3 when the lid shuts, and I'm just surprised more distributions don't ship like that out of the box (though I have a feeling Mandrake does).
          • Oh, man! It's YOU 3, SLASHBOTS 0. Those were awesome. Um yeah, root console, echo ...something, shell scripts, and the thought of getting your mom to set up a vnc server is great. Yet again someone reminds the technophiles what it's like in the real world.

            I don't have a laptop, so I had never tried a sleep or suspend mode until fairly recently. I've never tried it on Linux. I did it several times on my WinXP machine, and stopped because it would only come out of it half the time. I wonder why it is
      • and once you finally get her computer to sleep, she asks "Now where do I go to check my emails?"

        You're such a patient son! I just tell her to turn it off at the power strip, and that the filesystem check is the normal startup procedure.

  • by Zorton ( 2520 ) on Monday May 10, 2004 @10:33PM (#9113277)
    As I type this I have a uptime of about 4 days. I have found on mac systems the sleep and resume features are excellent. I never turn off this machine and just wake it from sleep all the time. Works great. My sisters x86 though.....not so great, resuming take forever and sometimes the thing just crashes on resume.

    • I've done the same with powerbooks since my 540c. Sleep it, everything goes off, leave it sitting for a few days - then wake. Works about 95% perfect on the old powerbooks (there's the odd time sleeping won't complete), and 100% on anything I've used with OSX. Going from working to folded up & sleeping under 10 seconds has been VERY useful over the years. I know a few mac people with TiBooks and AlBooks with natural uptimes in the 10-15 days. They just don't need to be turned off, so they don't go off.
  • Mandrake 10 was crashing my nforce2 board all the time, read slashdot actually, that turning off acpi and apic fixed the issues. It did, my AMD box is stable now. Not sure why its on by default it not stable, not a good experience for a new distros with 2.6 kernels.

    A buddy of mine was having the same issue with Gentoo, so I think its a common issue. Wonder how the BSD kernel support for nforce is stable?

    I've stuck with the 2.4 kernel on my servers for now, if my workstation isn't stable on 2.6.x, its not
    • Windows 95 was often accused of being incredibly unstable, on through Windows 98. ME got weird, but many found it more stable. And with XP and 2000 it seems to have gotten rock solid. Is this the kernel maturing? Only slightly.

      Drivers for all versions of Windows and Linux run in ring 0. They have the capability to bring the kernel down just as hard as a bug in the memory manager. This is the cost of not running a true microkernel, but it's been found often too hard to efficiently transfer large am

      • Heck, your machine might even have been in a stable state until you brought it awake from hibernating.

        *sigh*, yes this, methinks, happened to me. I have a dual-boot WinXP Pro/Gentoo Linux (2.6.3-Current) system that went into hibernation in Windows and I brought it back up in Linux--not realizing the peril therein. I still (1 month later) can't get the WinXP mode to boot. Any run level results in the damn thing hanging--before the system starts to boot up.

        I mean, I use Grub to boot into Windows, and th

    • You will be happy to know that the acpi-problem with the nforce2 chipset has been solved in Kernel 2.6.6. NVidia disclosed the info about what goes wrong and it is in the kernel now.
      • You will be happy to know that the acpi-problem with the nforce2 chipset has been solved in Kernel 2.6.6. NVidia disclosed the info about what goes wrong and it is in the kernel now.

        Very cool ... I was not aware of that. I've been checking the changelog for every new kernel, including the 2.6.6 kernel, and I've yet to see where this issue was addressed. But I'll take your word for it and give the 2.6.6 kernel a try on my ASUS nForce2 board later today when I get some time.
  • I've only had my iBook a few months, but in that time I've rebooted/shut it down... three times? four? Usually only when an Apple software update requires me to.

    Its just so much easier unplugging everything and closing the screen than it is waiting for the machine to boot down, and of course the same goes for booting up.

    I wouldn't do without it now.

    (Last "reboot" was two weeks ago, after an apple update)
  • by Chasing Amy ( 450778 ) <asdfijoaisdf@askdfjpasodf.com> on Monday May 10, 2004 @10:44PM (#9113345) Homepage
    S3 suspend works fine for me under WinXP, but I can't say that I've ever used it except to see if it really worked. I don't really know anyone who's ever used it except on a laptop that suspends when the lid is closed, and they only use it them because that's default behaviour for their hardware.

    I'm sure it's a valuable feature for those who really use it, and that there are many advantages that people will point out like saving application states etc. But for me and everyone I know, except the laptop users I mentioned whose hardware automatically suspends, we either have our PC's on 24/7 or turn them off when not in use. Mine is on 24/7 for broadband filesharing, while the average users I know just turn their computers on and off as needed.

    Personally, I found myself wanting an application-specific suspend-to-disk option for saving Mozilla tabs whenever I have to reboot every few weeks for hardware/driver/general-wonkyness reasons, since I have the nasty habit of queueing up a bunch of pages for later reading. But I've never had a reason personally to want to suspend the whole system state.
    • You can use Tab Browser Extentions to save your tab session [sakura.ne.jp], either on log off automatically, or manually. Be warned, there is some slightly weird menu placement, partially due to the fact that the author is not a native English speaker. I believe Opera does this automatically, with Nordic instead of Japanese authors.

    • I've used hibernate in WinXP for my desktop, and exclusively used suspend/hibernate on my laptop when it was running Windows. I'm sorta pissed that now I have my laptop running Linux that suspend and hibernate don't work :(
      • I'm very fond of suspend to disk. Suspend to RAM I don't care for at all.

        I prefer to be insensitive to power loss and pay a small penalty in startup time. If I've hibernated a system, I know that if I leave the laptop unplugged too long, or if the PC gets moved and consequently unplugged, I'm fine. I move hardware more often than I'd like. LiveCDs are fun to play with too. Don't lose your state, and pay less of a penalty in boot time.

        Long before hibernate was commonly available, I thought that suspend to
    • There's also "session saver" which is WAY more reliable than tab extensions for doing that. Tab extensions does about a bazillion other cool things, but it can't seem to reliably save the tabs when you close/crash.

      Session saver is so smart that it can figure out when you have multiple windows with multiple tabs and your browser crashes.
    • Or you could just bookmark the tab set. That's what I do.
    • At least in the newer versions of Mozilla you can bookmark a set of tabs... Works great... just have to remember to do it :}
    • If the average user knew that they could get to a working system with all their applications and files open just like they were the night before, in a matter of seconds, I'm sure alot more would make use of it, and almost demand it as a standard feature.

      The sleep states aren't widely advertised in the Windows world. Mac users are, from what I read, fond of the sleep mode. That fact that the LED on Mac machines "snores" (flashed briefly with and increasing intesity, followed by a decreasing intensity) reall
  • I have been putting my Mac (G4/400) to sleep instead of shutting down for at least 2 years. With Panther on my machine, I restart every 2 months or so. I don't log out very often either (like every 2 months or so).

    sleep is good. If I can't get any, at least my computer can.

    seriously, it wakes up in 4 or 5 seconds. It takes almost a minute to restart.

    Panther seems to restart a lot faster than Jaguar. Anyone else notice this or am I just hallucinating again?
  • I for one, hope that more information gets posted about this. I think that embedded systems could benefit significantly from this.

  • I've had a pair of IBM Thinkpads. Whenever I've tried to enable ACPI (last on kernel 2.4.18), one of the following occured:
    • Kernel Panic at boot
    • Failure to recognize the power management hardware, such as batteries
    Failing to get ACPI working, I've had resonable success with using APM sleep and suspend-to-disk on those machines. Just my two cents. YMMV
    • I think kernel 2.4.18 was before the ACPI4Linux [slashdot.org] project's full source was integrated into the kernel. Prior to whenever that happened, the kernel's ACPI implementation sucked horribly. Now it sucks a bit less.

      You should try patching the kernel with their patches, although older versions are kinda hard to find it looks like.
      • I'm currently running 2.4.20 due to 3rd party module constraints, but I'll give it a try again. Thanks. I had just given up on ever getting ACPI to work and stuck with APM.
  • by swillden ( 191260 ) * <shawn-ds@willden.org> on Monday May 10, 2004 @11:43PM (#9113729) Journal

    ACPI is apparently really, really hard to get right, and not just for the OS developers. Hardware vendors typically screw it up, too (which causes even more pain for the programmers).

    APM, however, is pretty well-supported in Linux. On all five of the machines I've used as "mine" in the last three or so years, suspend has worked just fine -- as long as I disabled ACPI and used APM instead.

  • by eyeball ( 17206 ) on Monday May 10, 2004 @11:53PM (#9113780) Journal
    Someone please correct me if I'm wrong, but I don't think you can call what Mac laptops do "sleep to disk". I have a G4 Powerbook, and when the lid shuts, it suspends, but from what I understand the power manager uses just a bare minimum of power to keep the data in ram, and nothing goes to disk. The whole process is instantaneous -- sleeping as soon as the lid is shut, and returning before I can get the lid fully open. I haven't even managed to fake it out by closing and opening quickly.

    I'm also impressed that included in this is logic to notice hardware changes when the system is asleep (ok, more like cat-napping). For example, I typically shut the lid and disconnect my network cable at work, then bring it home and wake it to my WiFi router, OSX will automatically sense and join the new network (same in reverse). The network libraries are robust enough to not cause terrible application-level errors or crashes.

    Same goes for recognizing the plugging in or removal of an external monitor during sleep, as well as all the USB devices I've tried.

    I can't say I tried disconnecting a Firewire drive or PCMCIA device during sleep, which I won't try since they probably should be properly dismounted. But I bet it would mount a device while asleep (or very shortly after waking).

    Granted if you took the battery out it would probably dump everything in ram, unless there's some kind of internal backup battery specifically for last minute graceful shutdown everything. But I guess that's the trade-off for not having to wait while half a gig of ram transfers to and from the disk.

    Personally I would say Linux is a good year from this level of sleep mode, but then I don't follow kernel dev too closely, so who knows.

    • by drsmithy ( 35869 ) <(drsmithy) (at) (gmail.com)> on Tuesday May 11, 2004 @01:34AM (#9114215)
      I'm also impressed that included in this is logic to notice hardware changes when the system is asleep (ok, more like cat-napping). For example, I typically shut the lid and disconnect my network cable at work, then bring it home and wake it to my WiFi router, OSX will automatically sense and join the new network (same in reverse). The network libraries are robust enough to not cause terrible application-level errors or crashes.

      Same goes for recognizing the plugging in or removal of an external monitor during sleep, as well as all the USB devices I've tried.

      FY(and others)I XP also does all this quite well IME. Win2k somewhat less so. I've no experience using Windows 9x on laptops.

      The only thing that gets a bit flaky IME is detecting external monitors when multi-monitor (ie: spanning) is being used. My D600 used to often either not detect the monitor had been unplugged (hence leaving the bit of the Desktop that had been spanned inaccessible) and/or not detect when a new monitor had been plugged in (hence requiring eith er a visit to Display Properties or another Sleep/wake cycle).

      Granted if you took the battery out it would probably dump everything in ram, unless there's some kind of internal backup battery specifically for last minute graceful shutdown everything. But I guess that's the trade-off for not having to wait while half a gig of ram transfers to and from the disk.

      PBs seem to have a backup battery to keep the RAM refreshed while the main battery is not present. How long it lasts I never checked accurately, but my old PB 667 certainly used to survive the typical trip through the X-Ray machine suspended - so at least a few minutes (it won't keep for a day, however).

    • I agree with you, as far as I know, Macs don't sleep to disk. One nice feature is that certain applications, like iChat are notified when the machine goes to sleep and automatically disconnect. I wish ssh would be able to somehow handle a connection when the machine goes to sleep.

      The problem in disconnecting devices like drives while the machine is sleeping is that the device has been shutdown (in particular if, like for an iPod it gets the power from the bus) and parked, but the filesystem has not been u

      • I wish ssh would be able to somehow handle a connection when the machine goes to sleep.

        As long as the session is quiescent while my laptop is asleep, and I wake it back up within a few hours, I very rarely have a ssh session fail to respond.

        Just a few minutes ago, I woke my powerbook back up after it had been asleep for a half hour or so. Once it reconnected to my airport base station, all of the SSH sessions I had been running were fine. These included sessions to local machines, as well as a c
        • That's fine as long as your IP address hasn't changed... think work -> home...

          Ideally you would have some (dare I call it intelligent?) way of determining when to disconnect ssh sessions on suspend. I simply cannot think of one, short of using different suspend buttons for "Sleep during lunch" and "I'm going home".

          Just my $0.02...

        • I will admit to being a screen junkie.

          I have half a dozen login sessions on my box at home running under screen for *months* at a time.

          I can go to work, ssh to my home box, type "screen -rd" and get back to where I left off at home. The apps continue to run just fine and as they are attached to a pty, xterm resizes (or a re-attach from a different sized xterm) are not a problem. (except for btlaunchmanycurses.py Grrrrr...)

          What gets really handy is when you use screen-aware apps like elinks, and you get t
    • Personally I would say Linux is a good year from this level of sleep mode, but then I don't follow kernel dev too closely, so who knows.

      Linux on x86, perhaps, but that's at least partly a hardware/APM/ACPI issue; PCs have historically had big problems with any sort of sleep mode, regardless of OS. Linux on Mac hardware, on the other hand, has much the same suspend-to-RAM behaviour as MacOS.

      I've used Linux 2.4.2x and 2.6.5 on my Powerbook; both do pretty much what you said, but they're slower to sleep and
    • I'm also impressed that included in this is logic to notice hardware changes when the system is asleep (ok, more like cat-napping). For example, I typically shut the lid and disconnect my network cable at work, then bring it home and wake it to my WiFi router, OSX will automatically sense and join the new network (same in reverse). The network libraries are robust enough to not cause terrible application-level errors or crashes.

      My Debian laptop does this -- when I shut the lid it suspends to RAM and I r

  • Tecra 8000 Success (Score:3, Informative)

    by Time Doctor ( 79352 ) <zjs@zacharyjackslater.com> on Monday May 10, 2004 @11:58PM (#9113809) Homepage Journal
    I've been using my Toshiba Tecra 8000 with suspend-to-ram (S3) under Gentoo for months. It was difficult at first to get it to work, but after scripting the acpi myself, it has consistently worked. Right now I have it resuming via the power key. You can find all sorts of great hints for using ACPI/Sleep modes via the gentoo forums [gentoo.org], even if you aren't using gentoo, the acpi script examples there are nice.
  • I tried for a couple hours to get it working, with a custom-built Wolk [sf.net] kernel, RedHat [redhat.com] 9, and a Shuttle [shuttle.com] SN41G2 XPC. While I was finally able to get ACPI working like it should, I never did manage to get suspend to ram working.
  • I only turn off my G4 and iBook for software updates, and put them to sleep when they are not in use. While there is some lag on wake (~1 sec. on iBook, 2-4 sec. on G4) this is far preferable to turning the machines off or keeping them awake. I never have any problems with it.

    -
  • I have an apple powerbook g4 (tibook dvi) and can't praise the sleep function highly enough. Sleep on this thing is well sorted out.

    You can just close the lid at any time, while playing a movie, while listening to music, etc.. and it just works. A little LED begins to gently pulse on and off and the machine is in a sleep state.

    I have left it in this sleep state for really long periods of time, like a day or two. After coming out of sleep, it doesn't seem to have discharged the battery at all (always lik
    • 6-7 years ago, I would've agree that Powerbooks were the best in the biz at power management. However, now days basically any name brand PC laptop has caught up -- none of your feats is going to bowl over any peecee users here. Plus the Centrinos have better battery life nowdays.

      Also, I have a Lombard G3 and the power management support under OS X is sorta half-assed and was terribly buggy until 10.2. Even under 10.3 it's less reliable than my PC laptops (video corruption on wakeup sometimes). Its' not the
  • Unless I'm going away on holiday or something, my laptop and my desktop don't get turned off, I use S3.

    I've got my laptop set up so when I press the power button, it enters "standby" (Oh, this is WinXP), and its off, almost instantly.

    When I want to use it again, I press power, and its on, in about 2 seconds. I reboot maybe once a month, generally for config changes.

    I don't know how much power S3 uses, but its not much. My battery is fuct, and I only get 30mins of use now, but I've left my lappy on stan
    • Oh yeah, S3 on linux. For me, S3 support is a must-have. I've considered moving my laptop to linux for a couple of years now, and the major reason I haven't is the lack of proper power managerment support. If its finally there, then I'm installing linux NOW. Can someone advise me what distro is the best for laptop support?
  • Inspired me.. (Score:5, Informative)

    by zcat_NZ ( 267672 ) <zcat@wired.net.nz> on Tuesday May 11, 2004 @01:02AM (#9114094) Homepage
    I just decided to see what would be invloved in getting this to work, and was surprised to find that it's remarkably simple.

    Compile a kernel with suspend-to-swap and acpi.

    Install acpid (apt-get install acpid)

    in /etc/acpi/powerbutton.sh, put; /sbin/lilo -R "current resume=/dev/hda1"
    # your label and swap partition will probably be different
    echo "4" > /proc/acpi/sleep

    And that's all. Works perfectly for me, I just tested it.
    • HAHA, spoke too soon!

      . This is suspend-to-disk, not suspend-to-ram, as originally mentioned.

      . Although it appeared to be working, the system came back up with root mounted read-only. The quick and easy solution is to have a lilo 'resume' label, append the 'resume' option and don't use read-only. Now it all seems to be working.

      . It takes almost as long to suspend/resume as my moderately optimised boot takes!

      . Be aware that many daemons will have no concept of sleeping, and will get really confuse
  • by R@Bastard ( 91524 ) on Tuesday May 11, 2004 @01:06AM (#9114113)
    I've tried it under 2.6 on a couple of laptops (Fujitsu w/Transmeta and a big ugly Sony). No dice. I tried it under 2.4 with acpi patch on both. No dice. I tried it on a couple of non-laptops, too. No dice.

    The word on the Fujitsu is that it is actually working properly, but that the PCI bus and/or radeon card doesn't refresh properly upon wake-up.

    This is not a version of "working properly" that works very well for me. No screen, no network. Tough to work with. I think swsusp is the stand-in du jour.

    I was hoping that the new Knoppix would help me get this going.

    Good luck to you. I'm sure that those smart kernel hackers will bring us this good stuff eventually.

  • I don't like S3 (Score:3, Interesting)

    by Rufus88 ( 748752 ) on Tuesday May 11, 2004 @01:13AM (#9114138)
    I run Win2K, and I never use suspend-to-RAM. The reason is that the CPU actually halts and does not start up again unless the user takes some explicit action. This makes it impossible to set up scheduled tasks (like backups that I run every day) to wake up the system from sleep mode.
  • by Anonymous Coward
    ..for Linux, especially given that the main site is hosted at Intel.

    My Compaq laptop shipped with Win98ME and works (mostly) fine in W2K adn WXP.

    So why, more than 3 years later, is Linux still without decent ACPI support?
  • I have had mixed results with sleep. I had a Compaq Presario 5000 Duron 700 win2k)as a media server that would sleep perfectly, but it would only wake up properly if you used the power button to turn it on. If you used the mouse or the keyboard the mouse to wake it, the mouse pointer dissappeared. It still worked, but but the pointer was gone. I have another P4 Presario that sleeps perfectly in XP but the exact same machine running 2k never sleeps. Its set up in Power management but it never ever goes
  • Well, I used the suspend to disk mode of Win XP (hibernate) all the time since my computer is rather loud, and it saves power.

    I do this mainly because it is much faster than a shut down + startup. And also because I will have many programs open and I just want to pause what I'm doing and come back later.

    Unfortunately this leads me to avoid shutting down at all in order to keep browser windows open mostly. Though I saw a post about a plugin for firefox to save just the tabs to disk, instead of me having to
  • ...concerning their use of sleep on the desktop...
    Hmmm, with all that outsourcing and so on, I wonder who is still able to take some sleep on his / her desktop?
  • If you get bad RAM, you're screwed. I have Win2k here and I just use standby. I have suspend to RAM as an option in my BIOS, but I have it disabled.
  • I've been using ACPI sleep from the day I got this laptop [ibm.com], both suspend to ram and suspend to disk, with 2.6.x kernels. Initially I had to apply a few patches for some USB stuff, but that seems no longer needed from 2.6.5 and 2.6.6 has worked all day today (suspended / resumed three times so far).

    Things are much better for me more recently though, now I have built X.Org R6.7 [freedesktop.org] and my Radeon Mobility 9700 is all good to go too.

    If you don't want to build your own kernels, you needn't do that either. The lat

  • ... if I could just get the back light to shut off with my Sony Vaio under Linux. Suspend to disk/RAM is a pipe dream for me at this point. After much google'ing, I've come to the conclusion that I'm just screwed - my laptop just simply isn't "linux friendly". I seriously think I'm just going to buy an iBook for my next laptop. The 12" model really isn't all that terribly expensive for a Laptop (let alone for a Mac).
  • in my arsonal of boxes, ranging from a paid of PII BX boards to an Nforce2. I've had many, many issues relating to acpi.
    getting a doze box to SLEEP is easy, bringing it back up has historically caused crash issues (on nforce1, a via kt333 and nforce2 running 2kpro), linux acpi has been limited to power off. though on the PII's i have the acpi stuff disabled in the kernel (read; not there), since I NEVER, turn them off unless i'm swapping UPS's or moving them. I could put the appropriate module in, but i'm j
  • This thing is a brick in linux, because of power management.

    APM works, sorta. Resume from suspend fails about 30% of the time. 20% of the time, resume works okay, but the system is really slow, and the fan stays on 'high' (really noisy) speed.

    ACPI is broken. Battery, buttons, temperature, etc. . . can work, if you use a modified DSDT.
    S1,S3 don't work. S1 doesn't resume, S3 doesn't turn the screen backlight off. S4,S4b resume about 60% of the time, but it already takes so long to come back up I might as we
  • I want a linux laptop.

    Here are my requirements (given that I will be running linux):
    1. Must do ACPI suspend, S1+S3
    2. Must have a good 3D video card, Radeon 9600/Geforce FX GO 5650 or up.
    3. Decent battery life would be nice.
    4. Integrated bluetooth+Intergrated 802.11b

    Don't tell me to get a powerbook. I have a 12" G4 laptop DVI. I want linux, with suspend. Can't do that on the powerbook. Mac OSX is wonderful. Yes, yes. I want a linux laptop with suspend.

    Don't want to do suspend to disk, I want the thing to
    • I have a 12" G4 laptop DVI. I want linux, with suspend. Can't do that on the powerbook.

      Actually, you probably can. Debian unstable works fine for me on a 15" Titanium Powerbook (the 1GHz one with DVI), and as I've commented above, suspend-to-RAM is fine (just install pmud and run it in the background; to sleep, close the lid or run /sbin/snooze).

      Unfortunately, the more recent Powerbooks have Airport Extreme, which isn't supported under Linux (because "Airport Extreme" cards are based on Broadcom chipset
      • Hmmm.... This sounds very promising....

        I guess I had only been looking at the Yellow Dog pages as to whether or not suspend to ram would work.

        Would an airport regular card work in my powerbook? I got an airport extreme card (because thats what was avaliable on the refurbished site). Hmm...

        Food for thought, anyways :)
        • Sorry, as far as I know, each model of Mac is only compatible with Airport *or* Airport Extreme (the expansion cards are different shapes or something stupid like that, I think) - titanium Powerbooks like mine can only use Airport non-Extreme (Hermes/Orinoco-based 11b chipset and well supported in Linux), the newer aluminium Powerbooks can only use Airport Extreme (based on Broadcom 11g chipset, no Linux drivers).

          For recent Mac hardware in 2.4, you should apply a recent "benh" kernel patch to the appropria
  • I couldn't get ACPI working properly, but APM suspend to RAM works fine, on both Windows XP and Gentoo Linux on my IBM Thinkpad R40.

    And yes, I was surprised. It's my first computer to ever do this...

  • I have ACPI suspend-to-disk working quite nicely on my Dell Inspiron 4000, running Gentoo and 2.6.4-ck2.I've never tried suspend-to-RAM; I'd rather be certain that my batteries won't die while my computer is unattended.

    It certainly took a while to get there, especially since I originally attempted to use the Dell/RedHat suspend-to-disk-partition-building tools, which did not work at all, but now I've got it saving to swap and I'm golden.

    In fact, I dual-boot Windows XP and Linux on my laptop (for games
  • Sleep works perfectly on Debian/PPC running on my Pismo-era Powerbook. I can't remember the last time I had to reboot it -- I just close the lid when its not in use.

    Just thought I'd offer a non x86 perspective.

    --saint
  • Sleeping worked for me, but got the clock all screwy. So I gave up on that, and now have it set to UNDERclock the cpu down to 12% of its regular speed. Should save on battery, and it has the advantage if still being accessible (though a little slow) for remote users, if any.

    Of course, this doesn't shut everything down, so it wouldn't be appropriate to put your laptop in its bag and take it to work like this.

  • It's been more than two and half years since I
    bought my laptop computer and from the first
    day I was able to suspend to RAM while using W2K.
    But unfortunately I do most of my work on Linux,
    it is unbelievable but even if I tried hard to
    configure ACPI on Linux I haven't yet been able
    to use any power saving feature other than halt.
    Why does the development of ACPI support on Linux
    evolves so slowly?

"When the going gets tough, the tough get empirical." -- Jon Carroll

Working...