Sometimes when my computer is on sleep or hibernate, it will randomly wake up. Is there a way to know what caused this?

Using Linux Mint 20, but I guess the answer isn't necessarily Mint specific.

  • ... and possibly not even Unix-related?
    – Kusalananda
    Jan 2 at 8:57
  • If there's any clue, it's likely in the system logs: check files in /var/log for entries created at the time it woke up. Also check your power management settings to see what is supposed to cause a wake-up (this can help figure out log lines). @Kusalananda This is a software configuration, so it's definitely Unix-related. Jan 2 at 9:30
  • @Gilles'SO-stopbeingevil' so I'm looking for files modified at the instant it woke up? It happened two times today, at ~midnight and ~9.30am, and the kernel.log last modification time is 9.32am. Here is the end of the file pastebin.com/Y5YdzXiM, can you help me understand it ? at the time of the wake up there is this "Freezing user space processes ..."
    – sayanel
    Jan 2 at 10:01
  • I believe a good idea might be to check ACPI logs: unix.stackexchange.com/questions/83036/… @Kusalananda I believe he means "How to check why the computer woke up on Linux" since he's a Linux user. He's asking where Linux records the wake-up reason, etc.
    – polemon
    Jan 2 at 10:44
  • @sayanel Everything up to "CPU 15 is now offline" is logs from sleeping that couldn't get written because log writing was already suspended, and "ACPI: Low-level resume complete" is from waking up. I don't see a message that would explain why the system woke up, but I don't know what this message would look like so I may be missing something. Jan 2 at 10:52

The motherboard / BIOS are responsible for powering on a machine. There's not many things that will trigger a motherboard to power on. I would try checking your BIOS settings to see what's enabled.

The events that are common for power on are:

  • Power button pressed
  • Time based power on (set a time in the BIOS)
  • Wake on LAN (a nother machine must send a special "Magic Packet" to your network card's mac address.
  • Turn on when power restored - if you unplug and plug your machine it will turn back on

Turning the power on when power restored can be semi-random (in rare cases) as you describe. If your mains power dips for any reason then this will trigger your PC to start up. It may not be obvious that the power has dipped enough, other equipment may not even notice it happened

I saw this happen once where a whole computer room would randomly turn itself on, but always around 7am. It turned out the factory across the road turned all it's heavy machinery on around that time and pulled the mains voltage down just enough to trigger the PCs.

  • What would be the mark of a wake on LAN and is it possible via Wi-fi? If there somewhere where I could see/change parameters of possible wake up ?
    – sayanel
    Jan 2 at 11:23
  • And same question about power dipping (even if I really can't see why... maybe my electrical installation is really shitty)
    – sayanel
    Jan 2 at 11:31
  • You’ll need to look into your bios settings. Usually press one of F1 F2 or Del at startup but there are so many different BIOS out there I can’t tell you exactly which one. WOL is unlikely unless someone is prancing you deliberately. They would need to know your Mack address and be on your LAN. It’s normally not possible over WiFi thought there might be cards capable of it, you would need to enable it for your wife for sure. I would change the setting for what happens when AC power is restored and see if the problem goes away. Jan 2 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.