It's not based on any well posed principles but the following code seems to allow LOBPCG to execute without failure from my tests.
# small random perturbation of A diagonals
N = A.shape[0]
data = 10.0**-numpy.random.randint(8,16,size=N)
D = coo_matrix((data,(numpy.arange(N),numpy.arange(N))),A.shape)
A = A + D
# construct preconditioner
ml = smoothed_aggregation_solver(A, coarse_solver='pinv2',max_coarse=10)
M = ml.aspreconditioner()
# solve for lowest two modes: constant vector and Fiedler vector
X = scipy.rand(A.shape[0], 2)
# specify lowest constant eigenvector and orthonormalize Fiedler against it
X[:,0] = numpy.ones((A.shape[0],))
X = numpy.linalg.qr(X, mode='full')[0]
(eval,evec,res) = lobpcg(A, X, M=M, tol=1e-12, largest=False, \
verbosityLevel=0, retResidualNormsHistory=True)