Thursday, May 17, 2007

[Linux] Suspend/Resume over LAN & USB

前幾天有個客戶需要Suspend to RAM (S3) 和 Resume over LAN & USB 的功能, 就小玩 了一下!
Platform: 945G + Celeron D 352, 2GB RAM, GigaLAN
OS: Fedora Core 4 (2.6.11-1) & 2.6.21.1

Step1. BIOS:
-- 在BIOS 中要把wakeup 的device 都打開, 這個LAN 是PCIE的, 所以也要特別設一下.
-- 將Suspend Mode 設為 [S3] Suspend to RAM

Step2. Linux:
-- /proc/acpi/wakeup 中, 把USB 和 PCIE 都設為wakeup trigger sources

Step3. 準備來睡 (枕頭咧?)
-- 我將 suspend 和 resume 的過程寫成一個script
#!/bin/bash
touch /suspending
#unload USB drivers
rmmod ehci-hcd
rmmod uhci-hcd

#store clock
/sbin/hwclock --adjust

#save video state
vbetool vbestate save > video-state

#Put system into sleep
echo 3 > /proc/acpi/sleep

#Prepare wakeup, resuming
#restore video state
vbetool vbestate restore



Wake on LAN
Wake onUSB

因為FC4 的kernel 無法由USB wakeup, 所以直上最新release (2.6.21.1)的kernel.

2 Comments:

Anonymous Anonymous said...

This is great info to know.

Mon Nov 10, 07:10:00 PM PST  
Anonymous Anonymous said...

Good news

We do not agree with this year Brit awards decision.

Please go to see our little poll

http://micropoll.com/t/KDqOnZBCWt

Lady Gaga can not be better than Nina Hagen

Poll supported by BRIT awards 2010 sponsor femmestyle
[url=http://www.femmestyle.li/brustvergroesserung/erfahrungen.html]brustvergrößerung erfahrungen[/url]

Pet Shop Boys surprise lucky BRITs fan with a MasterCard Priceless Gig in their living room

Thu Mar 11, 12:41:00 PM PST  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home