Is the natural map $f^* f_* \mathcal{F} \to \mathcal{F}$ surjective? I'm trying to solve Exercise III 12.4 from Hartshorne's Algebraic geometry. There is a flat projective morphism $f: X \to Y$ of schemes of finite type over an algebraically closed field $k$. Also $Y$ is assumed to be integral, and all fibers are integral schemes.
Now suppose $\mathcal{F}$ is an invertible sheaf on $X$, that is trivial on each fiber $X_y$. I was able to show that $f_*\mathcal{F}$ is an invertible sheaf on $Y$ (this is essentially Cor 12.9), and now I would like to show that the natural map $f^*f_* \mathcal{F} \to \mathcal{F}$ is an isomorphism, for which it is enough to show that it is surjective, because both sheaves are locally free.
 A: Since whether $f^*f_*\mathcal{F}\to\mathcal{F}$ is surjective is a local condition, we can check it on a cover $X$ by open subsets of the form $f^{-1}(U)$ where $U\subset Y$ is open and $f_*\mathcal{F}|_U$ is free. So it suffices to treat the case where $Y=\operatorname{Spec} R$ is affine and $f_*\mathcal{F}=\mathcal{O}_Y$.
Now let's recall some facts about the natural map $f^*f_*\mathcal{F}\to\mathcal{F}$. First, the natural map is the image of $id_{f_*\mathcal{F}}\in \operatorname{Hom}_{\mathcal{O}_Y}(f_*\mathcal{F},f_*\mathcal{F})$ under the isomorphism of $\mathcal{O}_Y(Y)=R$-modules given by the adjunction $$\operatorname{Hom}_{\mathcal{O}_Y}(f_*\mathcal{F},f_*\mathcal{F})\cong \operatorname{Hom}_{\mathcal{O}_X}(f^*f_*\mathcal{F},\mathcal{F}).$$
But since $f_*\mathcal{F}=\mathcal{O}_Y$, we have $\operatorname{Hom}_{\mathcal{O}_Y}(f_*\mathcal{F},f_*\mathcal{F})=\operatorname{Hom}_{\mathcal{O}_Y}(\mathcal{O}_Y,\mathcal{O}_Y)=\mathcal{O}_Y(Y)=R$, and $id_{f_*\mathcal{F}}=id_{\mathcal{O}_Y}=1\in R$. On the other hand, the pullback of the structure sheaf is the structure sheaf, so $\operatorname{Hom}_{\mathcal{O}_X}(f^*f_*\mathcal{F},\mathcal{F})=\operatorname{Hom}_{\mathcal{O}_X}(\mathcal{O}_X,\mathcal{F})=\mathcal{F}(X)$, so $\mathcal{F}(X)=R$. As the $R$-linear endomorphisms of $R$ are exactly given by multiplication by an element of $R$, the endomorphisms that are isomorphisms are exactly multiplication by a unit. So we see that $id_{f_*\mathcal{F}}$ must be sent to the map $\mathcal{O}_X\to\mathcal{F}$ which picks out an invertible element of $\mathcal{F}(X)$, that is, a non-vanishing global section. So $\mathcal{F}$ is trivial and the natural map $f^*f_*\mathcal{F}\to\mathcal{F}$ is an isomorphism.
