Non-simply-connected smooth proper scheme over Z? Source
This question came up in the discussion between Kevin Buzzard and Minhyong Kim in the comments to Smooth proper scheme over Z. It was 2 weeks ago, so I took the liberty of posting it as community wiki.
Question

Is there an example of smooth proper variety $X \to \mathop{\text{Spec}}\mathbb Z$ such that $\pi_1(X) \ne 0$?

About tags
We recently had other questions of the form "Example of ... with everywhere good reduction at $\mathbb Z$" (local-global, abelian varieties). I think it would be interesting to create a tag to group these. Thoughts?
 A: I think I have an argument that might work. The goal is to prove that this is impossible. There are some gaps in it.
Let $X$ be a connected smooth proper scheme over $\mathbb Z$. Clearly $\Gamma(X,\mathcal O_X)=\mathbb Z$. (If the ring had zero-divsors, it would indicate $X$ reducible, impossible, or $X$ non-reduced, thus ramified, impossible. If it were a ring of integers of a number field it would give ramification at some prime.) Since $H^1(X,\mathcal O_X)$ is the tangent space of the Picard scheme, and the Picard scheme is trivial, $H^1(X,\mathcal O_X)$ is trivial. (This probably requires smoothness of the Picard scheme. I'm not sure if that holds.) I need to assume that $H^2(X,\mathcal O_X)$ is torsion-free. (I would think that smoothness over a scheme should imply locally free higher pushforwards, which over an affine scheme implies torsion-free cohomology, but I don't know. This is true in characteristic 0 by Deligne, but we are obviously not in characteristic 0 here.)
We have the exact sequence $0\to \mathcal O_X \to \mathcal O_X \to \mathcal O_X/p\to 0$, with the first map multiplication by $p$. Taking cohomology and filling in what we know, we get
$ 0 \to \mathbb Z \to \mathbb Z \to H^0(X, \mathcal O_X/p) \to 0 \to 0 \to H^1(X,\mathcal O_X/p) \to H^2(X,\mathcal O_X)\to H^2(X,\mathcal O_X) $
which since those are also the cohomology groups of $X_P$, gives $\Gamma(X_p,\mathcal O_{X_p})=\mathbb F_p$, $H^1(X_p,\mathcal O_{X_p})=0$.
Now let $Y\to X$ be a cyclic etale cover of degree $p$. Artin-Schreier on $X$ gives $H^1_{et}(X_P,\mathbb Z/p)=\mathbb Z/p$. Thus there is a unique connected etale degree-$p$ cover of $X_p$, so it's the one you get by tensoring over $\mathbb F_p$ with $\mathbb F_{p^p}$. Since $\Gamma(Y_p,\mathcal O_{Y_p})=\mathbb F_p$, it is connected, and is not the result of tensoring anything with $\mathbb F_{p^p}$. This is a contradiction.
No cyclic etale covers of degree $p$ $\implies$ no cyclic etale covers $\implies$ no etale covers. (since ever group has a cyclic subgroup.)
A: Here is a proof that if $X$ is smooth and proper over $\mathbb Z$ and of (relative) dimension $\leqslant 3$, then it is simply connected. The dimensional restriction is isolated to a particular step and I believe that theorem is conjectured to generalize to all dimensions.
Fontaine's letter to Messing proves that if $Y$ is smooth and proper over $\mathbb Z$, the Dolbeault cohomology $H^q(Y_{\mathbb Q};\Omega^p)$ vanishes off of the diagonal $p\ne q$ in low degree $p+q\leqslant 3$. I believe the low degree restriction is conjectured not to be necessary. By the Atiyah-Bott fixed-point formula, the Lefschetz number of an element of a finite group acting on a complex variety is the same as the Lefschetz number acting on its cohomology of the structure sheaf. Thus if $H^q(Y;\mathcal O)$ vanishes for $q>0$, Fontaine's theorem with $p=0$, then the Lefschetz number is $1$ and the action cannot be free. If $X$ were smooth and proper over $\mathbb Z$ with non-trivial pro-finite fundamental group*, then some finite cover $Y$ of $X$ would be canonical, thus defined over $\mathbb Z$ (eg, the composite of all covers of degree $\leqslant N$). Then $Y$ would be smooth and proper over $\mathbb Z$ with a free action by the finite covering group, a contradiction.
* If I recall correctly, there are varieties whose complex points have a nontrivial fundamental group, but that group has no finite quotients, and thus the étale fundamental group is trivial.
A: This is wrong. But see my other answer arguing the opposite direction.
What's wrong is that Bertini's theorem fails over $\mathbb Z$. It works over infinite fields in single pencils. A version works over finite fields by allowing arbitrary degree and thus infinitely many choices. But high degree over $\mathbb Z$ is bad for smoothness. As Will points out, even in $P^2_{\mathbb Z}$, a high degree hypersurface is not smooth.

I think that Godeaux-Serre varieties exist integrally. Choose a prime $p$, let $G$ be the cyclic group of order $p$ and let $Z[G]$ be the group ring. Then the projectivization of the $n$-th power of the ring group $P(Z[G]^n)$ is an $pn-1$-dimensional variety with an action of $G$, generically free, with fixed set a disjoint union of $P^{n-1}$; 1 copy at $p$ and $p$ copies away from $p$. The quotient is not smooth, but a generic complete intersection of codimension $n$ misses the singular set and thus is smooth with fundamental group $G$.
I have never seen Godeaux-Serre varieties used in same characteristic, but when I looked up Igusa's example, I saw it asserted that not only does the construction work, they have non-reduced Picard scheme, evading Will's attack. But does this generic complete intersection argument work globally?
