There is provided mechanisms for controlling movement of a propeller shaft on a vessel. A controller includes processing circuitry. The processing circuitry is configured to cause the controller to detect movement of the propeller shaft by determining a signature of a sustained oscillation of the propeller shaft. The processing circuitry is configured to cause the controller to control movement of the propeller shaft according to the determined signature.