Sandor D's picture

As the TKL appliances are very popular for home and small offices I think it would be very nice to have some more support on the power management.

Lots of people use f.i. the fileserver at home and don't want it on 24/7

a WOL can bring it out of suspend mode and of you go, the server can go back into sleep after a configurated time.

I've been searching for many hours on several linux distributions and forums, but it's getting to spread out.

It would be appreciated if we could have a TKL howto for this, or even better a webmin module.

Forum: 
Jeremy Davis's picture

But I reckon you could find plenty of info. Just keep in mind that TurnKey is based on Debian (v12.x = Squeeze/6; v13.x = Wheezy/7) so you should be able to find plenty of info, and I'm sure it's possible. The only catch I'd imagine (and nothing major really) would be that you'll need some software that can send the WOL magic packet to wake the server...

Sandor D's picture

Have been throught the motions a couple of days now, not being able to see the forest through the trees anymore. To many different options and issues. Even reinstalled the Fileserver cause I initially installed it on another comp (which could boot from USB) and moved the harddrive over. But also that gave no relief.

Found something similar to my problem, shutdown -h now restarts the comp after I've send a magic packet, pm-suspend says 'you do it yourself'.

A restart everytime will take to long (although the boottime of Fileserver is nicely short) so I would love to have it working with the pm-suspend to RAM.

Any clueus anybody???

Jeremy Davis's picture

I've been doing a little research and essentially it seems that there are 2 components to what you are trying to do: WOL and suspend/hibernate (i.e. power management). I think that it is probably best to look at power management first, then WOL.

So do you have suspend/hibernate working? My research suggests that the package 'pm-utils' is the main/best way to go with Wheeezy. I assume that you have that installed as you mention pm-suspend (which is provided by pm-utils AFAIK). It also seems that you need the 'hibernate' package installed for hibernate to work, plus you need to make sure that you have a swap = RAM. That may be irrelevant to you though if you just want to do suspend-to-ram.

Have you checked what your computer is capable of? What is the result of:

cat /sys/power/state

To be able to use suspend-to-ram it'll need to return 'mem' (and/or 'disk' for suspend-to-disk/hibernate). I also found another link for troubleshooting power management stuff here, which may be of some value?

As for WOL, in my experience, waking from off is generally pretty straight forward, so I'd test that first. Once you have that working reliably, then have a play with other options. I have found that with some hardware (well strictly probably more their BIOS) that they respond differently to the different packets (some will wake from suspend, but not hibernate, others vice-versa). FWIW Wikipedia has some troubleshooting hints here.

Sandor's picture

Thanks guys for stepping in. Sorry for my latre reply, I've been struck by a very bad flew and was not very interested in looking at computerscreens. Much better now, so I will write down what I did and where I looked at.

 

Liraz Siri's picture

Last I played around with wake-on-lan it was a hardware level BIOS level feature that just booted the computer, but that was a while ago.

I guess if you want to suspend/resume a machine rather than just turn it on and off then you do need more specialized support by the operating system (and also hardware support of course).

To be honest, I hadn't even realized that wake on lan even integrates with power management though it makes a lot of sense that it would.

I'll bet Debian already includes really good power management support, we just need to figure out the best way to turn it on and test that it works on the various wake-on-lan usage scenarios.

Any additional information we can get on how you have (or haven't) gotten this to work would help us move forward.

In the meantime, I've opened a feature request on the tracker for this:

https://github.com/turnkeylinux/tracker/issues/258

Sandor D's picture

My mainboard is an ASUS P4B-M 1.5 GB mem
I am only interested in suspend to RAM cause hibernate etc just takes to long (and is as fast as a normal shutdown/reboot)

To answer your question Jeremy
—-cat /sys/power/state
    standby mem disk 
--cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
PCI0      S4    *disabled  no-bus:pci0000:00
PCI1      S4    *disabled  pci:0000:00:01.0
PCI2      S4    *disabled  pci:0000:00:1e.0
USB0      S1    *enabled   pci:0000:00:1f.2
USB1      S1    *enabled   pci:0000:00:1f.4

/sys/class/net/eth0/device/power/wakeup
says disabled

I know the system can suspend and resume via several options because previously I had WinXP running on it. Suspended fine, came back to life after hitting the keyboard, or even when another client browsed for a share. The only downside was that the fans (processor and case) kept running.
With all the same bios settings I installed TKL, added pm-utils and hit pm-suspend in a console.
System goes beautifully in suspend mode. Even the fans stop running. Yooohooo!!
BUT, hitting the keyboard does nothing, sending a magic package (ethtool eth0 has pug for Wake-on) does not wake her up, just hitting the powerbutton makes the princess come alive.

I did not bother creating a script to add the keyboard and mouse to the /proc/acpi/wakeup folder, the system will be somewhere down in a dark closet where hardly anyone can touch it, and only with calamities someone will physically attend a console.
The server will be ’serving’ my father in law’s small insurance office (3 computers).
So what would be your ideas how to tackle this problem?

PS, just found out something 'funny' If I do a shutdown -h now. And send a magic package from some client. The computer comes back to life. But this actually takes to long (the booting I mean, and also the shutting down)

 

Jeremy Davis's picture

From my understanding if it goes into suspend ok, then that means OS power management is working. And if it also wakes from soft-off with WOL (but not suspend) then AFAIK then it is a hardware/BIOS issue.

I recall years ago (in my old job) I had about 8 Win7 desktops (mostly all different) that I wanted to WOL. They all woke from soft-off, some would wake from hibernate and some from suspend (to RAM). Only about half would wake from both (suspend to RAM & suspend to HDD/hibernate). I updated BIOS on all of them and IIRC then there were only one or 2 that wouldn't WOL from all states.

I vaguely recall reading that with patience and diagnosis it may be possible to construct a custom WOL packet to make it work with the troublesome PCs but I didn't bother.

Also as for your XP install, I doubt that it was actually suspending if the fans were all still running. It was probably just Win power management turning of monitor and hard drives, etc.

Add new comment