Let $X$ be a smooth projective variety over $\mathbb{C}$. I know that a vector bundle $\mathcal{E}$ on $X$ admits a holomorphic/algebraic connection iff its Atiyah class vanishes, $A(\mathcal{E}) = 0$. If we choose a Hermitian structure on $\mathcal{E}$ giving a Chern connection $\nabla$ then $A(\mathcal{E}) = [\omega_\nabla]$ where $\omega_\nabla$ is the curvature. Therefore, if $\mathcal{E}$ admits a flat Hermitian structure then it admits a holomorphic connection. I am wondering to what extent this has a converse. Precisely, there are four properties I am interested in: (1) $\mathcal{E}$ admits a flat connection, (2) $\mathcal{E}$ admits a flat Hermitian structure, (3) $\mathcal{E}$ admits a holomorphic connection, (4) $\mathcal{E}$ admits a flat holomorphic connection. What are the implications between these properties? We know (2) $\implies (3)$ and obviously (4) $\implies$ (3) and (2) $\implies$ (1) and (4) $\implies$ (1). What about (1) $\implies$ (2) and (3) $\implies$ (4)? If $\mathcal{E}$ admits a holomorphic connection then we know that $[\omega_\nabla] = 0$ for any Chern connection but I cannot see how to conclude that there exists a flat Chern connection. I know from https://mathoverflow.net/questions/123942/how-many-flat-connections-has-a-line-bundle-in-algebraic-geometry that if $\mathcal{E}$ is a line bundle then any holomorphic connection is automatically flat, but it is clear that this is false for rank at least two. Explicit counterexamples would be helpful.