“Everything burns up some time or another, even God Herself. That’s how She made the Heavens. She a phoenix. Like me.”

An Unkindness of Ghosts, Rivers Solomon

  • 2 Posts
  • 1 Comment
Joined 7 months ago
cake
Cake day: April 30th, 2026

help-circle
  • FedX@quokk.autoProgrammer Humor@programming.dev•Gotta Inform the Uninformed
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    2 days ago

    As everyone is saying, to can get a laptop to run with the screen closed, but, in the off chance you are wondering how to do that, let me inform you!

    If you are using systemd, then edit /etc/systemd/logind.conf and add (on uncomment) a line HandleLidSwitch=ignore. If, like me, you use elogind, than it’s the exact same process, except you edit the file /etc/elogind/logind.conf. If it’s something else, then IDK, read the manual.

    However, the screen will keep running. There are quite a number of ways of doing this, but the most efficient would probably be using a simple daemon to disable the screen after a timeout for systemd:

    [Service]  
    ExecStartPost=-/usr/bin/setterm --blank 1 --powerdown 2 --powersave on  
    

    Or for the much superior dinit:

    type = scripted  
    command = /usr/bin/setterm --blank 1 --powerdown 2 --powersave on  
    

    Although, there are quite a number of ways of doing this. ACPI will give you more flexibility in the execution; your able to intercept precise key-codes and change how they interact in various ways, but this is probably the way I would do it.