How to find reason a notebook wakes up?
Systems with systemd
On systems that make use of systemd
you can look through systemd's log using the journalctl
command.
Example
Here, for example my system went to sleep from the lid being closed and then when I opened it, you'd see events related to this like so:
$ journalctl | less
...
May 19 09:04:47 greeneggs.bubba.net kernel: PM: Syncing filesystems ... done.
May 19 09:04:47 greeneggs.bubba.net kernel: PM: Preparing system for mem sleep
May 19 09:33:42 greeneggs.bubba.net kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
May 19 09:33:42 greeneggs.bubba.net systemd[1]: Time has been changed
May 19 09:33:42 greeneggs.bubba.net systemd-logind[772]: Lid opened.
...
Systems without systemd
For systems that do not use systemd
you have a variety of places to look. You could for starters look in the dmesg
log. You could also look in /var/log/syslog
for messages related to power management or ACPI related events.
I would start by taking a look in /var/log/pm_suspend.log
, assuming it exists. Especially on distros such as Linux Mint, you'll likely find messages like this there:
Thu Feb 21 21:21:50 GMT 2013: Running hooks for hibernate.
Running hook /usr/lib/pm-utils/sleep.d/000kernel-change hibernate hibernate:
/usr/lib/pm-utils/sleep.d/000kernel-change hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
...
References
- Systemd woes
- systemd - ArchLinux wiki
- Linux Mint: Hibernate does not work
Since you've got a ThinkPad, besides the other suggestions (preliminary the systemd
hint), if you're using the thinkpad_acpi
driver, you might want to have a look at /sys/devices/platform/thinkpad_acpi/wakeup_reason
. This file contains a number telling you whether the embedded controller woke up your laptop for reasons like low battery (at least I thought it did), dock-removal request, etc.
As Documentation/laptops/thinkpad-acpi.txt
states:
wakeup_reason:
Set to 1 if the system is waking up because the user
requested a bay ejection. Set to 2 if the system is
waking up because the user requested the system to
undock. Set to zero for normal wake-ups or wake-ups
due to unknown reasons.