9 ms·
Apple seems to do all kinds of weird networking _stuff_. For instance, during wakeup, your T2 equipped Macbook will wait for a DNS response and then use said DN
by eptcyka 6y ago
Apple seems to do all kinds of weird networking _stuff_. For instance, during wakeup, your T2 equipped Macbook will wait for a DNS response and then use said DNS response to synchronize time via NTP before letting the user use the keyboard. Probably checking timestamps on signatures for the keyboard firmware, or something stupid like that. This only happens if it happens to have a default route.
Similarly, all macOS machines will test a DHCP supplied default route before applying it by trying to reach something on the internet. So if you happen to have some firewall rules that block internet access, no default route will be applied until the internet check times out.
I won't share the other sentiments about the above, but is it really that hard to document these behaviors?
- thewebcount 6y agoOh wow! This probably explains why every now and then when I wake my MacBook Pro from sleep it says no keyboard is connected! I thought I had some hardware problem on a basically brand new machine. Glad to hear it's only a stupid software problem!
- dmd 6y agoIf you're using Cisco Anyconnect, blame that for that particular keyboard issue.
- dylan604 6y agoWhy not blame the idiotic decision to make this network check just to wake up?
- eptcyka 6y agoI think the threat model here is that someone might've swapped out your keyboard to one that's spying on you, whilst you're out at a conference enjoying the more social aspects of such gatherings. At the same time, if you were to not be connected to a network, this kind of verification wouldn't do anything.
- junon 6y agoI don't believe this is ever the case. What happens if you legitimately installed a new keyboard? Will Apple just... prevent you from using it?
- dylan604 6y agoI have a 2017 MBP. There are several keycaps that that are no longer physically connected to the key, so if I tilt the laptop 4 or 5 keys fall off. I have been dealing with it by using an external Apple keyboard (with added benefit of having 10-key and full sized arrow keys). Since it's on a desktop in this config, I have it set to never sleep so luckily I have not seen this unwakeable fuck up.
- deleted 6y ago[deleted]
- hombre_fatal 6y agoApple has a three year warranty which means yours may have run out or is about to run out. If you still have time, get your keyboard replaced for free: https://support.apple.com/keyboard-service-program-for-mac-notebooks https://support.apple.com/keyboard-service-program-for-mac-n... (it also means they have to replace your mobo and battery due to brilliant Apple engineering). It doesn't fix the problem, but it resets the clock until they fall off again. In Texas, it was <48 hours between dropping my Macbook off at the Apple shop and receiving it on my doorstep.
- dylan604 6y agoThe big question is will they extend the warranty by the number of months the Apple Stores were closed due to pandemic lock down? My keycaps didn't start misbehaving until about April.
- wtf_srsly 6y ago48 hours is pretty optimistic. At least for the 2016 model they can't just change the keycaps but they'll have to change the whole bottom case. This took a few weeks for me since I had to send it to a certified repair center.
- unethical_ban 6y agoIt's any VPN software that is always-on.
- ClearAndPresent 6y agoOr Wireguard. The absurdity of sitting in front of a frozen keyboard and trackpad for up to a minute before I can unlock the screensaver on a 2k machine has driven me spare. And now has driven away from these astounding lemons. This is the last Apple laptop for me.
- wincy 6y agoUgh, Cisco AnyConnect, had my MDM policy erroneously install the 32-bit version of it and removing it required finding a shell script in /opt/cisco and running to deregister it before I could install the updated version. So much fun!
- deleted 6y ago[deleted]
- ryukafalz 6y agoHappens with the built-in, first-party VPN client as well. Definitely not just a Cisco issue.
- mschuster91 6y agoSo I'm not the only one?! Holy I thought I was going crazy, dropping out of the VPN meant a ten second freeze until a couple of weeks ago. Do you have any additional sources?
- apple4ever 6y agoOh my gosh this explains so much. I blame Apple though for their terrible software.
- cbowns 6y agoomgggg it's not just me?! I thought it was bad hardware. this is both good and bad news; at least I can sort out a way to mitigate this now.
- dheera 6y ago> wait for a DNS response and then use said DNS response to synchronize time via NTP before letting the user use the keyboard ... and what if your network is down? You can't even use your keyboard?
- eptcyka 6y agoI should've clarified - it only does this if there is a default route. Funnily enough, whilst the firewalls in the original twitter post would possibly fail to catch this traffic, PF will block it just fine.
- xenospn 6y agoHaving a default route does not mean the internet is reachable.
- eptcyka 6y agoI wish Apple agreed. But on the other hand, there are use cases where checking for the existence of a default route is the best heuristic.
- Spivak 6y agoI mean that's what a default route is supposed to mean, right? That this machine can route to any address. It might not get there because of a firewall, or because nothing is at a given address but you're at least claiming to know what to do with a packet destined for anywhere.
- ryukafalz 6y agoI think that’s a reasonable assumption for applications to make. I think that’s a less reasonable assumption for your keyboard to make.
- deleted 6y ago[deleted]
- nateberkopec 6y agoHoly cow, you just explained a load of weird keyboard behavior I was seeing after waking from sleep.
- jidiculous 6y agoI'm seeing this weird keyboard behaviour on wakeup with my 2012 MBP running Catalina too
- deleted 6y ago[deleted]
- gumby 6y ago> but is it really that hard to document these behaviors? I imagine it is, given the bureaucracy of a big company. Apple's documentation has long been really dreadful, mostly nonexistent and where it does exist, usually incomplete and even wrong. I've assumed it was because the code itself is developed by isolated groups while the documentation presumably has to touch all sorts of people (publishing, translation, language checks, ...) in a kind of Conway's law. However, hard or not, writing comprehensive documentation is quite doable. I have never been a fan of the Windows programming model but I have long admired not just MS's documentation but the amount of effort and commitment they obviously put in. Apple cares about some things but in this regard it appears they simply don't give a shit.
- dkdbejwi383 6y ago> Apple's documentation has long been really dreadful Developer docs for most of their libraries are usually just the method name in a large font and the parameter types and that's it.
- saagarjha 6y agoOnline documentation. For some reason the qualification is necessary because their header files have a bunch of information that whatever script or tool that generates the webpages doesn’t catch.
- LocalH 6y agoMakes one wish Woz’s Apple was still around (and yes I know Jobs tried as hard as he could to put a monkey wrench into that at the time)
- TheRealDunkirk 6y ago> Apple's documentation has long been really dreadful, mostly nonexistent and where it does exist, usually incomplete and even wrong. Anyone want to tell him about Microsoft's Azure or .NET documentation?... It's the same all over.
- 6y ago
- tmd83 6y agoUnrelated but has anyone often had Chrome going on cpu usage rampage and unresponsive fairly frequency on 'wakeup from sleep'? It's almost certain to happen if the chrome has been updated and waiting to be restarted.
- dylan604 6y agoApple touted the T2 chip as the bee's knees in security. Now, we have a vulnerability that cannot be defended against. However, Apple went all in on the security of this T2 chip so that you cannot replace the SSD (besides the method to manufacture). I appreciate the desire at making a device difficult for a bad actor to get to your data, but they epicly failed and ultimately only made an user-hostile device. Oh, and the laptops with these chips also had the world's worst keyboard. Absolute trash.
- rorykoehler 6y agoAdditionally charging on the left side ports makes the T2 chip overheat and crashes the machine on occasion.
- simonklitj 6y agoWhat if you have a model with ports only on the left-hand side? Does it crash it as well?
- imwillofficial 6y agoMine doesn’t.
- rorykoehler 6y agoI'm not sure. I have a 2019 mbp 16 with a dodgy logic board and while it crashes even without charging on the left it definitely crashes more often when charging on the left. I'm stuck in limbo because I need my machine for work. Will take it in when I have a break. Some threads https://discussions.apple.com/thread/250905859 https://discussions.apple.com/thread/250905859 https://forums.macrumors.com/threads/2019-16-inch-macbook-pro-crashes.2220219/ https://forums.macrumors.com/threads/2019-16-inch-macbook-pr...
- dylan604 6y agoAre the Apple Stores in your area even open to take the laptop in? I have delayed my attempt to get my keyboard looked at because of Covid.
- smolyeet 6y agodo you have a source for the keyboard part? I experience odd delays in typing and this would definitely explain that.
- m463 6y agoThe other odd delays are from gatekeeper checking each command you run via the network.
- dkdbejwi383 6y agoHmm is this also why I can't use my bluetooth mouse at the login screen?
- dvtrn 6y agoWould certain go a long way to explain why waking my MBP up after going AFK involves an affair that requires me to undock it from my vertical stand, entering password, and awkwardly trying to place it back into the stand, reconnecting peripherals while slapping the BT keyboard endlessly so it doesn't go back to sleep after login. Quite annoying.
- ardy42 6y ago> reconnecting peripherals while slapping the BT keyboard endlessly so it doesn't go back to sleep after login. https://www.cru-inc.com/products/wiebetech/mouse_jiggler_mj-3/ https://www.cru-inc.com/products/wiebetech/mouse_jiggler_mj-...
- sildur 6y agoWhen I had the authenticate with watch option enabled, and for some reason the watch lagged, the Mac didn't allow me to log in with my password or finger.
- m463 6y agocheck out their captive portal detection. It's a mess of apple-specific garbage.
- commandlinefan 6y agoI was trying to figure out how my routing table was set up on my iPad and I found out that iOS doesn't expose any interface to routing tables, at any level of privilege. Very frustrating.
- e28eta 6y agoI think this is probably wrong. I don’t know what the interface is, but on my iPad running 14.0.1 this app shows a Routing Table that looks okay to me. https://networktools.he.net/ https://networktools.he.net/
- ardy42 6y ago> Apple seems to do all kinds of weird networking _stuff_. For instance, during wakeup, your T2 equipped Macbook will wait for a DNS response and then use said DNS response to synchronize time via NTP before letting the user use the keyboard. Probably checking timestamps on signatures for the keyboard firmware, or something stupid like that. This only happens if it happens to have a default route. When did they start doing this? I'm still using High Sierra on my 2018 MBP work laptop, because the keyboard and trackpad was freezing for anywhere up to 5 minutes or more with Mojave after a wakeup (usually after a long sleep). Downgrading to High Sierra fixed it, but fighting with the machine was such a pain I haven't dared touch it since. I'm wondering if you're describing the problem I was having, but could never figure out.
- winter_blue 6y agoAnother reason why I'm going to stick with Linux for the foreseeable future. I just wish the font rendering situation on Linux was better though. Text (in browsers) just looks so bad on Linux compared to both Windows and mac.
- Phlogi 6y agoNo, it's fine, just needs a bit of tweaking: https://aswinmohan.me/posts/better-fonts-on-linux/ https://aswinmohan.me/posts/better-fonts-on-linux/
- winter_blue 6y agoThank you!
- udev 6y agoThat's how typical Apple "magical/just works" features are implemented, i.e. very ugly behind the curtain. Documenting means revealing the edge cases and the limitations, which engineering knows is the best kind of documentation. But marketing people are invested in the "magic". Marketing people have too much sway at Apple.
- centimeter 6y ago> your T2 equipped Macbook will wait for a DNS response and then use said DNS response to synchronize time via NTP before letting the user use the keyboard. Holy shit, this is why my macbook sometimes won't let me log in for like 15 seconds on my shitty cellular hotspot connection? Absurd. Apple software has fallen so far from just 10 years ago.
- protomyth 6y agoGreat... Well, that explains the crappy response on some bad connections. I really wish Apple executives were forced to use their computers on crap wifi. Who am I kidding, I would imagine Tim Cook hasn't used a Mac in years.
- codezero 6y agoThe keyboard thing is new to me, wow that sucks. The other one sounds like a workaround for captive portals. I think there is some documentation on that wrt Safari and the built in networking, but it was mostly a workaround needed to deal with wifi hotspots that intercept dns until you pay/subscribe, and it causes safari to look hung - so they had to make it clear it wasn’t their browser hanging since it couldn’t make SSL connections.
- eptcyka 6y agoCool, can you reference some docs or any communication from Apple re the captive portal workarounds? It feels rather heavy handed as there are ways other systems have worked around this that don't hijack routes.
- codezero 6y agoI don’t work for Apple, you might ask their developer support. A quick search for Captive Network Assistant shows it’s not documented.
- LdSGSgvupDV 6y agoOS is a weird design. It lets the machine belong to Apple/MS/Google not we, so they could update whatever they want or query to their website secretly. You can't even stop them because once you installed you agreed for all. You don't have choices to partially agree. It makes me feel like when you have a cecal surgery, the doctor also took out your foreskin for auto-updating.
- leshenka 6y agoI'm working from home now, and in my company we use Tunnelblick for vpn into corp network. VPN has time-based OTP so it never gets saved. Sometimes when my MBP goes to sleep it loses wifi connection and VPN disconnects. When it wakes up, Tunnelblick asks for password, but it doesn't restore routes (I guess?). Basically no internet until I either enter password or click disconnect. At that moment I'm typing in my OS password and pressing Enter. What then happens is that it waits for ≈30 seconds and then logs me in, as if it made a network request and waited until it timed out. Could it be related to the issue you're describing?
- spockz 6y ago> For instance, during wakeup, your T2 equipped Macbook will wait for a DNS response and then use said DNS response to synchronize time via NTP before letting the user use the keyboard. Aha so this is why I need to put my MacBook back to sleep after waking on a spotty WiFi connection or when it was previously connected to vpn which timed out during sleep!
- gsteiner 6y agoWhat's the DNS name and type that gets looked up?
- Zenbit_UX 6y agoYou actually just helped me diagnose a really annoying bug I've been having lately. When I wake up my Mac from sleep mode the keyboard and mouse are unresponsive for a up to a few minutes in some extreme cases, sometimes I even have to hard reboot. I found online that it was related to VPNs trying to restore their connection but I could never find the link between the keyboard and the VPN. It was also compounded by the VPN setting I use to disable all traffic until it successfully reconnects. Meaning whether my computer works or not is dependent on my VPN providers reliability. Now that I know Apple thinks I need an internet connection to wake up my laptop securely I'm quite pissed by this. Brand new $4k laptop is a paperweight if my VPN can't connect.