Speedometer output

I have some strange behaviour from the speedometer output. When the car is not driving (and even engine not running) and so there is no input from the speed sensor, there is an output of a square wave with around 2 Hz.

When the car drives, the output frequency changes according to speed and the speedometer works correctly.

Any ideas what could cause this?