global section of local system from direct image Deligne has a theorem in "Theorie de Hodge II" as follows:

Let $S$ be a smooth separated scheme, and $f:X\to S$ be a smooth proper morphism. 
  Let $\bar{X}$ be a non singular compactification of $X$. Then the canonical morphism :
  $$
H^n(\bar{X},\mathbf{Q)}\to H^0(S,\mathbf{R}^nf_* \mathbf{Q})
$$
  is surjective. 

My question is: if we replace the constant sheaf $\bf Q$ over $\bar{X}$ with a local system $E$ (a locally constant sheaf) , does the theorem still hold ? 
Thank you !
 A: Yes, this is still true, if we assume that $E$ is the underlying local system of a polarized variation of Hodge structure on $\overline X$, which takes care of most local system of "algebro-geometric origin".
Deligne's result comes from a combination of the following three results:


*

*The Leray spectral sequence for $f \colon X \to S$ and the sheaf $\mathbf Q$ degenerates.

*The map $H^n(\overline X,\mathbf Q) \to W_nH^n(X,\mathbf Q)$ is surjective.

*$H^0(S,R^nf_\ast \mathbf Q)$ is pure. 


To generalize to a local system we need a suitable formalism of mixed sheaves. Since you have $\mathbf Q$-coefficients it looks like you're working over $\mathbf C$ so we should use Saito's theory of mixed Hodge modules. Then all these remain true with coefficients in $E$ instead. 
For the first one, Saito proves that the perverse Leray sequence degenerates for a proper morphism and a pure Hodge module. For a morphism which is in addition smooth the perverse Leray sequence is just the ordinary one, and if $E$ is a PVHS then it's a pure Hodge module. 
For the second it is enough to prove dually that $\mathrm{gr}^W_{n+k} H^n_c(X,E) \to \mathrm{gr}^W_{n+k} H^n_c(\overline X, E)$ is injective (where $k$ is the weight of the sheaf $E$). But the long exact sequence of a pair identifies the kernel of this map with a quotient of $\mathrm{gr}^W_{n+k} H^{n-1}_c(\overline X \setminus X,E)$ which vanishes by the fact that $Rf_!$ decreases weights. (For a more general statement see Peters and Saito, "Lowest weights in cohomology of variations of Hodge structure".)
The third follows because $H^0(S,R^nf_\ast E)$ injects into $H^n(X_s,E)$ (as the monodromy invariants) which is pure because $X_s$ is smooth and proper and because the restriction of $E$ to $X_s$ is still pure, again everything is due to Saito's theory.
