In a skillet over medium heat, brown the mushrooms and onions in 2 tablespoons of butter.
Layer half of the potatoes in a lightly buttered plate to be placed in the oven. Add the mushroom and onion mixture to the potatoes.
Sprinkle half of the cheese over the potatoes Cover the gratin with the rest of the potatoes.
Mix the cream with the chicken stock, add salt and pepper.
Uniformly cover the potatoes and mushrooms, then sprinkle the remainder of the cheese on top.
Place in the oven for 1h30min.
The gratin should be golden, and a fork should easily be able to go through the potatoes.