Heat olive oil in a large skillet over medium heat.
Add sliced onions and salt, cooking until softened and golden brown, about 15-20 minutes.
Stir in minced garlic and cook for another 1-2 minutes.
Pour in the beef or vegetable broth and add thyme; bring to a simmer.
Add pasta to the broth and stir to combine; cook according to package instructions until al dente.
Once the pasta is al dente, reduce heat and stir in Gruyère and Parmesan cheese.
Season with black pepper to taste and adjust salt if necessary.
Serve warm, garnished with additional thyme or cheese if desired.