Servo sweep when supplying power to Arduino and Servo at the same time

I have a robot that uses an Arduino Mega to control two giant scale servos.

The servos have their own separate power supply.

In my sketch I set the the initial position of the servos in the setup function.

 servo1.write(60);    //set servos to back/middle position
  servo2.write(120);

This is a default position the servos resolve to when they are not in use and when the robot shuts down.

If I power up the Arduino first then then servos second there is no initial sweep, and the servos behave as expected.

I added a rf remote on/off switch to the robot that supplies power to the Arduino and servos at the same time.

When the Arduino and servos get power simultaneously, the servos do a rapid sweep then set to the correct position specified in the setup function.

Is there a way to eliminate this initial sweep? If the servos are already at the default position when the robot is off, why does it sweep away and back on startup?

Did you write the servos to start position BEFORE attaching?

servo1.write(60);    //set servos to back/middle position
servo2.write(120);
servo1.attach(pin?);
servo2.attach(pin?);

When a servo is attached, it goes to 90 degrees by default unless told otherwise.

I attached servos before writing position.

servo1.attach(9);     //head servos
  servo2.attach(10);

  servo1.write(60);    //set servos to back/middle position
  servo2.write(120);

I'll try attaching after setting position and report back.

I still get the same sweep if I write position before attaching pins.

I think I need to introduce mosfets to control power sequence. Servos are sweeping because they get power but they don't have a control signal until Arduino comes online a fraction of a second later? So I need to get Arduino online first then use it to control a mosfet which powers servos.

Or maybe I need pull-down resistors on the servo line to keep it from getting a signal till the Arduino has a chance to initialize the IO pin?

Typical would be to wire common ground between servo power supply and arduino so that you PWM signal has a return path.

Courious what would happen if instead of connecting to arduino ground, you wired the ground into a digital pin.

Once your code is booted and your ready to send a signal, start the signal and then set the digital pin to input.

Just a random thought.