Both of these expressions are ungrammatical. Deviate is an intransitive verb: it means to diverge from an appointed course or established value, not to cause something to diverge.
An intransitive verb cannot be cast in the passive voice. Consequently you must say:
It needs to have deviated for one minute. OR
It needs to deviate for one minute.
If these sentences define the circumstances under which some subsequent event is triggered, such as a correction or a warning message, there is no significant difference between them: both express the fact that action is taken after a one-minute deviation.
If this is not the case—for instance, if the deviation is actively desired in order to accomplish your purposes—then the distinction drawn by magistermurphy is operative: the sentence with the perfect construction looks to a point in time after the deviation, while the sentence with the simple construction looks to a point before the deviation.