Jump to content
We're Hiring! Full Stack Developer ×

[Solved] Sleep script freezes 5.0 beta 10

Recommended Posts

So newb problem but I cannot find an answer anywhere and have googled until my fingers bleed  ::)


Trying to go to sleep on inactivity, CRON job every 15 minutes.  This works fine until...

This script works


hdparm -C /dev/sdc /dev/sdd | grep -q active

if [ $? -eq 1 ]



  sleep 2

  echo -n mem >/sys/power/state



As soon as I try to put anything in to run on wake, (i.e.,


  sleep 2

  echo -n mem >/sys/power/state

  ethtool -s eth0 speed 1000


the sleep command (or something) does not work correctly.  The system will freeze (no response in telnet, console, web interface, shares) and the WOL packet does nothing.  I have to physically reboot the machine.

Anything between the sleep command and the 'fi' does this and I have no idea why.


This behaves the same with 'pm-suspend' and 's2ram -f -a 1' which also work.

Command line tests work, but the script will not work if I add post-sleep activities (command line test or CRON).


Any ideas?


Link to comment

OK never mind, fixed me own problem.

Went back to 4.7

Using echo 3 > /proc/acpi/sleep, works (from http://lime-technology.com/wiki/index.php?title=Setup_Sleep_%28S3%29_and_Wake_on_Lan_%28WOL%29)


So a beta bug.  Another note for the fine beta folks... not only did the sleep scripts not work with anything after the actual command, the actual commands would only work ONCE.  The second time I would try to sleep the system, it would stop and freeze (fan/power lite, no response to WOL, no response to keyboard etc).


This happened with s2ram, pm-suspend, echo -n mem >/sys/power/state


For the record, it's a Gigabyte GA-MA785M-US2H mobo

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...