A counterexample to the law of stable equilibrium? This is the law of stable equilibrium, according to Hatsopoulos and Keenan:

A system having specified allowed states and an upper bound in volume can reach from any given state one and only one stable state and leave no net effect on its environment.

Consider the following system: two sealed containers of gas.  Container A contains a weight on a raised platform.  Container B contains a flywheel.  A string-pulley system connects the flywheel to container A.  Let our system be both containers combined.
Here are two options to reach stable equilibrium


*

*We slide the weight in A off the platform; it crashes to the bottom, raising the temperature of A.

*Instead, we slide the weight onto the string's hook, such that, as the weight gently falls, the flywheel spins and raises the temperature of B.


It seems we have reached two different stable states despite making no effect on the environment, contrary to the law.  What am I missing here?
 A: So the first thing that you're missing is that those are two different systems; one has a flywheel attached to the weight; the other apparently does not have the flywheel attached to anything in particular. 
The second thing you're missing is that, if it's connected, then the string is capable of transferring energy between the two systems over long timescales. The weight is slowly getting kicked up by random thermal kicks; this usually creates slack in the rope, but on some occasions a random thermal kick on the flywheel will happen to draw the rope taut at the same time, and as the weight gets kicked back down it pulls the flywheel forward by more than the random kick over in B moved it back. It is a very slow transfer of energy, but it is in fact there.
A similar thought experiment is Feynman's ratchet. Feynman's thought experiment is to connect the random bumps of a system to a ratchet, so the ratchet only turns one way with the random bumps, and thus you get a perpetual motion machine. The reason that it doesn't work involves peeking inside the ratchet, at which point we see a little spring pressing a little bar into an asymmetrically toothed surface so that when you're pushing along the gradual slope of the teeth the force requirements to change the ratchet's angle are low, but when you're pushing the other way the requirements are high. He invites you to think about what needs to happen for the bar to thermally get kicked to the height of the teeth: it requires the spring to be thermalized so that it bounces up and down to the same level! Well, if it does that, then the fundamental mechanism of asymmetry in the ratchet becomes unimportant at thermal energy scales, and the thing stops working. It only works because you're transferring energy from a hot reservoir (system) to a cold reservoir (spring)... and you weren't expecting that because in your experience this energy transfer is very small and you thought "I can always ignore that effect", but in many circumstances the laws of thermodynamics do not ignore those effects, even if we do.
A: The system is not in a stable state as long as the temperature in the two containers is different.
It might take some time for the heat to flow through the string.
