I have had the issue recently that when I suspend the Librem 15v3 (either by pressing the suspend button in the taskbar or by closing the lid), it will automatically wake up after 2 to 5 seconds without any keyboard or mouse click. Worse, sometimes it would freeze and I would have to reboot to be able to use the laptop again.
After some research on the internet, the root cause seems to be some components waking up the laptop.
showed that XHCI device was enabled.
Disabling it with
echo XHCI | sudo tee /proc/acpi/wakeup
solved the automatic wake up and potential freezing issues.
Where I am stuck is that after rebooting the laptop, the XHCI device is enabled again. So I have to disable it manually through the command line above after every reboot.
Can someone explain the steps to disable a device permanently?
Thanks in advance