I haven't had a player fail in forever and I do the following:
Freshmen:
3.5 to 4.0 GPA (high school): 2 minutes of SH
3.0 to 3.4: 4 minutes
2.5 to 2.9: 6 minutes
2.1 to 2.4: 8 minutes (possibly 10, depending on the GPA reports)
Soph:
3.2 to 4.0 GPA: 0 minutes
2.6 to 3.1: 2 minutes
2.1 to 2.5: 4 minutes (or more, if necessary)
Juniors & Seniors: Usually no minutes except in extreme cases of dumbness
From what I've seen when I've taken over teams from other human coaches, many people are dedicating too many minutes to study hall. Even the above might be overkill in some scenarios, but I don't like having guys fail. Obviously the above guidance is pretty loose and will need to be adjusted some times on a case-by-case basis, but it's worked well for me.