As a simple model for lattice defects like grain boundaries in solid state physics we consider potentials which are obtained from a periodic potentialshown that the Schrödinger operators H t = − + W t have spectrum (surface states) in the spectral gaps of H 0 , for suitable t ∈ (0, 1). We also discuss the density of these surface states as compared to the density of the bulk. Our approach is variational and it is first applied to the well-known dislocation problem (Korotyaev (2000(Korotyaev ( , 2005 [15,16]) on the real line. We then proceed to the dislocation problem for an infinite strip and for the plane. In Appendix A, we discuss regularity properties of the eigenvalue branches in the one-dimensional dislocation problem for suitable classes of potentials.