Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The answer to the question linked by @AliTaghavi gives an example when $M$ is a manifold with boundary. Namely a symplectic filling of a hyperbolic 3-manifold, $Y$, such that $b_1(Y)>0$ and all orientation-preserving self-homeomorphisms of Y induce the trivial map on $H^2(Y)$. That post doesn't have an answer for closed $M$ though...