I use Nas4Free on HP ProLiant MicroServer. Nas4Free is based on FreeBSD and I and some other people have a problem that is related to the bge NIC driver included in the last FreeBSD kernel.
We can't use Wake On Lan feature, even if it is enabled in BIOS. It is an issue with FreeBSD, because we can use WOL with other OS (such as Linux) on the same hw.
Someone noticed the WOL feature works if the NIC is connected to a Gigabit Ethernet, but not if the link is 100Mbps. Unfortunately I can't test Gigabit on my system.
Someone says older Nas4Free versions worked, for example that based on FreeBSD 9.2.
You can read much more details on a specific thread present on Nas4Free forum, here (https://www.nas4free.org/forums/viewtopic.php?f=58&t=4756&start=30).
The same applies for FreeNAS which is also based on FreeBSD. With my HP ProLiant MicroServer N54L I have the same issue that WOL is not available - even with Gigabit ethernet connected.
Patches seem to exist (e.g., https://bitbucket.org/w4w/bge-wol-freebsd-10.1-patch).
Created attachment 186870 [details]
if_bge.c patched with the bge-WOL patch from https://bitbucket.org/w4w/bge-wol-freebsd-10.1-patch/overview
Created attachment 191147 [details]
WOL patch for bge.
This patch was posted to PR 171744. The caveat is listed there, though the problem may simply be my laptop.
I'll consider closing either this or 171744 as a dup of the other.
Please try not remove group assignment when "Taking" bugs.
Not sure what the fix is, and how 171744 is relevant (it's about the wake command, if I understand correctly).
Just wanted to chime in. I have a machine with a bge-driven card for which WOL worked perfectly with 10.3-RELEASE. I activated it with 'ifconfig bge0 wol_magic' and then used the wakeonlan utility on a linux (ubuntu 16.04) machine to wake up the freebsd machine.
Yesterday I upgraded to 11.1-RELEASE (something I have put off for ages because I was afraid something would break, but with the EOL coming up I decided to take the risk), and WOL just stopped working.
It isn't even advertised anymore as a capability in ifconfig:
# ifconfig -m bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
inet 10.1.3.8 netmask 0xffffff00 broadcast 10.1.3.255
media: Ethernet autoselect (1000baseT <full-duplex>)
media autoselect mediaopt flowcontrol
media 1000baseT mediaopt full-duplex,master
media 1000baseT mediaopt full-duplex
media 1000baseT mediaopt master
media 100baseTX mediaopt full-duplex
media 10baseT/UTP mediaopt full-duplex
Needless to say, 'ifconfig bge0 wol_magic' doesn't enable it anymore either.
I don't understand why it worked on 10.3. The WOL code was not in bge at the time. The patch is for 12-CURRENT. I'll rework it for 11-STABLE.
The patch attached to this PR also works with stable/11 and releng/11.1.
(In reply to Cy Schubert from comment #6)
Hi, thanks for the reply (and the reworked patch). I guess the patch won't go upstream because of the reasons mentioned (ie. potential to blow up boards that can't support enough power when the system is powered down)?
I'm also surprised it did work for me. I actually woke up the machine with wake-on-lan to ssh into it and upgrade it to 11.1-RELEASE.
(In reply to Koen Martens from comment #8)
That bug has been fixed in the latest patch I posted here. No worries about drawing too much current when powered off any more.
I've been using it and previous versions of this patch on my laptop (only machine I have with bge) for about a year.
I suppose I should submit the patch in phabricator for review prior to commit.
There still have issue with WOL patch for bge driver on FreeBSD 11.2.
It seems there is boot issues, see here:
(In reply to NK from comment #10)
Sketchy details. There's nothing to go on.
The WOL patch was developed for 12-CURRENT only. The only issue is a system will not halt -p after being woken by WOL, but will after a reboot.
I'll try to port it back to 11-STABLE if anyone is interested.
(In reply to Cy Schubert from comment #11)
I would very much appreciate it. Thanks a lot for your efforts!
Created attachment 197700 [details]
WOL patch for stable/11
Same patch, for stable/11. I haven't tried to build or use this particular patch on stable/11. However a previous version was developed for current/11 at the time. This patch has the same problem as the -CURRENT patch, the system will reboot on halt -p the first time around. I'm not sure of the solution for this yet.
I had 11.1 patched with https://github.com/NamTaf/if_bge_wol and it worked
can I apply the same patch on 11.2 p4 ?
I only need this for WOL.
Any hope to make it work please ?
I have an old but full functional HP Microserver and I can't upgrade because of this issue.
A fix would really appreciated
Created attachment 212388 [details]
Latest WOL patch for bge
The patch generally works, I currently use it. However halt -p after a WOL will not power off the machine but reboot it. Only after the next reboot will it be able to power off. I don't know if this is isolated to my laptop only or if this is a general problem. Try the patch if it has the same behavior as on my laptop and report here or back to me your result.
Ping me if the patch posted here doesn't apply. I'll backport the one from 13-CURRENT again.
*** Bug 171744 has been marked as a duplicate of this bug. ***