© 2016 American Physical Society. Similarities between force-driven compression experiments of porous materials and earthquakes have been recently proposed. In this paper, we measure the acoustic emission during displacement-driven compression of a porous glass. The energy of acoustic-emission events shows that the failure process exhibits avalanche scale-invariance and therefore follows the Gutenberg-Richter law. The resulting exponents do not exhibit significant differences with respect the force-driven case. Furthermore, the force exhibits an avalanche-type behavior for which the force drops are power-law distributed and correlated with the acoustic emission events.