# Projective surfaces with vanishing first cohomology

Let $X$ be a smooth, projective surface in $\mathbb{P}^3$ and $D$ an effective divisor in $X$. Is it true that $H^1(\mathcal{O}_{X\backslash D})=0$ (we know that $H^1(\mathcal{O}_X)=0$)? If not true in general are there examples of $D$ (other than hyperplane sections of $X$) for which this is true?

Let $X\subseteq \mathbf{P}^3$ be a smooth cubic. We know that $X$ contains a line $\ell$, which is a $-1$-curve. Therefore there exists a map $f:X\to Y$ to a smooth surface $Y$ which contracts $\ell$ to a point $p$ and is an isomorphism away from $p$. Let $U\subseteq Y$ be an affine neighborhood of $p$ in which $p$ is defined by $f=g=0$, and let $D\subseteq X$ be the union of $\ell$ and $f^{-1}(Y\setminus U)$. I claim that $H^1(X\setminus D, \mathcal{O}_{X\setminus D})\neq 0$. The map $f$ identifies $X\setminus D$ with $U\setminus \{p\}$. It then suffices to prove that if $U$ is a smooth affine surface with a point $p$ defined by $f=g=0$, then $H^1(U\setminus\{p\},\mathcal{O}_{U\setminus \{p\}})\neq 0$. This can be seen using Cech cohomology for the affine covering by $V=\{f\neq 0\}$ and $W=\{g\neq 0\}$: the functions $f^a g^b$ with $a,b<0$ are defined on $V\cap W$, but are not in the image of $\Gamma(V, \mathcal{O}_V)\times \Gamma(W, \mathcal{O}_W)\to \Gamma(V\cap W, \mathcal{O}_{V\cap W})$, $(x,y)\mapsto x-y$, and hence yield a nonzero element in the cokernel, which is $H^1(U\setminus \{p\}, \mathcal{O}_{U\setminus \{p\}})$.
A criterion that is sometimes useful is the following: suppose that $D \subseteq X$ is a simple normal crossing divisor with components $D_0,...,D_{n-1}$. Suppose further that for every $i=0,...,n-1$ there exists a smooth rational curve $E_i \subseteq X$ such that $E_i$ meets $D_i$ transversely at a single point and $D_i \cap E_j = \emptyset$ if $i < j$. Then the inclusion $X \setminus D \to X$ induces an isomorphism on fundamental groups (see Corollary 3.3.7 in this paper). In particular, in your case $X$ is simply connected by Lefschetz, and so this will give a criterion for $X \setminus D$ to be simply connected, hence for $H^1(X \setminus D,{\cal O}_{X \setminus D})$ to vanish. For example, when $D$ is smooth and irreducible one just needs to find one suitable rational curve to show that $X \setminus D$ is simply-connected. For hypersurfaces $X \subseteq \mathbb{P}^3$ this will mostly be useful when $X$ is of small degree (so that such rational curves will exist at all on $X$).