I came across a problem that involved two compartments that are separated by a movable, adiabatic wall. As the wall moves, the pressure is not conserved- rather total pressure decreases- assuming this is an ideal gas. How is this possible? Doesn't the second law of thermodynamics tell us that total pressure should be conserved?
When you talk about conserving pressure it sounds like you think pressures are additive. You might be thinking in terms of adding the pressures before and after the wall moves. The initial pressures were 1 and 4 and you added them to make 5. After the wall moves you add 1.75 and 1.75 and get 3.5 and wonder why they don't add up to 5 as well. Is that correct?
If that's what you are thinking you are treating pressure as an extensive thermodynamic property, like mass, which it is not. Pressure, like temperature, is an intensive property.
Let's say you have a room filled with air at one atmosphere pressure. If you divide the room in half with a wall, will the pressure on each side of the be one half of an atmosphere? It's the same with the temperature of the air in the room. If the air temperature is 20 C in a room, will it be 10 C if the room is divided by wall? Of course the answers are no because pressure and temperature are intensive properties. Mass and energy, however, are extensive properties. If you divide the room in half, each will have half the mass and half the internal energy.
If that's what you were thinking, I hope this helped. If not, I will delete the answer.