23
submitted 2 weeks ago* (last edited 2 weeks ago) by pglpm@lemmy.ca to c/linux@programming.dev

Edit: Thanks for all suggestion! In my case (Thinkpad) I managed to make it persistent via udev, as described here.

It looks like there was a pre-existing udev configuration about this, but had slightly wrong SUBSYSTEM and DRIVER parameters:

  • old: SUBSYSTEM=="acpi", DRIVER=="button"
  • correct (in my case): SUBSYSTEM=="platform", DRIVER=="acpi-button"

maybe because of some recent systemd changes?

Hope this may help others.


I have Kubuntu on a Thinkpad, and a S3-sleep state selected in the Bios.

My setup has always been to not resume from sleep when the lid is open. I achieved this by running once

echo "LID" | sudo tee /proc/acpi/wakeup

which toggles the wakeup-on-lid state. The behaviour would be respected upon restart.

Here's my problem: since some recent update โ€“ I don't know whether from apt or fwupd โ€“ I discovered that the laptop was waking up upon lid opening. So I issued the command above again. It works, but it gets reset upon restart, unlike before.

Anyone has good tips on how to make this setting permanent?

In the Bios I didn't find any settings about this.

Cheers!

you are viewing a single comment's thread
view the rest of the comments
[-] leezh@lemmy.blahaj.zone 3 points 2 weeks ago

You could just drop the line into a script (without the sudo) into /usr/local/bin/ and call it on startup.

If you use systemd it's as simple as:

[Unit]
Description=Disable Lid Suspend

[Service]
Type=oneshot
ExecStart=/usr/local/bin/lid-suspend

[Install]
WantedBy=basic.target

Just drop it into /etc/systemd/system/lid-suspend.service and then call sudo systemctl daemon-reload and sudo systemctl enable lid-suspend

[-] pglpm@lemmy.ca 1 points 2 weeks ago

Thank you for this!๐Ÿ™ I was going this way, but found that some udev config may need change, see update to post.

this post was submitted on 20 Jul 2026
23 points (100.0% liked)

Linux

14599 readers
366 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 3 years ago
MODERATORS