I noticed that there were two
PXSX devices when running
PXSX S4 *disabled
PXSX S4 *enabled pci:0000:05:00.0
When I tried to disable
PXSX via command
echo PXSX > /proc/acpi/wakeup then nothing happened (one
enabled and one stayed
disabled, I assume this is because this command could not reach the second
I also tried running
acpitool -w then
acpitool -W <deviceNumberHere> to disable the second
PXSX, which was unsuccessful. I'm not sure why wake cannot be disabled on this second
This device only appears when the laptop is docked so it is safe to assume this device is part of the dock.
Next step was to somehow disable this device to stop it from waking the laptop. I found the command
echo 1 > /sys/bus/pci/devices/0000:05:00.0/remove would disable this PCI device. After running this command, suspend worked correctly! The only problem is that if I tried to perform suspend again the laptop would exhibit the previous behavior (immediate wake). This was confirmed by running
cat /proc/acpi/wakeup to see that
PXSX had re-enabled itself: somehow during wake the device was re-enabling itself.
My next idea was to disable this device during pre-suspend. I created this file:
/lib/systemd/system-sleep/pre-suspend.sh, made it executable and wrote these contents:
case $1 in
echo 1 > /sys/bus/pci/devices/0000:05:00.0/remove
This code ensures that the problem device will be disabled immediately prior to suspending. Currently, my laptop successfully sleeps without waking itself 100% of the time.