I have a HP15 r007TX laptop with Debian 8 (Jessie) installed.

Whenever I close the lid and then reopen, the laptop stops working. It get's stuck showing a blank screen. From there nothing happens and I have to hard reboot it.

I even changed the setting to do nothing when laptop lid is closed and still have the issue.

  • Unfortunate this will be difficult to diagnose without more details. Which window manager?
    – slm
    May 3, 2015 at 14:11
  • 1
    A small comment from my experience. Your laptop hasn't stopped working, only the screen. The process of sending a laptop to sleep and then waking it up is quite complex and a common glitch is that upon reactivating the screen it gets messed up. What I do sometimes is close the lid again, wait a moment, and then reopen it. Then the screen returns to normal again (sometimes after a few tries!). Please do not take my comment as a solution. Read some more about this. Your software, video card, drivers are all relevant so provide more information about your system.
    – undostres
    May 3, 2015 at 15:23
  • @slm wmctrl -m gave Gnome Shell as the window manager.. May 3, 2015 at 15:27
  • @undostres any solution to this?? May 3, 2015 at 15:29
  • I've had tons of trouble with Debian Jessie and Stretch doing this on Mac Book Air and multiple versions of the Dell XPS 13. It makes Debian extremely unreliable. Feb 7, 2016 at 2:55

3 Answers 3


To disable the Lid Switch:

  1. Open the file /etc/systemd/logind.conf as root.

  2. Find this: HandleLidSwitch

  3. If it's commented, uncomment and change the value to ignore. The line after editing should be:

  4. Restart computer and your problem should be gone. Or better restart logind service:

    sudo service systemd-logind restart


  • 3
    This did not work for me. The service command made my screen go black immediately.
    – luther
    Mar 18, 2017 at 1:04
  • 1
    It's funny that a 3 year old thread is still helpful.. XD Sep 24, 2018 at 13:20
  • 1
    There's also an additional setting in screensaver->settings->lock settings. Feb 1, 2019 at 21:37
  • 1
    To those still having trouble, you can try modifying /etc/UPower/UPower.conf with IgnoreLid=true. From bbs.archlinux.org/viewtopic.php?pid=1676233#p1676233
    – admin
    Feb 2, 2019 at 19:02
  • 1
    This solution works for Debian Stretch on Dell XPS13. Very nice. Thanks.
    – j3ffyang
    Mar 27, 2019 at 4:24

Do a search search under "power". Go to Power Management. Look for "when the lid is closed".


You can try installing laptop-mode-tools if you haven't done so before.

I had the similar issues with my MBR.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .