Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wake_on_lan [2022/01/16 14:15] grandmabettywake_on_lan [2022/09/28 08:52] (current) – [Machine will not wake up] clarification on what batocera does automatically atari
Line 1: Line 1:
 ====== Wake on LAN (WoL) ====== ====== Wake on LAN (WoL) ======
  
-The [[wp>Wake_On_LAN|Wake-on-LAN (WoL)]] feature was implemented in Batocera **v33** where it is enabled on any WoL capable system by default (if you want to disable WoL for your system for whatever reason, then just disable WoL your system's BIOS). With WoL it is possible to turn on/off your Batocera machine by sending a "magic packet" (or something else, more info later) from a remote WoL client via a network cable. This could be used to turn on the machine by using network protocol call, network-connected IR remote receiver, a packet sent over a virtual network, and many other things!+The [[wp>Wake_On_LAN|Wake-on-LAN (WoL)]] feature was implemented in Batocera **v33** where it is enabled on any WoL capable system by default (if you want to disable WoL for your system for whatever reason, then just disable WoL in your system's BIOS). With WoL it is possible to turn on/off your Batocera machine by sending a "magic packet" (or something else, more info later) from a remote WoL client via a network cable. This could be used for [[homeautomation|automation purposes]], for example to turn on your Batocera system at specific time at night to backup all your userdata and games to NAS and then shutdown again. And many other things!
  
 ===== Requirements ===== ===== Requirements =====
Line 8: Line 8:
   * **BIOS**: The system's BIOS must support WoL (you may have to enable WoL within your system's [[:install_batocera#bios_settings_if_batocera_fails_to_boot|BIOS settings]]).   * **BIOS**: The system's BIOS must support WoL (you may have to enable WoL within your system's [[:install_batocera#bios_settings_if_batocera_fails_to_boot|BIOS settings]]).
   * **NIC**: The system's network adapter must support WoL to stay "awake" while the system is powered off.   * **NIC**: The system's network adapter must support WoL to stay "awake" while the system is powered off.
 +
 +WoL is designed for use with wired Ethernet connections, but there are wireless NICs which may support Wake-on-Wireless (WoW). This article assumes you are using a standard wired connection.
  
 <WRAP center round tip> <WRAP center round tip>
 If you are dual-booting with Windows on the same machine, you may need to also [[:troubleshooting#ethernet_connected_but_no_data|tell Windows to not disable the WoL shutdown procedure in its drivers]]. If you are dual-booting with Windows on the same machine, you may need to also [[:troubleshooting#ethernet_connected_but_no_data|tell Windows to not disable the WoL shutdown procedure in its drivers]].
 +</WRAP>
 +
 +===== Setting up the BIOS =====
 +
 +This section can not be specific to your motherboard's BIOS configuration, so the instructions can only remain broad. With that said, here are the options you must generally set:
 +
 +  * **Wake-on LAN**: Any setting that's related to this should be **enabled**/activated/unblocked.
 +  * **Wake-on PCI**: The same as above (**enabled**), if this option is separated out from the previous one then it usually refers to the powered state of the NIC when the rest of the machine is shut down.
 +  * **Network stack**: Set to **disabled**. Usually, this setting is in relation to whether or not the BIOS itself gains control of the network connection; if it does then WoL cannot function.
 +  * **IP configuration**: When done in the context of the BIOS, this means the Network Stack is enabled. If there's no explicit option to turn off the network stack, leaving all the IP-related fields empty should disable it.
 +  * **Power savings profile**: When mentioned in relation to the shutting down of devices when the machine is in S3/4, **disable** this. It may cause the NIC to shutdown after a period of inactivity.
 +
 +When done, save and reboot to apply.
 +
 +<WRAP center round info>
 +You may be wondering if you also need to enable the Wake-on-LAN feature in the NIC's settings as well. You don't, Batocera will automatically take care of enabling it for you.
 </WRAP> </WRAP>
  
Line 16: Line 34:
  
 <WRAP center round important> <WRAP center round important>
-Note: It is important to have your WoL client and your Batocera system within the same [[https://en.wikipedia.org/wiki/OSI_model#Layer_2:_Data_link_layer|Layer 2]] subnet of your network, otherwise WoL will not work as WoL packages cannot be routed over different subnets.+Note: It is important to have your WoL client and your Batocera system within the same [[https://en.wikipedia.org/wiki/OSI_model#Layer_2:_Data_link_layer|Layer 2]] subnet of your network, otherwise WoL will not work by default. 
 + 
 +It is possible to set up a dynamic DNS and port forwardings on your router to send WoL from other subnets but that is outside of the scope of this article.
 </WRAP> </WRAP>
  
Line 92: Line 112:
  
 The most important value is ''g''. Without it being shown, the NIC does not support WoL at all. The most important value is ''g''. Without it being shown, the NIC does not support WoL at all.
 +
 +Batocera should automatically turn on the MagicPacket(tm) feature when the connection is established. If that fails, in order to turn on WoL manually run the following:
 +
 +<code>
 +ethtool -s eth0 wol g
 +</code>
 +
 +where ''eth0'' is the name of your network interface.
  
 ==== It works great the first time! But not any time after... ==== ==== It works great the first time! But not any time after... ====
Line 97: Line 125:
 If dual booting, the cause is most likely the second operating system turning WoL back off. On Windows, [[:troubleshooting#ethernet_connected_but_no_data|turn off the shutdown WoL feature]]. If dual booting, the cause is most likely the second operating system turning WoL back off. On Windows, [[:troubleshooting#ethernet_connected_but_no_data|turn off the shutdown WoL feature]].
  
 +==== Machine will not wake up anymore ====
 +
 +If you were successfully using WoL but suddenly it does not work anymore, a power outage of your Batocera system could be the issue. Since WoL functionality relies on a "sleeping" NIC state issued when shutting down the system, the NIC will not be in "sleeping" state anymore after power outage. Therefore you can only make WoL work again by manually booting and then shutdown the system once.
  • wake_on_lan.1642342534.txt.gz
  • Last modified: 4 years ago
  • by grandmabetty