Patients who are intubated and mechanically ventilated for acute respiratory failure in the Intensive Care Unit (ICU) are at some point eligible for weaning. The common way to wean them from mechanical ventilation is to screen criteria for feasibility and, if present, to test feasibility by performing spontaneous breathing trial. This latter can be done either by setting a low pressure support level (expected to compensate the airflow resistance due to endotracheal tube) or by allowing the patient to breathe spontaneously through the tube without any support from the ventilator. Combination of low pressure assistance strategy (7 cm H2O) and positive expiratory pressure (PEP) of 4 cm H2O is the strategy used in our unit. Such a low pressure support level should actually result in a real assistance and, hence this is not the real spontaneous breathing capacity that is tested. Some ICU ventilators offer the option of compensating for the airflow resistance due to endotracheal tube, automatic tube compensation (ATC). Therefore, investigators aimed at comparing in patients ready to wean the usual procedure in our ICU and the ATC mode. In the ATC arm, the patients are breathing spontaneously through the endotracheal tube and are connected to the ventilator set at inspiratory pressure support of 0 cm H2O, PEP 4 cm H2O and ATC on.