An intracardiac ventricular pacemaker is configured to operate in in a selected one of an atrial-tracking ventricular pacing mode and a non-atrial tracking ventricular pacing mode. A control circuit of the pacemaker determines at least one motion signal metric from the motion signal, compares the at least one motion signal metric to pacing mode switching criteria, and, responsive to the pacing mode switching criteria being satisfied, switches from the selected one of the non-atrial tracking pacing mode and the atrial tracking pacing mode to the other one of the non-atrial tracking pacing mode and the atrial tracking pacing mode for controlling ventricular pacing pulses delivered by the pacemaker.