Let G be a finite group acting linearly on a vector space V over a field of characteristic p dividing the group order, and let R:=S(V∗). We study the RG modules Hi(G,R), for i⩾0 with RG itself as a special case. There are lower bounds for depthRG(Hi(G,R)) and for depth(RG). We show that a certain sufficient condition for their attainment (due to Fleischmann, Kemper and Shank [P. Fleischmann, G. Kemper, R.J. Shank, Depth and cohomological connectivity in modular invariant theory, Trans. Amer. Math. Soc. 357 (2005) 3605–3621]) may be modified to give a condition which is both necessary and sufficient. We apply our main result to classify the representations of the Klein four-group for which depth(RG) attains its lower bound, a process begun in [J. Elmer, P. Fleischmann, On the depth of modular invariant rings for the groups Cp×Cp, in: Proc. Symmetry and Space, Fields Institute, 2006, preprint, 2007]. We also use our new condition to show that if G=P×Q, with P a p-group and Q an abelian p′-group, then the depth of RG attains its lower bound if and only if the depth of RP does so.