If $f$ was a constant $f=c$, then $\int fv_x = c \int v_x = cv|_{-\infty}^{\infty} = 0$, which works for $c\neq 0$ also. Hence, there are non-zero solutions to the distributional equation $f'=0$.
You can also prove that these are the only solutions. As distributional solutions to $f_x = g$ for $f,g\in\mathcal D'$ are unique up to constants ("Distributions" by Duistermaat and Kolk, page 47, Theorem 4.3), the solutions to $f_x = 0$ are constants.
The uniqueness part of the proof in the book above proceeds by defining the map $p:\mathcal D\to\mathcal D$
$$ p (\phi)(x) := \int_{-\infty}^x\phi - \langle1,\phi\rangle \int_{-\infty}^x\chi$$
where $\chi$ is some fixed element of $\mathcal D$ with $\int\chi=1$. One can check that $p(\phi)$ is indeed always in $\mathcal D$ with $p(\phi)_x = \phi - \langle 1, \phi \rangle \chi$; the purpose of the second term is to make $p(\phi)$ vanish for large $x$.
Therefore, for all $\phi \in \mathcal D$, $$0 = \langle f_x , p(\phi)\rangle = \langle f, \phi - \langle 1, \phi \rangle \chi\rangle = \langle f, \phi\rangle - \langle 1, \phi\rangle \langle f, \chi\rangle = \big \langle f -\langle f, \chi\rangle,\phi\big \rangle $$
So $f -\langle f, \chi\rangle$ is equal to $0$ in the sense of distributions, which is to say, $f = \langle f, \chi\rangle$ in $\mathcal D'$.