Mac mini loses wifi when an ubuntu computer is on the same network
Try locking down the MAC address into the router to a specific IP address.
MAC address is media access controller not the mac mini.
The router will dhcp the same IP each time you connect.