We consider a solution of the Cahn-Hilliard equation or an associated Caginalp problem with dynamic boundary condition in the case of a general potential and prove that under some conditions on the potential it converges, as time goes to infinity, to a stationary solution.