Rinse rice in a pot filled with cold water to release starch. Drain, rinse, and repeat until water is clear (about 3 times).
Return rice to pot and stir in 51/2 cups water, peppercorns, salt, and butter. Bring to a boil over high heat, covered; reduce to simmer and cook, covered, about 20 minutes. If grains are still a little hard, sprinkle with 1/4 cup water. Let sit, covered, 10 minutes. Fluff with a fork, add onions, and fluff again to mix.