  Let $p$ be a prime number and $F$ a totally real number field unramified at
places above $p$. Let $\bar{r}:\operatorname{Gal}(\bar
F/F)\rightarrow\operatorname{GL}_2(\bar{\mathbb{F}_p})$ be a modular Galois
representation which satisfies the Taylor-Wiles hypothesis and some technical
genericity assumptions. For $v$ a fixed place of $F$ above $p$, we prove that
many of the admissible smooth representations of $\operatorname{GL}_2(F_v)$
over $\bar{\mathbb{F}_p}$ associated to $\bar{r}$ in the corresponding
Hecke-eigenspaces of the mod $p$ cohomology have Gelfand--Kirillov dimension
$[F_v:\mathbb{Q}_p]$. This builds on and extends the work of
Breuil-Herzig-Hu-Morra-Schraen and Hu-Wang, giving a unified proof in all cases
($\bar{r}$ either semisimple or not at $v$).
