When M-chip Macs boot, sometimes the A&H Midi control cannot connect until the network device has been turned off and on again.
This LaunchDaemon cycles the en0 Ethernet interface at every boot,
running as root so no sudo password is needed.
# 1. Copy the script
sudo cp restart-en0.sh /usr/local/bin/restart-en0.sh
sudo chmod 755 /usr/local/bin/restart-en0.sh
# 2. Copy the plist
sudo cp com.local.restart-en0.plist /Library/LaunchDaemons/com.local.restart-en0.plist
sudo chown root:wheel /Library/LaunchDaemons/com.local.restart-en0.plist
sudo chmod 644 /Library/LaunchDaemons/com.local.restart-en0.plist
# 3. Load it (takes effect immediately + every future boot)
sudo launchctl load /Library/LaunchDaemons/com.local.restart-en0.plistsudo launchctl list | grep restart-en0cat /var/log/restart-en0.logsudo launchctl unload /Library/LaunchDaemons/com.local.restart-en0.plist
sudo rm /Library/LaunchDaemons/com.local.restart-en0.plist
sudo rm /usr/local/bin/restart-en0.sh- This runs at boot (before login), not at login. That means en0 is already cycled by the time you sit down and open MIDI Control.
- If you'd rather run it at login instead, move the plist to
~/Library/LaunchAgents/— but then it runs as your user and you'd need a sudoers NOPASSWD entry for ifconfig. - The 5-second sleep between down/up gives the link time to fully drop. Increase it if your switch takes longer to re-negotiate.