The 'perpetual motion machine' may finally grind to a halt when the moons become tidal-locked.
The Earth's moon is tidal-locked: the same side always faces the Earth, because it is the (slightly) heavier side. It probably used to rotate at one point, but finally stopped moving because of the gravitational pull.
The tides on Earth? Every time the tide goes in or out, it's causing friction, and slowing down our spin relative to the moon. Eventually (very long time) this friction will cause the Earth to stop spinning relative to the moon, and the same side of the Earth will face the moon at all times.
(It will still rotate relative to the Sun for a while though. But the Sun also affects the tides and would eventually -- given enough time -- make the same face of the Earth face the Sun at all times. Since the heavier side would be the side facing the moon already, that's the same side that would eventually end up locked towards the sun as well. When it finally stabilized, there would be a perpetual solar eclipse. The Sun will probably explode before that happens though.)