Das hast Du einen bekannten Bug erwischt:
Bugs
After escaping and having killed Madanach, Thonar will attack you without any dialogue. Note that he can't be killed, as he is an essential NPC.
To fix this, try running out of Markarth and exiting combat with Thonar and any guards who may have tried attacking you along the way. Wait 24 hours before re-entering the city. Once you've re-entered Markarth, head to the doors you escaped from to initiate the intended dialogue with Thonar.
Also: weit weglaufen - 24 Stunden pennen - wieder zurück und es sollte funktionieren (hoffe ich).