  Let $p>2$ be prime, and let $F$ be a totally real field in which $p$ is
unramified. We give a sufficient criterion for a mod $p$ Galois representation
to arise from a mod $p$ Hilbert modular form of parallel weight one, by proving
a "companion forms" theorem in this case. The techniques used are a mixture of
modularity lifting theorems and geometric methods. As an application, we show
that Serre's conjecture for $F$ implies Artin's conjecture for totally odd
two-dimensional representations over $F$.
