Excessive vibration and poor controllability occur in many mobile fluid power applications, with negative consequences as concerns operators' health and comfort as well as machine safety and productivity. This paper addresses the problem of reducing oscillations in fluid power machines presenting a novel control technique of general applicability.Strong nonlinearities of hydraulic systems and the unpredictable operating conditions of the specific application (e.g. uneven ground, varying loads, etc.) are the main challenges to the development of satisfactory general vibration damping methods. The state of the art methods are typically designed as a function of the specific application, and in many cases they introduce energy dissipation and/or system slowdown. This paper contributes to this research by introducing an energy efficient active damping method based on feedback signals from pressure sensors mounted on the flow control valve block. These feedback signals quantify the machine oscillation and are used to modify the electro-hydraulic flow control valve command provided by the operator. The controller is based on an innovative application of the non-model-based extremum seeking optimization algorithm for the tuning of the control parameters of a gain scheduling controller. The gain scheduler adapts the control parameters to the monitored pressure and operator input in order to provide the best control performance over the entire range of operating conditions.Although the proposed methodology has a general applicability, the paper shows the vibration damping obtained on a midsize hydraulic crane. The utilized experimental set up, equipped with transducers (including wireless accelerometers, pressure and flow sensors), was used to prove the effectiveness of the new control strategy for several loads. Significant improvements in terms of both oscillations overshoot and settling time are shown for typical operation of the considered machine.