Slice the onions into thin rounds. In a large skillet, add the onions, wine, olive oil, and some salt and pepper. Cover and cook over low heat for about 20 minutes.
Meanwhile, bring a large pot of salted water to boil for the pasta. When the pasta added to the water, remove the lid from the onions and allow the onions to turn slightly golden. When the pasta is cooked al dente, drain it, retaining 1 cup of the cooking water. Add the pasta to the onion mixture and cook for a minute. Add some cooking water if it seems dry. Serve immediately with a generous sprinkle of Pecorino and some fresh black pepper.