Skip to Content

这样的代码为什么待机恢复后会闪屏呢?

fff80 的头像
#!/bin/sh
# suspend.sh 28sep09 by shinobar

# do not suspend at shutdown proccess
for P in acpi_poweroff.sh
do
  ps ax | grep -v 'grep' | grep -q "sh[ ].*$P" && exit
done
for P in wmpoweroff poweroff
do
  pidof "$P" >/dev/null && exit
done

# do not suspend if usb media mounted
USBS=$(probedisk2|grep '|usb' | cut -d'|' -f1 )
for USB in $USBS
do
	mount | grep -q "^$USB" && exit
done

# process before suspend
# sync for non-usb drives
sync
rmmod ehci_hcd

#suspend
echo -n mem > /sys/power/state

# process at recovery from suspend
modprobe ehci_hcd

发表新评论

  • 你可以在文本中使用BBCode标记语言。 URL会自动被转为链接。

更多关於格式化选项的信息

CAPTCHA
请验证您是否是机器人。
Image CAPTCHA
Enter the characters shown in the image.