Let $\mathcal{T}$ be a torus with Riemannian metric. Consider the sourced Laplace equation on $\mathcal{T}$: \begin{align} \tag{1} \Delta \phi = f. \end{align} I'd like to know necessary and sufficient conditions on $g$ which guarantee the existence of a solution for $\phi$. One such condition is easy to spot: integrating both sides of (1) gives \begin{align} \tag{2} \int \text{vol }f = 0. \end{align} I'd previously always thought that (2) was both necessary and sufficient, but now I'm not so sure. The reason for my doubt is that under a conformal rescaling of the metric $g'_{\mu\nu}=e^{2\Omega}g_{\mu\nu}$, the Ricci scalar changes as $$\tag{3}\sqrt{g'}R' = \sqrt{g}(R-2\Delta \Omega).$$ By Gauss-Bonnet, $\int\text{vol }R=0$, so if (2) was sufficient for existence, we'd always be able to find $\Omega$ such that the RHS of (3) vanishes. Hence we'd find every torus is conformally flat, which is not true (the moduli space of the torus has dimension 1).
Therefore my guess is that there must be further conditions on the source function, on top of (2), which are necessary for solutions to exist to the sourced Laplace equation. What are these conditions?