I tried to connect the second Pi to my new Pi controller. But this one is several yards from the controller. So I used a length of USB cable to carry the power. I used two five meter lengths.
When I tried to run the Pi, I got some very variable results. Sometimes the ethernet worked, sometimes it didn't. Sometimes the keyboard worked, sometimes it didn't. I messed around with it for ages. I even reloaded the operating system. No joy. So I went to bed.
Sometimes, to solve a problem you have to stop working on it. It came to me, in the night, as it were, that the problems were all to do with the USB (on a Pi, the USB and the ethernet are intimately linked at the hardware level). So I thought, maybe the Pi has become faulty, maybe change the Pi for another one and see if that works? But then I had another thought.
The Pi wants five volts. It can cope with a bit less or a bit more, but if it's a lot less then it's not happy. I measured the voltage on the Pi, and it was 4.05 volts, and that definitely isn't enough.
So I messed around with the cable a bit, and instead of using two five meter lengths, I got it down to one. I measured the voltage again - 4.5 volts. And that seems to be enough.
So if your Pi is acting foolishly, measure the voltage at the TP1 and TP2 points.