You are not logged in.

#1 2013-11-30 18:09:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

WOL causes spontaneous power on after shutdown [SOLVED]

In order to support WOL, my Asus H87I-Plus requires an option set in the BIOS (Onboard>APM>Power on by PCIE).  When I have this enabled, I can indeed start the machine using the community/wol package, but there is an undesired side-effect: about 25 % of the time I issue a `shutdown -h now` the box shuts off only to turn on all by itself several seconds later.  If I disable the option in the BIOS, this does not happen... but I am unable to use wol.

Anyone run into this issue before?  Motherboard BIOS issue?

EDIT: After nearly 4 months of use on two different machines, I can safely state that the solution is in post #35.

Last edited by graysky (2015-09-13 13:41:40)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2013-12-01 16:09:25

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: WOL causes spontaneous power on after shutdown [SOLVED]

What does ethtool say about wol capabilities and which one(s) are you enabling?

From ethtool's manpage:

wol p|u|m|b|a|g|s|d...
       Sets Wake-on-LAN options.  Not all devices support this.  The argument to
       this option is a string of characters specifying which options to enable.

       p   Wake on PHY activity
       u   Wake on unicast messages
       m   Wake on multicast messages
       b   Wake on broadcast messages
       a   Wake on ARP
       g   Wake on MagicPacket™
       s   Enable SecureOn™ password for MagicPacket™
       d   Disable  (wake  on  nothing).  This option
                  clears all previous options.

The card on my laptop supports this:

Supports Wake-on: pumbg

The normal state is for wol to be disabled and all tutorials I've seen say that the desired more must be set prior every shutdown.

Wake-on: d

My first line of investigation would be to see what the card supports. I suppose finding out what the bios might be enabling can be very difficult but it would help. I'd say that if the card supports "Wake on PHY activity" or "Wake on ARP" and the bios is enabling either/both then it can be problematic.

You can start with disabling wol with ethtool (but leave the bios setup for wol) prior to shutdown and see if you can still wake up the machine, there you would see if the bios changes the state configured by the OS, then you can try enabling only "Wake on MagicPacket" and see if it still wakes up randomly without being told so.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2013-12-08 15:20:44

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: WOL causes spontaneous power on after shutdown [SOLVED]

I don't know if you lost interest or if you solved this already but here's a datapoint of my own: recent(1) kernels make my desktop system(2) reboot instead of shutdown, I have not bothered to look into it because I don't use it very often but after your inquiry I decided to look into my own problem.

It seems that for some systems, having "Resume by pci device pme" will cause the machine to reboot instead of shutdown, and indeed after looking into the bios setting on my desktop system I had that enabled. If anything I'd say that this behavior may be a mix of a wonky bios and a kernel regression.

(1) Can't say for sure when this started happening, but current Arch kernels do this (didn't try LTS though), both windows xp and 7 work as expected. The current kernel shipped by CentOS 6 (2.6.32-431) also shuts down the machine as expected so you might want to try a livecd of a distro with an older kernel to see if the problem goes away.

(2) The machine is getting old and is starting to misbehave so initially I dismissed the wonky behavior as some early impending failure sign.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2013-12-08 15:37:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

@R - Still does it, but infrequently (maybe 1 time out of 12 or 15).  Haven't tried LTS because I would like to keep haswell optimizations in there (assuming 3.12.x offers benefits).

When you box reboots instead of shutdowns, does it immediately reboot, or does it actually spindown the HDDs and then come back up like this board?  To be a reboot doesn't cut the power to the spinning drives.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2013-12-08 16:02:00

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: WOL causes spontaneous power on after shutdown [SOLVED]

The box reboots right away but as far as I can tell it cuts the power very briefly, I can hear the HDD doing the same noise it does when spinning up from a cold boot. I don't hear that kind of noise if I do a normal reboot. The machine is a bit old, it has this motherboard[1], from what I can see there is nothing in common in the base specs.

The two problems could be completely unrelated, but at least on the surface changing a similar setting does influence the problem. The major difference I see is that I can reliably reproduce the problem, while in your case it seems to be random.

[1] http://www.msi.com/product/mb/K8N-Neo4- … -1-0-.html


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2013-12-08 16:02:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

Agreed.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2014-02-03 20:41:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

An update: my problem is now 100 % consistent.  I issue a `shutdown -h now` and the box goes down.  It waits 2-3 sec and then starts back up automatically.  The only way I can disable this, is to disable the WOL option in the BIOS.  Using ethtool shows:

# ethtool eno1            
Settings for eno1:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 2
	Transceiver: internal
	Auto-negotiation: on
	MDI-X: on (auto)
	Supports Wake-on: pumbg
	Wake-on: g
	Current message level: 0x00000007 (7)
			       drv probe link
	Link detected: yes

I can reissue the command to enable magicpacket wakeups but that does nothing; the box still goes down, then turns back on.  Maddening sad

This is true using either 3.12.9-2 from [core] or 3.13.1-2 from [testing].  BIOS is up-to-date.

Last edited by graysky (2014-02-03 20:42:24)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2014-02-03 22:47:42

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 192
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

I once had WOL issues with a GA-Z68X-UD3H motherboard (having a RTL8111E NIC), every time I started the machine with WOL, the next shutdown/suspend would immediately be followed by a wake-up. This problem showed up once I upgraded the legacy BIOS to UEFI. At some point, I reset the settings and the problem has not showed up since. Might be worth a try.

Offline

#9 2014-02-03 23:16:37

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

Thanks for the info.  This motherboard is UEFI.  I have tried resetting the BIOS to factory settings but to no avail.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2014-02-26 19:48:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

Booting into windows 7 and then shutting down from there does not exhibit this behavior.  It seems to be something unique to Linux...


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2014-08-22 00:45:13

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

Bump out of frustration.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2014-08-22 06:57:24

LazyGamble
Member
Registered: 2014-03-16
Posts: 2

Re: WOL causes spontaneous power on after shutdown [SOLVED]

I was watching the Topic for a solution since I had the same Issue with the Same board, but for a couple of weeks now the Problem has disappeared and I can shutdown via ssh or directly without Problems (systemctl poweroff).
My intermediate solution was to to hibernate instead of poweroff the System which worked alright. When I re-checked if the issue still exists it was gone. I can't really pinpoint the cause, but I didn't update the BIOS only kept the system and the Kernel up-to-date, so I figured a newer kernel fixed the issue. I don't have Windows on the System. just Arch.

Offline

#13 2014-08-22 09:12:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

Yes, it is definitely intermittent.  Mine was fine for a few months but has now regressed to its former state of shutting down, then turning back on all by itself as described above sad


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2014-08-22 10:58:02

discon
Member
Registered: 2010-06-28
Posts: 23

Re: WOL causes spontaneous power on after shutdown [SOLVED]

It sounds similar to motherboards with the AR8161 ethernet controller. They would wake up like that and the WOL feature was explicitly disabled ever since sad. See https://bugzilla.kernel.org/show_bug.cgi?id=61651 and https://github.com/torvalds/linux/commi … d72ffe8cd2.

Offline

#15 2014-08-22 19:02:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

I'm about ready to take the RAM + CPU off the board and smash it with a hammer + swear off buying any Asus product again >:(


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#16 2014-08-22 19:21:06

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: WOL causes spontaneous power on after shutdown [SOLVED]

What if you disable the interface and immediately re-enable it before network/shutdown.target?

Last edited by emeres (2014-08-22 19:34:26)

Offline

#17 2014-08-22 19:36:08

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: WOL causes spontaneous power on after shutdown [SOLVED]

Um, I'm hesitant to type this out as I really know very little about this area (though, incidentally, Lekensteyn above is very knowledgeable about ACPI), but, well, here goes... I used to run OS X on an ASUS laptop and in the Hackintosh world, there's a well known DSDT patch called Shutdown fix (it's just saying to wrap the entire contents of the _PTS (PDF warning: #371/409) function with "If (LNotEqual(Arg0,5)) {" which would stop Hackintoshes running on certain ASUS motherboards rebooting when they should be shutting down, much like what you're describing. I can't remember how it works, but I do know that the origins of the patch are from the Russian AppleLife forum and IIRC they do have explanations. When I was using a testing release of an XHCI driver, it wouldn't power off the controller properly and I'd also have my laptop reboot instead of shutting down. That patch worked as a band aid while the author fixed the problem in the driver.

The ArchWiki DSDT article pretty much describes all the ways of loading a custom DSDT. The EFI version of GRUB2 has never worked for me to load an alternative ACPI table but I've always had success with the MBR version. If it does actually work, bear in mind it's masking the real cause of the problem and it may prevent your motherboard from doing important stuff on shutdown.

Offline

#18 2014-08-22 19:48:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

emeres wrote:

What if you disable the interface and immediately re-enable it before network/shutdown.target?

No change hmm  Just curious why you would ask about that?

qwerty - Thank you for the post but that is way over my head smile

Last edited by graysky (2014-08-23 00:04:59)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#19 2014-08-23 00:21:25

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

Well, this is odd.  I switched from netctl (static profile) to systemd-networkd (dhcp) and have been able to shutdown two times in a row now without the wake up.  Dunno if it'll last.  Could netctl insert something that causes this or just a fluke?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#20 2014-08-23 00:38:09

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: WOL causes spontaneous power on after shutdown [SOLVED]

That was a long shot, I meant to run this process as a service just before shutdown to clarify. I am curious also, it this a stationary desktop? You powered it off twice within almost 5 hours? How many hdds do you have inside?

Offline

#21 2014-08-23 06:55:03

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: WOL causes spontaneous power on after shutdown [SOLVED]

graysky wrote:

Well, this is odd.  I switched from netctl (static profile) to systemd-networkd (dhcp) and have been able to shutdown two times in a row now without the wake up.  Dunno if it'll last.  Could netctl insert something that causes this or just a fluke?

With WOL still active and confirmed working?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#22 2014-08-23 07:33:49

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: WOL causes spontaneous power on after shutdown [SOLVED]

This is pure conjecture on my part, but netctl issues "bring_interface_down" during shutdown. It might be that wake on lan needs the interface enabled or up. As a result, the interface gets reactivated afterwards, and that sends an unintended signal to boot your system.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#23 2014-08-23 08:03:24

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

emeres wrote:

I am curious also, it this a stationary desktop? You powered it off twice within almost 5 hours? How many hdds do you have inside?

Yes.  Yes, for testing purposes only.  One HDD and one SSD.

R00KIE wrote:

With WOL still active and confirmed working?

Yep.

progandy wrote:

This is pure conjecture on my part, but netctl issues "bring_interface_down" during shutdown. It might be that wake on lan needs the interface enabled or up. As a result, the interface gets reactivated afterwards, and that sends an unintended signal to boot your system.

Maybe...?  I will post back in a few weeks.  As I said, it was working for a few months just fine and all of a sudden (I think after the power recently went out) regressed.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#24 2014-08-23 10:10:56

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: WOL causes spontaneous power on after shutdown [SOLVED]

I was also thinking about something along the lines of what progandy suggests. There must be some difference on what if left configured (or left to configure) between the setup that works and the one that doesn't. Probing what ... does not look simple.

I suppose that you want to mirror as best as you can your netctl setup with the systemd setup (static vs dhcp), just to try eliminating as many variables as possible. I suppose you know that you can setup both wol and static ip with *.link and *.network files when using systemd-networkd.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#25 2014-08-23 16:58:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: WOL causes spontaneous power on after shutdown [SOLVED]

graysky wrote:

I will post back in a few weeks.  As I said, it was working for a few months just fine and all of a sudden (I think after the power recently went out) regressed.

Well, that was short lived.  The test I did was to remove the power cord simulating the power failure.  Upon rebooting, problem was back.  I was also mistaken about booting into windows 7 then shutting down as a fix.  I tried this and upon powering down and booting up in to Linux (and then shutting down), the problem was back.  Perhaps I can blame the MB? The Intel LAN chipset?  I have 1/2 a mind to try another MB (different brand) with a different LAN chipset and see if that works.  Maybe someone will give me $50 for this MB.

EDIT:  MSI H97I AC Mini ITX uses an Realtek 8111E LAN which to different... perhaps I will try it for $110...

Last edited by graysky (2014-08-23 17:35:42)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB