Line Bundle which trivializes over generic fiber Let $\pi: X \to C$ be a fibration (proper, flat with generically smooth irreducible equidimensional fibers) over smooth irreducible $k$-scheme $C$, $k$ field, eg $C$ curve. Let $L$ be a line bundle on $X$ which is assumed to be trivial over generic fiber $X_{\eta}$.
What are the mildest additional assumpions on $X$ and $C$ should be required to guarantee the existence an open $U \subset C$ such that $L$ trivializes over it's preimage $\pi^{-1}(U)$?
A remark on the smoothness / geom. regular assumptions of the base $C$ respectively the fibers: is this assumption really neccessary or does it suffice to require for $C$ to be regular without worsening the situation?
 A: By restricting to an open set in $ C $, we can and will assume that all fibers are smooth and irreducible. The locus of points $ \{ p \in C; L|_{X_p} \cong \mathcal{O}_{X_p} \} $ is closed by semicontinuity - it is given by the intersection of two closed sets $$  \{ p \in C; \dim H^0( X_p, L|_{X_p} ) > 0 \} \cap   \{ p \in C; \dim H^0( X_p, L^{\vee}|_{X_p} ) > 0 \} $$ and by assumption the locus contains the generic point, so is all of $ C $.
Because $ L $ is trivial on every fiber, $ \pi_* L $ is a line bundle by cohomology and base change. Let $ U \subset C $ be an open set where $ \pi_* L $ is trivial. Then $ L $ is trivial on $ \pi^{-1} (U) $. To see this, it’s enough to see that $ \pi^* \pi_* L $ is trivial there (being isomorphic to $ L $) and that’s obvious from construction.
A: The existing answer is good, but I wanted to give a slightly more elementary (and, I feel, more natural) argument, under very weak assumptions (here, $C$ is an irreducible Noetherian scheme and $X$ is of finite type over $C$). We can obviously assume that $C$ is affine, and thus $X$ is quasi-compact.
Edit: I think we also need to assume that $O_{C,\eta}$ (where $\eta \in C$ is the generic point) is reduced (can you see where it is needed?).
Note that Chevalley’s theorem says the following: if $A \subset X$ is a locally closed subset not meeting the generic fiber of $\pi$, then it doesn’t meet $\pi^{-1}(V)$ for some nonempty open subset $V \subset C$ (consider the image of $A$ in $C$, which is constructible but doesn’t contain the generic point).
I claim that there exists an open subset $U \subset X$ containing the generic fiber and a $s \in H^0(U,L)$ which is trivializing on the generic fiber.
Proof: let $X_{\eta}$ be the generic fiber, and $\sigma \in H^0(X_{\eta},L)$ be a trivializing section. We can find finitely many open subsets $U_i \subset X$ such that they cover $X_{\eta}$, and sections $s_i \in H^0(U_i,L)$ such that $(s_i)_{|U_i\cap X_{\eta}}=\sigma_{|U_i \cap X_{\eta}}$.
For every pair $i \neq j$, consider $D_{i,j}$ to be the locally closed (in $X$) subset of $x \in U_i \cap U_j$ such that $(s_i)_{x}\neq (s_j)_x$. The union $D$ of the $D_{i,j}$ is a locally closed subset of $X$ and does not meet the generic fiber, so by Chevalley it doesn’t meet some $\pi^{—1}(W)$ where $W \subset C$ is some nonempty open subset.
Therefore, $X_W$ contains no point in any of the $D_{i,j}$. It follows that the $(s_i)_{|X_W \cap U_i}$ glue to a section $s \in H^0(X_W \cap \cup_i{U_i},L)$.
How do we conclude? Let $s,U$ be as above, and let $D(s)=\{x \in U,\, s_x \notin m_{X,x}L_x\}$. It’s easy to see that $D(s)$ is open in $X$, so its complement is closed and doesn’t meet $X_{\eta}$. By Chevalley, there is a nonempty proper open subset $V \subset C$ such that $\pi^{-1}(V)$ doesn’t meet $X \backslash D(s)$; thus $D(s) \supset \pi^{-1}(V)$ and thus $L$ is free over $\pi^{-1}(V)$ with basis $s$.

Other Edit: the claim has a simpler proof when $O_{C,\eta}$ is reduced and $\pi$ is qcqs. Then $L’=\pi_{\ast}(L)$ is a quasi-coherent $O_C$-module; moreover, by flat base change the natural map $L’_{\eta} \rightarrow H^0(X_{\eta},L)$ is an isomorphism). It follows that $s$ comes from a section of $L’_{\eta}$, thus from a section of $L’(U)=H^0(\pi^{—1}(U),L)$ for some nonempty open subset $U \subset L$.
