Heat the butter and olive oil in a large pot or Dutch oven over medium heat.
Add the sliced onions and salt. Cook, stirring frequently, until the onions are soft and translucent, about 10 minutes.
Sprinkle the sugar over the onions and continue to cook, stirring often, until the onions are deeply caramelized and brown, approximately 30 minutes. Adjust heat as necessary to avoid burning.
Once caramelized, add the white wine, scraping the bottom of the pot to deglaze. Let simmer for about 5 minutes until the wine reduces by half.
Add the beef broth, bay leaf, and thyme. Bring to a boil, then reduce heat and let it simmer for an additional 10 minutes. Remove the bay leaf before serving.
While the soup simmers, preheat your broiler.
Toast the baguette slices until they are golden brown.
Ladle the soup into oven-safe bowls, place a slice of toasted baguette on top of each serving, and generously cover with grated Gruyère cheese.
Place the bowls under the broiler for about 2-3 minutes, or until the cheese is bubbly and golden brown.
Remove from the oven, let cool slightly, and garnish with chopped parsley if desired. Serve hot.