Fix HP Spectre 13 not going to sleep mode.

Pierre Le Guen | October 05, 2019 · 1 min read

Edit on GithubEdit on Github

The problem

After switching from Windows to Linux I faced a problem with my HP Spectre when I close the lid the laptop doesn’t go in sleep mode.

I looked for a workaround on the web without success.

Fixing the issue

The way to fix this is by browsing the /proc/acpi/wakeup file. This way you can find what wake up the laptop from suspend.

It appears that the power button is the issue here. One thing to know here is that the /proc/acpi/wakeup file can’t be edited directly. To achieve what we want, we need to create a service that will change the value for us.

The script

Let’s create the service that will start a bash script for us at startup.

  • Create the file, e.g:$ touch suspendfix_pwrb.service
  • Edit the file with the following service :
Description=fix to prevent the system from waking immediately after suspend, this is due to a bug with the power button.

ExecStart=/bin/sh -c '/bin/echo PWRB > /proc/acpi/wakeup'


Starting the service

  • Now enable our service using : # systemctl enable ./suspendfix_pwrb.service

This finally resolves our issue. After some research, I really can’t find why the PWR button sends a wake-up signal immediately after suspend.


I hope this solves your issue with suspend on your HP Spectre 13. Feel free to contact me if it did not.

Subscribe to my email list!

Written by

Pierre Le Guen

Hi, I'm Pierre Le Guen, student in computer science. Click here if you want know more about me or checkout my portofolio.