My computer freezes randomly, though it's usually connected to doing something that requires me to switch between windows often, like having to google a lot when writing code.
The freezing begun when I installed Linux Mint Ulyana. What I had before that was some earlier version of Ubuntu or Mint. With Ulyana, the freezes were total, as in mouse cursor not moving and no mouse button or keyboard key having any effect. The only way to escape was to press power switch for 5 seconds to power off the computer.
I have now tried Linux Mint Vera. It still keeps freezing, but only for the mouse buttons and the keyboard keys i.e. the mouse cursor won't freeze. The effect for the user is of course the same, though.
The CPU is AMD FX 6300 with six cores.
It worked before installing Ulyana and works when it's not frozen. That suggests me that the hardware is ok. How could I try to find the reason for freezing like this and fix it?