ACPI and S3 Sleep on the Linux 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."
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 seem to be able to wake it, nor does a PS/2 mouse) and the machine powers up and is ready to use in a couple of seconds. For a Windows box that I use primarily for gaming and browsing the web there's no need for it to be on all the time. The only time I reboot it is applying patches or installing software that force me to. The machine runs rock solid. Windows XP Pro is awesomely stable on my box, but I'm sure people will chime in with their horror stories. YMMV. Same thing goes for my Apple iBook. I never shut it off or reboot it unless I'm applying updates. I just let it suspend to ram when I close the lid. Wakes up just fine all the time. As for Linux boxes.. I couldn't tell you I ever tried. All my Linux boxes are setup as servers and I never logon to the console unless they're crashed. Unfortunately one of my loudest systems is a Linux box in a rackmount case. I probably should replace it with a Via Epia system. ;-)
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.
_______
2B1ASK1
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.
Mucous membranes are the part of your brain that, like, make you think about mucous. --Beavis
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.
..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?