Suddenly my Ubuntu 24.04 server on an MacMini from 2012 stopped playing music over network and was completely unreachable - even over LAN and ssh.
I sent the machine into suspend by pressing once on the MacMini's power button. Pushing again when the LED is blinking slowly resumes it from suspend and the network is back, so that I can e.g. ssh again.
Checking the kernel logs with journalctl -b0 -k -n600
I found that the tg3 kernel module threw lots of failure messages before network all of a sudden stopped working at all.
Searching for tg3 kernel macmini ubuntu
led me to https://www.reddit.com/r/linux_on_mac/comments/w3hisc/network_dropout_fix_for_linux_on_mac_with_kernel/ and the solution:
In /etc/default/grub change GRUB_CMDLINE_LINUX=""
to
GRUB_CMDLINE_LINUX="iommu.passthrough=1"
or if you already had boot options set add iommu.passthrough=1
.
Don't forget to sudo update-grub2
before you finally reboot your machine.
IOMMU seems to be a ARM-Chip-specific feature that leads to problems on a x86-machine. After reboot I haven't seen any similar messages in the kernel logs again yet. Also no lost network connections after 24h at least. The reddit post suggests that this little change solved massive network problems for a lot of the responders.