Does adsorption violate thermodynamics?
The second law of thermodynamics states that the entropy of the universe always increases.

$$\mathrm{d}S &gt; 0$$

In the case of adsorption the entropy of the system; the gas being adsorbed; decreases but the entropy of the surroundings;the rest of the gas and the surface (and everything else in the universe); increases and this outweighs the decrease in entropy of the system.

$$\Delta S_\mathrm{sys} &lt; 0 \qquad \Delta S_\mathrm{surr} &gt; 0$$
$$|{\Delta S_\mathrm{surr}}| &gt; |{\Delta S_\mathrm{sys}}|$$

This is because adsorption is an exothermic process and so the surroundings are heated up and therefore increase in entropy. If you consider the Gibbs energy change for adsorption it will be negative because the negative $\Delta H$ term is larger than the positive $-T\Delta S$ term. This chem.uic.edu page goes through the maths of this very nicely.