Power supply problem

I have a UNO with a CNC shield fitted. The CNC shield is populated with four A4988 stepper drivers. The code is running perfectly. I have been powering the CNC board with a 12V supply, and the UNO via the USB port (as I have been testing and uploading new code).
Now, I want to power the UNO with the same 12V supply, as I want to run it independently of the USB cable. But as soon as I connect the UNO to 12V (via the jack socket) the 5V regulator gets very hot. I checked the current being drawn and it's nearly 1 amp.
If I remove the four A4988 drivers from the CNC shield, the problem does not happen. So for some reason these drivers are stealing loads of current from the UNO. They're not even connected to the motors, and when the sketch starts the drivers are not even enabled.
I'm baffled how this happens . Looking at a UNO schematic, the 5V output from the regulator that gets hot is connected to the 5V supply from the USB, but is designed to switch off the USB supply when it's in use. So it's effectively the same 5V line which is being used if either USB or 12V supply is used. But USB supply works fine and 12V doesn't.
I tried with two different UNO's with the same result.

Please post schematics showing what's connected to the 5 volt pin.

There's a typical schematic here - although I have (sort of) solved the problem now. By swapping around the A4988 driver modules I discovered that only one of them caused the fault - hence I deduce that this driver is faulty, and I can order a new one (or a new set). This doesn'treally explain, though, why powering it from a different 5V source removes the problem.

Good thinking. Looks like spot on.

It sure does! There's some 5 volt logic circuitry on each driver and it normally draws little current. Check the datasheet for this current!
Being faulty, You need to measure it.
When powering the controller by 12 volt You can hardly draw any current at all from the 5 volt pin because, as You noticed, the 5 volt converter gets overheated, Powering by USB the USB source managed the extra load from the faulty driver.

I recommend using a separate power source for the CNC shield, such as a buck converter. The Arduino is already operating near its limit with a 12V power supply, and adding additional load could cause instability or damage.

Designed, yes. Working, maybe.
If you have a clone Uno/Mega, then assume it's not working. Most clones have the wrong LM358 fitted. They can't drive the gate to 5volt to turn the FET off. It needs an LMV358 (rail2rail). I assume original boards have got that right.
Leo..