Chop the onions. In a large sauce pan over medium high heat, add the olive oil. Cook the onions over medium high heat for 10 minutes until the onions begins to turn translucent. Turn the heat down to medium low and add the sugar, red wine and a few grinds of salt and pepper. Cook stirring often, for 30-40 minutes, or until the onions reach a dark, golden color. If the onions begin to blacken too much around the edges, turn the heat to low and add a splash of olive oil. Stir. While the onions are caramelizing start boiling the potatoes.
Place the cubed potatoes in a large pot of salted water and cover with cold water until the potatoes are completely submerged. Bring to a boil over medium high heat, then turn the heat down to medium and simmer until potatoes are fork-tender, about 15 minutes. Drain the potatoes and place in the bowl of a large stand mixer.
To brown the butter: in a medium saucepan, melt the butter over medium high heat. As the butter melts and bubbles, it will eventually start to foam and have a nutty aroma. As the foam begins to subside and the butter has a deep amber color, take off the heat. Set side to cool for 5 minutes.
In the bowl with the potatoes, add the heavy cream, sour cream, gruyere, dried sage, garlic powder, browned butter, caramelized onions and salt and pepper. Beat over medium high speed for 3 minutes, scraping down the sides of the bowl as needed. Adjust any seasonings to taste. Serve immediately.