Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Often it's a problem with the Linux ACPI settings. I had to write a script that checks entries in /proc/acpi/wakeup and disables them as the laptop will otherwise often immediately come back from sleep due to being woken by the ethernet card or another device. That's not specific to Dell devices. Otherwise checking syslog often reveals why going to sleep failed, sometimes it's a particular program that refuses to freeze.

Here's the script btw for those that have the same problem, you'll need to modify the identifiers based on your hardware after identifying which devices cause the problem

    #!/bin/bash
    (cat /proc/acpi/wakeup | grep "GLAN" | grep "enabled") && echo "GLAN" > /proc/acpi/wakeup 
    (cat /proc/acpi/wakeup | grep "XHC" | grep "enabled") && echo "XHC" > /proc/acpi/wakeup


Hardly relevant to the topic at hand, but I'd simplify this to

  grep 'GLAN.*enabled' /proc/acpi/wakeup && echo GLAN >/proc/acpi/wakeup
  grep 'XHC.*enabled' /proc/acpi/wakeup && echo XHC >/proc/acpi/wakeup




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: