An approximate calculation of the onset velocity of cavity oscillations