Gzip exceptions, but only on hot or rainy days
alexyorke.github.io
alexyorke.github.io
> send in an electrician this time. They asked lots of questions, and then recommended that my air conditioner stay on a different outlet because there were two circuits. I tried this for a few days, but the issues still reappeared.
Either something is missing or both the author and the electrician are absolutely insane. There is a grounding issue, which could mean anything from a broken outlet to incompetent wiring throughout the house, and they aren't thinking about fixing it immediately? Let's try a workaround for a few days? I have no words.
That's how it used to be done! Remember a lot of houses were built before electricity and it's been retrofitted over time.
It makes perfect sense if you think about it.
Pretty sure that is how it is done in my much newer than electricity build.
Cable guy installing high speed internet was all "nope!". I think the previous owners just had crap internet and didn't ever get into why.
Right.
> I've seen plumbers using a rubbery-looking tape between the threads when screwing two metal pipes together, which might not be conductive
Probably PTFE (teflon) tape.
The thing to do with oldschool copper pipes though was to braze them together, which is conductive.
And the purpose of grounding the pipe isn't to use the pipe as a ground (some very old electrical setups may have done this), it is to prevent the pipe from getting energized by a wire or something resting against it. If the pipe is properly grounded, that'll short out a breaker.
If you don’t know whether it’s properly done, it’s much more efficient to throw a ground cable from the nearest service junction than it is to “hope” and then have to fix things later.
The whole idea is that the ground wire is the least resistance path for stray current to go to. When you have separate ground paths there can be a dangerous potential between ground wires and the least resistance path for stray current can again be you.
You can only have a SINGLE tie between neutral and ground.
What we don't know here is if the piping is tied to a grounding rod, or if there is a grounding rod or if the piping is the ground point.
> They asked lots of questions, and then recommended that my air conditioner stay on a different outlet because there were two circuits.
An AC has sufficient power draw that you'd normally put it on its own, exclusive, circuit. Like a drier or washing machine. Not on whatever random outlet is nearby.
The US grid has gotten better, and machines have too, but lights used to dim all the time.
When using the ungrounded adapter, the entire case of my 2011 MacBook Air and the iPad 2 got slightly "spicy", although it felt more as if the case suddenly changed texture and was more wavy (probalby an artifact of europes 50Hz mains frequency).
The strangest thing was turning on my touch controlled desk light while working on the laptop. If I touched the light and the laptop at the same time, the light shocked me quite noticeably.
Instead one wire is neutral, one is phase, and the third, optional, is ground.
In the US there is one neutral and one hot line. Then there is the ground that is grounded at the box preferably. You can sometimes have a 240 line split to feed two 120 outlets where the hot lines from each are at a 240 difference to each other. If one line has a large load relative to the other, the neutral won't be that close to ground. Is that was is happening with these laptops?
Shouldn't it still be pretty close voltage wise? If we hold the neutral is always at 0v at the panel, since that's where it's tied to ground, the voltage on the neutral between the panel and the outlet should still be pretty low because copper wire has a pretty low resistance (by V=IR). I'd have to break out my calculator (and look up the actual standard values of copper wire resistance), but I'd guess even >20V would be quite unusual without some other fault...
Because it can cause power to go unexpected ways.
All the "power safety" stuff does nothing if everything is correct and perfect, but if it fails, and ground and neutral are bonded anywhere EXCEPT at the panel, you can get power flowing through you.
I measured the voltage difference and, if I recall correctly, it was something like 20V. I started using the 3-prong adapter and haven't had any more issues.
In many places electrical wiring in homes is just two wires and what wiring monstrosities await you in shabby clubs and shady rehearsal spaces is just beyond belief. Be safe.
However the electrical wiring for my apartment is only about 20 years old...
Edit: MertsA added some more info below: https://news.ycombinator.com/item?id=33572585
If I replace the direct corner adapter of the brick with an older (from a 2015 MBP 15) extension which is grounded, i.e. you can't then literally plug the charging brick directly into the power socket, there's an "extension" chord in between (and not just a generic one, this is Apple specific for the connector to the brick), the issue goes away.
No other symptoms though.
Shouldn't be able to hurt you THAT much ...
Thanks a lot for you comment. I had noticed that myself with two old Mac Book Airs.. Actually, that's how I knew if plugs were grounded or not: I could immediately tell.
But, over the years, I always wondered if there were any electrical issue (in several houses) or if it was normal.
This isn’t a building wiring issue.
It’s weird and unnatural, but there’s nothing inherently wrong.
I hope an expert can chime in, but I suspect a 'spicy' trackpad would trigger GFCI.
Just slapping a GFCI in without that bonding won't do anything though. The ground would be floating, and thus wouldn't ever trip the GFCI. There would be no path through the GFCI for the fault current to take, making the system just as dangerous as having an ungrounded conductive case.
A "double insulated" system has non-conductive material for the case of the electrical device and only needs a two-pin polarized plug. A fault of live to case won't cause danger, because the case is an insulator. A fault of live to neutral will just blow the device's internal fuse (or trip the breaker if the device has no fuse, but the breaker is just to protect the romex wiring in the walls so the device could well be on fire by that time).
If a GFCI was dependent on a device being grounded it'd be no better than a regular 3 prong outlet. We'd also have to ban 2-prong devices, which are probably most devices in a US home at this point.
Do you have any suggestions on books, tutorials or similar?
GFCI specifically works by measuring the current out = current in.
To be shocked, current out ≠ current in.
As you can guess, such an accident is nearly impossible even in the case of someone cutting through a cord accidentally.
If you are put / put yourself into the normal current path (such as while working on the innards of plugged-in and switched-on equipment), you are just the load (or part of it), and neither GFCI nor previous protection schemes will help you.
GFCI works by detecting an imbalance of current on the intended path - i.e. between live and neutral. For an ungrounded conductive case to create a electrocution risk, there must be an alternative pathway through the user's body and a potential difference to create a current on that pathway. Whenever these conditions occur, there will be a live-neutral imbalance which will trip the GFCI before any harm is done. In contrast, with an ungrounded conductive case and no GFCI, if a fault creates a situation where electrocution is possible, the only thing that could protect the victim is the circuit breaker, but the breaker must allow sufficient current for normal use, which is well above the threshold for lethality.
It's true that any such imbalance is most likely to flow through the ground of the GFCI's own Romex cable and for that reason it's best for GFCI circuits to be grounded. But an ungrounded GFCI will also trip if its hot current finds another path through ground, such as through a water pipe, because that current will not be returning through the GFCI's neutral and it will thus create an imbalance.
I bet there’s a missing or poor neutral. If your neutral wiring has problems, then you are operating at anywhere between 0 and 240 VAC depending on what else is going on, e.g. whether the AC is running or the lights are on. Additionally, if you do have any sort of ground and that ground is (improperly) tied to neutral in more than one place, then you may have substantial current flow through “ground”, i.e. the actual Earth, your pipes, your steel building structure, your body, etc.
Get a true RMS voltmeter, (safely!) connect between hot and neutral, and switch lights and AC on and off. Repeat with the meter between neutral and ground.
And consider replacing the circuit breaker on the circuit you’re using with a GFCI breaker. Several common screwups will cause it to trip.
The most plausible explanation I can think of would be if the return current is flowing through the monitor and EMI from that is disturbing things, but 60Hz might as well be DC to modern signal rates, so that's tantamount to blaming witchcraft.
But yeah, these sorts of "bad wiring" situations can have baffling effects. I would love to see someone in one these situations actually manage to get a logic analyzer trace or similar to show what's actually going on with the power supply, together with an investigation (and fix) of its real cause.
Electricians that aren't particularly well trained, or particularly experienced are probably not going to be able to diagnose this kind of problem.
This is really a problem for an electrical engineer.
Unfortunately, in most jurisdictions, engineers aren't allowed to perform these kinds of repairs because they don't necessarily have the certifications to perform work on live wires.
Most electricians can only trace wires and identify visible faults, and replace things that aren't up to building codes.
What I think is more likely in this case is the A/C turning off. All electric motors induce a current whose direction is opposed to the originally applied current (Lenz's Law). This is called back-EMF or counter-EMF. It's also proportional to the rate of change of the magnetic flux. You can see this when you turn on a motor like a vacuum cleaner, and observe the lights briefly dim. The same thing happens when a motor turns off. Additionally, things like vacuum cleaners or fans have relatively little resistance to them, so when they turn off they can coast down - small rate of change, small impact to voltage levels. An A/C or refrigerator compressor presents a relatively large resistance to its driving motor, so when it shuts off, it shuts off HARD. Big rate of change, big induced voltage spike. I don't know about a small motor like you'd see in a household, but large industrial motors can generate hundreds of volts when turned off. This is usually handled with a circuit called a snubber, but it doesn't generally matter in residential applications so it's rare to be included, as a cost savings measure.
[0]: https://www.kleintools.com/catalog/electrical-testers/recept...
In US/Canada, power supply is done via 240V split phase. Therefore, a broken neutral between service and home would have lead to a 120V outlet getting anywhere between 0 and 240V AC. That sure would have lead to something a lot less pleasant than just gzip errors.
That is true, although loads are normally balanced between the two phases so that the extremes don't often appear, and the neutral could just be intermittent instead of fully broken. But a heavy load (such as the air conditioner in the article) would definitely cause the voltage to swing to one extreme.
PC equipment such as voltage regulators put out a lot of noise. The neutral is not bonded to the metal chassis when a ground is not present, meaning the difference in potential in the chassis cannot be synced with ground, causing various crazy issues. It's why cases still are overwhelmingly metal, steel mostly.
The neutral should also be bonded to ground at the panel in residential installations.
It used to be there was no ground, and neutral carried the ‘return’ load and was also used for equipment grounding and the like. It’s not as terrible an option as you’d think, if everything else is done correctly.
However, this can be dangerous as certain types of wiring setups (generally incorrect and non-code compliant) can produce voltages on other neutrals in the circuit, and if that is being used to ground a metal case (which there is no other alternative), zap to anyone who touches it.
Especially if someone wired something backwards and you get a hot neutral (aka now hot metal case). Especially if the badly wired thing is something sporadic, like a rarely used light switch or outlet. It turns it into a ticking time bomb.
It’s a somewhat common DIY error to create floating grounds (and floating neutrals), and a floating ground can still cause this even with modern wiring with the right kind of screw up.
It’s one of the most dangerous types of wiring problems.
I’ve run across it in two different houses I moved into after the fact. Also damaged conductors causing heat and sparking. Also damaged outlets that on closer inspection exposed current carrying parts of the sockets due to cracked and broken plastic.
It’s a jungle out there!
I’m pretty sure that this is location specific and I don’t think this was pass where I am. Even outlets which aren’t RCD protected get a fail now.
This particular rule in the NEC (the code for most US jurisdictions) only allows this as a retrofit:
https://www.electricallicenserenewal.com/Electrical-Continui...
I'm in New Zealand and if you are touching your electrics when getting work done, you need to be installing RDCs on the circuit.
You can do all sorts of stupid things when you have an RCD on a circuit, and while I'm sure you could still get electrocuted, you'd have to try quite hard.
https://www.nhpnz.co.nz/en/News/Stay-safe-with-compliant-RCD...
The rule here is that, if you replace an old ungrounded outlet, you ought to find a way to ground it and, if you can’t, you must add a GFCI.
(Sadly this often can’t be done in the breaker box, so it means a GFCI in the receptacle. The issue with adding GFCIs in the breaker box is that a lot of old knob and tube installations didn’t match up neutrals with their corresponding hots, so individual circuits don’t have circuit-specific neutrals to run through the GFCI.)
American GFCI breakers generally look like this:
https://www.homedepot.com/p/Square-D-Homeline-20-Amp-Single-...
In US/Canada, it is safe and code compliant to have floating ground in a GFCI protected outlet. The GFCI provides the safety benefit that ground is supposed to provide. Obviously having both GFCI and ground is better, but having only the former is allowed. Occasionally, ground serves additional purposes beyond safety, but that doesn’t apply for a computer power supply.
Additionally, in US/Canada, it is unsafe (and against code) to wire a new outlet directly to water pipe. Ground-neutral bond is required at the main service panel because the “ground” (soil, water pipe, etc) isn’t a good enough electricity ground. The ground wire in the outlet must be wired to the main panel (directly, or through subpanels), where 3 things are connected together: neutral bus, ground bus, and the “ground” (soil, water pipe, etc).
All in all, the author didn’t find the root cause of the problem. And in trying to fix the problem, the author introduced more bugs.
>and the outlet was correctly grounded using my water heater as ground, according to my outlet tester.
I don't think that grounding to a water heater (please read as to water plumbing) is correct.
NFPA 70
250.52(A) Electrodes Permitted for Grounding.
(1) Metal Underground Water Pipe. A metal underground water pipe in direct contact with the earth for 3.0 m (10 ft) or more (including any metal well casing bonded to the pipe) and electrically continuous (or made electrically continuous by bonding around insulating joints or insulating pipe) to the points of connection of the grounding electrode conductor and the bonding conductor(s) or jumper(s), if installed.
NFPA 70
250.104(A)(1) General. Metal water piping system(s) installed in or attached to a building or structure shall be bonded to any of the following:
(1) Service equipment enclosure
(2) Grounded conductor at the service
(3) Grounding electrode conductor, if of sufficient size
(4) One or more grounding electrodes used, if the grounding electrode conductor or bonding jumper to the grounding electrode is of sufficient size
The bonding jumper(s) shall be installed in accordance with 250.64(A), 250.64(B), and 250.64(E). The points of attachment of the bonding jumper(s) shall be accessible. The bonding jumper(s) shall be sized in accordance with Table 250.102(C)(1) except that it shall not be required to be larger than 3/0 copper or 250 kcmil aluminum or copper-clad aluminum and except as permitted in 250.104(A)(2) and 250.104(A) (3).
The problem was that the neutral side was accessible to the user, and the plugs back then were unpolarized. So, if you plugged the "neutral" side of the plug into the "hot" side of the outlet, you would Have A Bad Day.
The workaround: only wire the "hot" side to the plug, and connect the "neutral" side via a separate wire to a nearby radiator (presumably ground). That way, plug the plug in wrong and the toy wouldn't work, rather than becoming dangerously charged.
Was it safe? Safe enough for back then...
Yep, but back then we were much more reckless, just the other day there was a story on HN on amateur chemistry (dying or dead):
https://news.ycombinator.com/item?id=33517520
About electricity, up to not so many years ago (here in Italy up to around 1990) electrical codes were fairly "open", with no ground/earth requirement, and up to the 1970's or so it was not so uncommon to have houses with external wires, see:
https://news.ycombinator.com/item?id=29616691
How we (kids in the '60's and '70's) managed to largely survive these and all the other everyday risks (no helmet on motorbikes, no safety belts in cars, etc.) remains a mistery.
But in the case reported here that today an electrician would ground an outlet to water plumbing, it would be - well before being forbidden - unthinkable of.
Ah, those were the days. Back in the 80s my parents bought us a chemistry set from a thrift store that was probably 20 years old already. It was actually set up to teach some practical chemistry by providing a mystery substance and a set of reagents that would help you figure out what the substance was. Ten year old me just cut to the finish line and tasted the mystery substance - it was sugar.
I feel like this just perfectly summarizes my early years in the tech field, back when I was a screwdriver jockey and spent my afternoons diving under desks. "Why yes, person who gets paid more than twice what I do- spilling a chai latte on your laptop keyboard does mean that it has to go away to a computer hospital for a bit, and no, I cannot magically go back in time and make a copy of all of your important files on an external hard drive for you."
To the author: no hard feelings- I love devs. But just like you might be surprised at the person struggling to write a simple be five-line bash script, sometimes the hardware-oriented folks are surprised at what doesn't occur as an obvious issue to others.
> Again, the same pattern came up: the wrist-rest was only uncomfortable when running on AC power.
Guy's getting lightly electrocuted...
A new initiative, to boost productivity, from management!
We actually have this issue in our 6 year old office, so not exactly old electrics. Running laptops off non-grounded plugs causes that typical "vibration" / buzzing feeling throughout the chassis of the laptop.
https://www.allaboutcircuits.com/technical-articles/safety-c...
Normally any leakage would be shorted to ground (and if too much and house has RCD, trigger protection), but if there is weak one, or none (some of the old houses even have only 2 wire install, with "ground" pin just connected to neutral)
Personally I miss the days when protective earth was protective earth and you didn't have to worry about engineers doing foolish things like using it for EMI filtering or any sort of current path, even if miniscule. The safest class Y capacitor is the one that doesn't exist.
I had a Dell XPS 15 with aluminium frame once and discovered that it was grounded when I was in a hotel abroad with no ground on the outlets and – my wrist-rest got uncomfortable.
I then quickly fudged some wire from the notebook to a radiator, though.
Everything works mostly normal, except that you can have 110 (220/2 via capaciator bisection) volts with large impedance on "supposedly grounded" metal surfaces to give you minor shocks/uncomfortable feeling.
There are very few things that actually need grounded. Kitchen appliances and laundry (which are both retrofitted with grounds).
Plus if the lack of earth is showing as a problem, that suggests an issue elsewhere as all being well earth shouldn't be getting used.
https://en.wikipedia.org/wiki/Appliance_classes#Class_II
But I have seen laptop chargers with earth/ground, I guess it depends.
From the overall description it seems to me more likely that for some reasons only indirectly connected to the poor grounding the AC unit introduced some kind of spurious (or stray) voltage on the neutral.
All the mac chargers I've had had a grounding pin.
Whether they're actually grounded depends whether you're using the wall-wart adapter or the cable: in europe at least the cable has a grounded plug, the wall wart is just a europlug.
The MBPs I've had only came with an USB-C charger. Those come with a Europlug, which doesn't have an earth connector.
That's not exclusive, USB-C has ground pins.
> Those come with a Europlug, which doesn't have an earth connector.
Yes, but if you remove the europlug you should see that the charger has a metallic nub onto which the adapter clips. The 140W charger has one at least, and so did the old 85W chargers. Non-earthed chargers (e.g. iphone chargers) have a plastic nub instead.
As I wrote the europlug adapter is not earthed, but the cables (with a CEE 7/7 or whatever the standard is in your country) are earthed. I'd assume the UK wall wart adapter is also earthed but I've never seen one.
You can see the earthing on the charger side of the cable, because it has two metallic strips inside the recesses, to connect to the nub.
https://i.imgur.com/X6uxKaq.png - UK MacBook Pro M1 wall wart
You need to check the back of the plug, the nub of the charger (which is metallic) slides into a rail thing. With the cables, the rails have a metal strip to connect with the charger’s nub: https://discussions.apple.com/content/attachment/8ec896d8-54...
That's a circuit ground, not an earth ground. It's not for connecting the device to an earth pin.
> if you remove the europlug you should see that the charger has a metallic nub onto which the adapter clips.
I see. I looked at mine, a 61W adapter. Interesting that they chose to use a C7/C8 connection with a separate metallic nub, instead of a C5/C6 Mickey Mouse connection.
Turns out, it's the cable's shield that carries the earth connection.
Always cool to learn something.
But since both Dell and Apple are doing it, I guess it's at least an optional thing they can do.
When I got a new computer and was about to dispose that one (finally!) somebody told me it could be related to electricity problems. I then had that computer plugged to a different outlet during its last week and, apparently, I got no issues; however, issues didn't always happen, so I never knew if that was the cause or not.
Lots of excellent questions. If you'd like to get notified when I write an extended version of this post with more details, sign up to my mailing list here: http://eepurl.com/idzoGv
Do all of these houses have serious electrical issues?
The house in which I live now does that to my old MacBook Airs if I convert my Macs's chargers' hybird CEE 7/7 plug (two poles + grounding) to a flat two-pole europlug (no ground).
I can reliably reproduce the issue in several houses, over several countries.
But if the plug is grounded, everything seems normal.
What's going on?
I'm here since six months, with shitloads of electrical things ongoing (including the whole swimming pool machinery). And everything appears to be working fine.
Should I be worried?
I mean: I can reliably reproduce what TFA describes. My old MacBook Airs do that all the time if there's no ground.
The two prong connector was always a bad idea, but frayed wiring on the charger or bad house wiring can also cause it to float.
The fuzzy MacBook is pretty annoying, but how about the Mac Studio, which can trip a GFCI when plugging it in (which, as far as I can tell, it almost certainly a design flaw and not a fault with my particular unit)
I expect this kind of stuff from the tat bought on eBay, where it's promptly thrown in the bin.
Unless I am reading this wrong, the error would have been emitted by gzip, not bash. There is no redirection or anything here, bash is not even aware of that file.
How would grounding an outlet affect a laptop running on battery?
Nice read of all the debugging and resolution steps.