Toast the hazelnuts (see note). Process toasted hazelnuts in a food processor until chopped into crumb-sized pieces. Don't overprocess or you will get hazelnut butter!
In a large skillet, saute onions and chopped mushrooms in butter or oil over medium heat until onions are soft and translucent and mushrooms are cooked, about 10 minutes. Add thyme leaves and salt and cook for 1 more minute, stirring.
Cool briefly, then add to chopped hazelnuts in the food processor. Process hazelnuts and mushroom mixture until desired consistency is reached. It should be fairly thick, and a brownish gray color, resembling chopped chicken liver. However it doesn't taste anything like chopped liver!
Serve spread on crackers or toast, or as a veggie dip.