Prevent sleep when closing laptop lid

  • I've just installed LibreLec on a good old Dell Vostro 1510 to convert it into a media center.

    When closing the lid of the latop, the OS seems to be going to sleep or the screen goes black and I can't seem to wake it up.

    I would like to keep this closed so I would use a connect monitor instead for the visual out put.

    Is the behavior above expected? And how can I stop it? Please advise thank you.

  • I know how to change it but no idea how to do it a LE :D

    /etc/systemd/logind.conf

    Code
    #HandleLidSwitchExternalPower=suspend
    #HandleLidSwitchDocked=ignore

    to

    Code
    HandleLidSwitchExternalPower=ignore
    HandleLidSwitchDocked=ignore

    like said no idea how to change at LE

  • In LE:

    Code: /storage/.config/logind.conf.d/lid.conf
    [Login]
    HandleLidSwitchExternalPower=ignore
    HandleLidSwitchDocked=ignore

    File wasn't there. Created with cat > lid.conf and added the three lines you listed. Haven't tried yet. Did I do right? Need a reboot I assume?