Pc weirdly restarts after 12-15 hours of uptime. It restarts similar to when you press reset button. But I am not on the controls when it restarts. It happens after some afk time and that too only after more than 12 hours of uptime. Could it be some cron job? If yes how to remove it. I also suspect it could be an issue with linux-tkg-bmq. I will try using old zen kernel because that gave me no issues.
Could it, rather, be an overheating problem? Is it a laptop?
It is a ryzen 5 1600 with an aftermarket cooler. Definitely not heating. Could be a kernel bug. I am trying zen kernel instead of tkg kernel. Maybe that was the cause. I'll continue to monitor it with the regular zen kernel.
I would expect either an over heat as @c00ter already mentioned, or more likely a kernel issue.
Whenever you experience a strange issue such as this (or random freezes) the first thing to do is test alternate kernels.
Updating fixed it. 5.9.13