As part of my #homelab I have my normal Windows laptop and a Linux laptop both connected to a KVM switch. After moving away from Kali on the laptop, I started having a problem with the Linux laptop going to sleep when I switched the KVM back to the Windows machine. I found that my KVM was causing Linux to sleep.
It was really odd. I made adjustments to the power settings and turned off the sleep settings. But it was still happening. I tried two different Linux distros thinking that it was a problem with the first distro. But it continued with the second distro too. Then I started doing a little research and came across a comment on a forum mentioning the Gnome Tweaks Tool.
Today, I downloaded it, turned off the sleep settings, and viola the problem is solved! If you are having problems with a KVM switch causing your Linux laptop to go to sleep, then give the Gnome Tweaks Tool a try. Here’s the link to their site.
For more of my thoughts on using Linux checkout here.
I hope this helps!
Robba