Melclic's picture


I have just installed the NAS version of turnkey on my laptop and it works great. I have to say that it is by far the most complete and easiest to use NAS server.

Anyways I want to be able to control it completely remotly, and I have succesfully trurned it on using WOL. However when I want to shut it down it's another story.

When I turn the laptop manually, i can use any way possible to shut it down (SSH, webmin...) and it does so perfectly. However everytime I turn it on using WOL and then want to shut it down, it hangs on a black screen with the ethernet port light on and all the lights on. The hard drive seems to be off and the fan is off.

I would appreciate any help you can give me. Thanks

Jeremy Davis's picture

As TKL is based on Ubuntu it's probably worth checking the behaviour of a standard Ubuntu 10.04/Lucid server install. If that works with that as expected then it's a TKL bug (obviously). Otherwise it's an upstream Ubuntu bug and it is highly unlikely that TKL devs will even look at it (let alone fix it).

If it's an Ubuntu bug then you'll need to consult Ubuntu forums/documentation/bugtracker for a workaround. I'm sure if you post on the Ubuntu forums with a bit more detail then someone may be able to help you out.

Seeing as TKL is a server centric distro even if it is a TKL bug it probably won't get priority as most users run their servers all the time, or manually start/stop (when used as a dev environment).

BTW when you say you can't shut it down what command(s) have you tried? The 3 that I know of are:

shutdown -h now

I have also read that using the -P switch with shutdown will sometimes work when the above doesn't (although I can't confirm - apparently '-h' means halt and '-P' means power off). Eg:

shutdown -h -P now

I generally use halt and have not had any issues with it but I'm not using WOL. You may find that even if one of these commands works to shutdown your server it may also fully power it off, thus meaning WOL will no longer work as WOL requires residual power to the NIC.

Melclic's picture

Thanks for the quick reply

I have checked many different workarounds in ubuntu forums and have posted on numerous posts.

I have tried to change the acpi settings and apm settings in the GRUB start up and have tried all the commands you mentioned (including the one you just posted).

However this behaviour is only seen when the computer is booted using WOL. If I turn it on manually I can turn it off remotly no problem. I have even turned the computer on using WOL and then pressed the power button on the laptop and the same exact behaviour hapens.

I will continue to post my problem around....

Melclic's picture

I just tried to suspend it or hibernate it as well, and the same problem persists. Everytime I turn on my computer using WOL it won't shut down correctly!!!!!!!!!!!!

Please let me know what to post or what to look at.

I tried disabling eth0 in a script before evoking shutdown but no help.


Jeremy Davis's picture

That would be a useful step as then we can determine whether it's an upstream Ubuntu issue or one introduced with TKL only. TBH my suspicion would be that it's an upstream issue although who knows until you check.

I wish I could give you a few more hints but this sort of thing is way above my pay grade (I am no Linux expert and can really only provide fairly basic level support). My suspicion is that some kernel module is not unloading properly but it's only a guess. Be good to check your logs if you can and see what is happening. If you are unfamiliar with logs in Linux here is a link I just found which may be useful.

Melclic's picture

To answer your question it might be an ubuntu thing or just my computer's BIOS or something. I have installed both FreeNas and ubuntu Server out of desperation and the problem persists.

I am no expert so I hope it is a OS issue. I will try with windows to see if the roblem persits.

Thanks for the link!!! I was looking fir a way to view my logs.

Jeremy Davis's picture

Perhaps there is a better ethernet driver/module for your NIC than the one that loads by default? Using commands you should be able to find out exactly what your NIC is and which driver is currently being used and if there is another. If you are lucky you may get someone to step you through it all on the Ubuntu forums.

I'd encourage you to persevere with TKL/Ubuntu. It may take a little mucking around to get there but you'll learn a whole lot in the meantime! :)

Did you have any joy from your previous posting on the Ubuntu forums? They're usually pretty good in my experience.

Melclic's picture

I will persevere with TLK.

I will try to look for another driver for my NIC.

I loaded Windows onto my machine and it shuts down without an issue even with WOL. SO your right it may be a NIC driver issue.

I'll post the log of the shutdown sequence with and without WOL as soon as I get around to it.

Thanks for the support.

Melclic's picture

Thank you so much Jeremy!!!!!!

I went on the Realtek website and downloaded the appropriate driver and installed it. I was weird becasue it replaced the old driver which was exactly the same.

But it did it. Thanks so much

Jeremy Davis's picture

Glad to hear that you got it sorted. Win for us! :)

Sounds like it may have been a slightly buggy driver? I would assume that the driver included by default was an open source one, and perhaps the one you downloaded was a proprietry one (although the same version)? Anyway regardless, it doesn't matter now cause you've got it sorted.

Great that you got it working properly. :) Have fun with TKL!

PS Also it could be useful to others if you include a little more info re what your NIC is and what driver fixed your issue. Someone with the same (or similar) hardware problem may stumble across this thread and that would probably be useful for them. If you were really motivated you could post a bug on the Ubuntu bugtracker with your fix included.

Melclic's picture

Of course, I included this information on the Ubuntu post:

My laptop was a Toshiba satellite Pro U300 and my NIC card is a RTL8101E/RTL8102E.

I went to the realtek website and downloaded the appropriate driver

I followed the README and disabled the old module using:

	rmmod r8169

The installation replaced the old driver which was strangely exctly the same and that did it. I can now shutdown my laptop using this line in ssh even if I have just performed WOL

	Shutdown -h now

Thanks for your attention and help

Din't Realtek make open source drivers for linux?

I have never posted a bug before but I will try to. Love the open source and the spirit of it all and would be more than happy to help.

Add new comment