So Close, and Yet...
Jul. 22nd, 2003 09:06 amIn the latest linux kernel (2.4.21), there's an add-on component called kswsuspd, which stands for Kernel Swap Software Suspend. The idea is taken from laptops, where you can make them "hibernate" and use less (or no) power while transporting them from place to place. It takes the image already active in memory and writes it out to the computer's swap space on disk, and when you restart recognizes the image and loads it, bringing your session instantly back to life.
I decided to try it on Lain, the laptop. This is rather silly because Lain already has two perfectly functional hibernation modes already: the slow one called "hibernate", which takes about three minutes to perform going either way but uses no battery power at all when down, and the fast one called "suspend", which works when I shut the lid, takes about 15 seconds to go down and three to come back up, but will use the battery minimally and will die after four or five days. I always use suspend because, well, there's no reason to hibernate when I'm just taking a bus ride or going to work.
I built a kernel with kswsuspd and tried it. It was faster than hibernate but slower than suspend, taking only a minute going either way. I watched it go into hibernate, which means it uses no power, and then I restarted it. The kernel root loaded, saw the "hibernate" block in the swap space, and went for it. Kswsuspd all seemed to be working nicely. Even X came up, the clock was working, the network was available, even the music was still playing.
Then I realized to my horror that neither the keyboard nor the mouse worked. The machine was completely insensate to my probing. Even kernel-based keyboard activities, stuff that happens before the keymaps, didn't get a response. It "worked," but I couldn't do anything with it.
I went to my other computer, logged in through the network, and rebooted again, this time without software suspend. Maybe I'll investigate later, or maybe I'll just be happy with the hardware-based features, since they have never given me problems.
I decided to try it on Lain, the laptop. This is rather silly because Lain already has two perfectly functional hibernation modes already: the slow one called "hibernate", which takes about three minutes to perform going either way but uses no battery power at all when down, and the fast one called "suspend", which works when I shut the lid, takes about 15 seconds to go down and three to come back up, but will use the battery minimally and will die after four or five days. I always use suspend because, well, there's no reason to hibernate when I'm just taking a bus ride or going to work.
I built a kernel with kswsuspd and tried it. It was faster than hibernate but slower than suspend, taking only a minute going either way. I watched it go into hibernate, which means it uses no power, and then I restarted it. The kernel root loaded, saw the "hibernate" block in the swap space, and went for it. Kswsuspd all seemed to be working nicely. Even X came up, the clock was working, the network was available, even the music was still playing.
Then I realized to my horror that neither the keyboard nor the mouse worked. The machine was completely insensate to my probing. Even kernel-based keyboard activities, stuff that happens before the keymaps, didn't get a response. It "worked," but I couldn't do anything with it.
I went to my other computer, logged in through the network, and rebooted again, this time without software suspend. Maybe I'll investigate later, or maybe I'll just be happy with the hardware-based features, since they have never given me problems.
no subject
Date: 2003-07-22 05:51 pm (UTC)This is a logical feature of kswsuspd. Having now taught your machine to shut down and restart without loss of state, you became superfluous. It probably only kept you alive because you still have to pay the electric bill.
Having recently been forcibly sat down to watch Lain...
Date: 2003-07-22 06:44 pm (UTC)Re: Having recently been forcibly sat down to watch Lain...
Date: 2003-07-22 08:14 pm (UTC)And the sweetest thing for it is that my fans were kind enough to buy the replacement battery for it.
Re: Having recently been forcibly sat down to watch Lain...
Date: 2003-07-22 08:21 pm (UTC)It's a nifty little tool for writing, and for getting online to check email/LJ/mushing. It's a bit on the heavy side, though - but I travel relatively infrequently these days. Working from home means never having to leave your desktop. But I envy your hardware nonetheless, in all earnestness, sparing the double entendre.
no subject
Date: 2003-07-23 06:54 am (UTC)