aboutsummaryrefslogtreecommitdiff
path: root/articles/2025/Closing-laptop-lid-without-suspend.html
diff options
context:
space:
mode:
Diffstat (limited to 'articles/2025/Closing-laptop-lid-without-suspend.html')
-rwxr-xr-xarticles/2025/Closing-laptop-lid-without-suspend.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/articles/2025/Closing-laptop-lid-without-suspend.html b/articles/2025/Closing-laptop-lid-without-suspend.html
new file mode 100755
index 0000000..5890d25
--- /dev/null
+++ b/articles/2025/Closing-laptop-lid-without-suspend.html
@@ -0,0 +1,44 @@
+<!doctype html>
+<html lang="EN">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="/style.css">
+ <title>Closing laptop lid without suspend</title>
+ </head>
+ <body>
+ <header>
+ <h1>Bloggings</h1>
+ <a href="/index.php">Back</a>
+
+ </header>
+
+<main>
+<article>
+<h2>Closing laptop lid without suspend</h2>
+<h3>2025-07-04</h3>
+<h4>Looking into using a laptop as a home server</h4>
+<p>Since I've got a fibre connection I've been musing about not paying for a VPS and using a home server instead.</p>
+<p>I have an unused laptop that could fit the bill maybe. The advantage of a laptop is that 1) I have one and 2) No need for
+a ups or screen.</p>
+<p>I'm not really sure that I'll build a home server like this, but I'm collecting info.</p>
+<p>One of the things I was wondering is how to stop a laptop from entering suspend when the lid is closed. I found a
+comment on unixstackexchange that explains how to do it on a non-systemd installation. (and a systemd one too but who cares about that?)</p>
+<p>Find the path of the lid switch:</p>
+<code>cat /proc/acpi/wakeup</code>
+<p>Find the line for the lid and enter the command to deactivate it, for example:</p>
+<code>echo 'PNP0C0D:00' | sudo tee /sys/bus/acpi/drivers/button/unbind</code>
+<p>If it works, you can add the above line to /etc/rc.local to make it permanent.</p>
+<p><a href="https://unix.stackexchange.com/questions/706471/linux-cli-disable-sleep-when-laptop-lid-closed">Original comment</a></p>
+<p>On systemd installations, edit /etc/systemd/logind.conf and uncomment the following line: HandleLidSwitch=ignore.</p>
+
+ </article>
+</main>
+<footer>
+
+ <p>&nbsp;</p>
+
+ <p>ยง</p>
+ </footer>
+</body>
+</html>