This is a classic example of where 'try' should be followed by a gerund - 'turning'.
This is because the action of turning it on and off is an experiment - it's something which is easy to do in itself. It may or may not solve the problem.
Infinitive: Your actual goal is that you are trying to unfreeze your laptop. That's what's difficult.
Gerund: In an effort to achieve this goal, you can try doing various things - you could try pressing Control/Alt/Del, you could try turning it on and off again, you could try swearing at it. All these things are suggestions - ideas that you could try doing.