Slashdot Mirror


ACPI and S3 Sleep on the Linux Desktop?

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."

5 of 104 comments (clear)

  1. Dell Latitude C610 Sucess(mostly) by kdm · · Score: 5, Informative

    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.

  2. Not for me, personally... by Chasing+Amy · · Score: 4, Informative

    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.

    --

    Chasing Amy
    (We all chase Amy...)
    "The more corrupt the state, the more numerous the laws"-Tacitus
  3. Re:Use APM suspend, not ACPI suspend by Profane+MuthaFucka · · Score: 4, Informative

    I've got a brand spanking new T30 with 2.4 Ghz P4 and 60 gig disk. It's my work laptop, provided by my company, about 6 months old.

    apm -s works perfectly for me. The thing will sleep all weekend just like that, and power up instantly when the top is opened.

    --
    Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
  4. Inspired me.. by zcat_NZ · · Score: 5, Informative

    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.

    --
    455fe10422ca29c4933f95052b792ab2
  5. Re:Macs don't sleep to disk by drsmithy · · Score: 4, Insightful
    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).