You are not logged in.
Pages: 1
I have been experiencing random wakeups from suspend and found my laptop with a drained battery turned off. This happens on 5.7 and 5.8 linux-zen (installed 5.8 from testing to test). Since I have never seen it actually happening (happened at night), I have not been able to collect any logs from a woken up device. However, I found that quite some devices are allowed to wake up the machine.
$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
GPP0 S3 *enabled pci:0000:00:02.7
RESA S3 *enabled pci:0000:07:00.0
GPP2 S3 *enabled pci:0000:00:02.6
GPP4 S4 *enabled pci:0000:00:02.4
GPP5 S3 *enabled pci:0000:00:02.5
L850 S3 *disabled pci:0000:05:00.0
GPP6 S3 *enabled pci:0000:00:02.2
GPP7 S3 *disabled pci:0000:00:02.3
GP17 S3 *enabled pci:0000:00:08.1
XHC0 S3 *enabled pci:0000:08:00.3
XHC1 S3 *enabled pci:0000:08:00.4
LID S4 *enabled platform:PNP0C0D:00
SLPB S3 *enabled platform:PNP0C0E:00
The platform ones should be enough though, lid and power button are all I need. I tried to mitigate this by adding a udev rule:
$ cat /etc/udev/rules.d/50-disable-device-wakes.rules
ACTION="add", SUBSYSTEM=="pci", ATTR{power/wakeup}="disabled"
but this rule does nothing.
Can someone help me disable wakeup for all pci devices?
Thank you
Last edited by metabubble (2020-08-07 14:17:00)
Offline
I have come up with this file, but is it really the most elegant solution? I'd rather not execute something before every sleep and would love udev to do the job I want it to do
# cat /usr/lib/systemd/system-sleep/disable-wakeup-devices.sh
#!/bin/sh
case $1/$2 in
pre/*)
cat /proc/acpi/wakeup | grep enabled | grep -v platform | cut -f1 | while read line; do echo $line > /proc/acpi/wakeup; done
;;
post/*)
echo "Waking up from $2..."
;;
esac
Offline
This did not help. Laptop still wakes up without opening the lid.
$ cat /sys/devices/platform/thinkpad_acpi/wakeup_reason
0
I can't see why. Does anyone have an idea?
Offline
Mod note: moving to Laptop Issues.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1