does it always follow that dU<=TdS-pdV? I think I can prove this if all pressures and
temperatures are equal. Can this equation also be used if pressures and temperatures of subsystems are not equal? In this case, should we use the outside temperature and pressure for the equation corresponding to the whole system? Can similar generalization be used for other potentials?

2. In which cases the can we get inequalities like dU<TdS-pdV? Do inequalites have
anything to do with irreversible processes (how do we explain the connection)? Also can we get inequalites if we only have one homogeneous system (I suppose not, since the state of such system is completely determined by two thermodynamic variables)?

3. What are the relations between minimum values of potentials and equilibrium states?
Can we determine equilibrium states by minimizing potentals?

Example:
dF<=-SdT-pdV
If T and V are constant, then
dF<0
I think this means that F can no longer change once it reaches its minimum, so its minimum is an equilibrium state. But it does not seem obvious that this is the only possible equilibrium state.