lgarron / first-world

Issues that are not necessarily easy to report/fix, and are (generally) not a matter of life-or-death.
https://github.com/lgarron/first-world/issues
0 stars 0 forks source link

Universal Control won't connect/stay connected #155

Closed lgarron closed 1 year ago

lgarron commented 1 year ago

I have two computers, a new 2023 Mac mini and a 2021 MacBook Pro. Universal Control has worked between them until a few hours ago. They are:

The computers can also definitely connect: file sharing is reliable, and I can SSH from either computer to the other. There is no relevant firewall.

Universal Control has been fairly reliable so far, apart from when the Mac mini was using Network Link Conditioner with unthrottled Maestral (https://github.com/samschott/maestral/issues/438).

With Maestral throttling it's been fairly reliable, but for the past day I've run into extreme flaky behaviour and disconnection. The computers would recognize each other in Control Center, but disconnect easily. Sometimes I could kick-start it by switching which computer I tried to initiate the connection from. But and after some point, they just failed to connect at all:

A connection error has occurred / Ensure your device is nearby and has both Bluetooth and Wi-Fi turned on. / OK

After rebooting, the devices don't even show each other in Control Center anymore.

Another clue is that screen sharing also no longer works (although file sharing does), despite no changes to relevant settings since it used to work reliably.

lgarron commented 1 year ago

It looks like the new computer is now facing some severe file system slowdown and disk mounting issues. Together with the crashes from https://github.com/samschott/maestral/issues/438#issuecomment-1420349804 I'm starting to suspect a hardware issue with the new computer.

lgarron commented 1 year ago

It just keeps getting worse. The computers could share files in Finder a few minutes ago, but now the new computer doesn't respond to ping:

> ping Pythagoras
PING pythagoras.lan (192.168.86.43): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
lgarron commented 1 year ago

Alright, I tried unplugging Ethernet and switching to Wi-Fi only, but this just makes the connectivity go haywire:

64 bytes from 192.168.86.43: icmp_seq=15 ttl=64 time=4553.520 ms
64 bytes from 192.168.86.43: icmp_seq=16 ttl=64 time=3548.328 ms
64 bytes from 192.168.86.43: icmp_seq=17 ttl=64 time=2547.931 ms
64 bytes from 192.168.86.43: icmp_seq=18 ttl=64 time=1546.176 ms
64 bytes from 192.168.86.43: icmp_seq=19 ttl=64 time=543.054 ms
64 bytes from 192.168.86.43: icmp_seq=20 ttl=64 time=20.585 ms
64 bytes from 192.168.86.43: icmp_seq=21 ttl=64 time=201.768 ms
64 bytes from 192.168.86.43: icmp_seq=22 ttl=64 time=295.235 ms
64 bytes from 192.168.86.43: icmp_seq=23 ttl=64 time=248.033 ms
64 bytes from 192.168.86.43: icmp_seq=24 ttl=64 time=321.611 ms
lgarron commented 1 year ago

Also weird:

  1. The computers can recognize that they're connecting, showing up in Displays under System Settings. But the mouse and keyboard just refuse to transfer now.
  2. I can successfully mirror a screen onto the other computer using Wi-Fi only.

It's as if one of the computers just decided to absolutely refuse transferring the cursor (probably the Mac mini)?

lgarron commented 1 year ago

Most online advice on this issue is useless for my situation, but https://iboysoft.com/howto/universal-control-not-working.html#force-quit-universal-control-in-activity-monitor has some helpful ideas, including:

lgarron commented 1 year ago

I signed out and back into iCloud, since nothing else worked. That seems to have done the trick.

This is a very unsatisfying resolution, since signing out and back into iCloud is disruptive and risky: you have to carefully re-enable a lot of settings (including security & safety settings), wait for iCloud Drive files to re-download, reconnect various things like the Photos app, and manually re-verify each card in Wallet using a slow process. The Photos app is still not syncing on one of the computers.

Screenshot 2023-02-10 at 12 00 47Screenshot 2023-02-10 at 11 34 06Screenshot 2023-02-10 at 11 30 42 copy 2Screenshot 2023-02-10 at 12 23 43

lgarron commented 1 year ago

The Photos app is still not syncing on one of the computers.

Okay, this worked:

... but Universal Control is broken again. 🙄 My current theory is that there's a race condition for whether the devices see each other over Wi-Fi first, vs. Ethernet. A total guess, though.

lgarron commented 1 year ago

... but Universal Control is broken again. 🙄

… and just as suddenly, after about a day of just giving up on getting it working, without any reboots, network resets, or other way to kickstart the computers to recognize each other… it works again.

I'm glad it's working for now, but Apple has made this extremely undebuggable.

lgarron commented 1 year ago

... but Universal Control is broken again. 🙄

… and just as suddenly, after about a day of just giving up on getting it working, without any reboots, network resets, or other way to kickstart the computers to recognize each other… it works again.

I'm glad it's working for now, but Apple has made this extremely undebuggable.

This has been broken again for a few days now, even after rebooting both devices.

lgarron commented 1 year ago

Aha! It was toggled off.

Screenshot 2023-03-09 at 20 57 26

I would not have intentionally toggled and left it off, so I hope this is from some form of debugging that I was doing. But I wouldn't rule out that it happened automatically somehow.

In any case, it works again once I toggle it on.