Linux laptop freeze solution

I got a huawei matebook 14 few years back, installed Kubuntu, then switched to Manjaro recently. It freezes now and then without any pattern. At first I thought it is caused by audio driver, removed pulse audio didn't fix the issue.

then found the solution

sudo nano  /etc/default/grub

add idle=nomwait to the end of this line.

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3 pcie_aspm=off idle=nomwait"

save and restart.