I found it out.
For me the best solution was disabling XHC
in /proc/acpi/wakeup
.
I did this by typing into the terminal:
sudo sh -c "echo XHC > /proc/acpi/wakeup"
- this disables the keyboard and the touchpad. - When i then suspend my PC I can only wake it up by pressing the power button.
I tried making this automatic when turning on my PC, but after a lot of testing and trying and failing I gave up. I ended up with just a simple script that I found online, that I type into the terminal upon reboot. (Because the previous command get reset to default upon reboot).
The script:
#!/bin/sh
for device in XHC
do
if grep -q "$device.*enabled" /proc/acpi/wakeup
then
echo $device > /proc/acpi/wakeup
fi
done
I then just run it in the terminal like this: sudo sh Desktop/clickme.sh
I tried putting the script file in /etc/rc.local ... but that did nothing. Also tried making the script a startup application by writing sudo sh Desktop/clickme.sh
into the Startup Applications GUI. But that did nothing. - If anyone sees an error I made in my troubleshooting... please tell me, I would love to forget about the script upon every reboot.
My top sources for this problem were these: Desktop wakes from suspend at random (14.04) and Disable USB keyboard wakeup