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!

  • sudo@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    2 days ago

    You can try to set HandleLidSwitch=ignore event defined in /etc/systems/logind.conf. That will definitely prevent the laptop from sleeping on lid close. It might also prevent the laptop from waking on lid open.

    Regardless, I suggest hunting down what broke that setup recently. Its probably some new daemon is responsible for configuring those events in a less arcane way.

    • stravanasu@lemmy.caOP
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      Thank you. In my case, unfortunately, changing the HandleLidSwitch* options didn’t work. Luckily changing udev settings did the job!

      • Ooops@feddit.org
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        2 days ago

        Just for completions sake. Did you change them all?

        There’s HandleLidSwitch, HandleLidSwitchExternalPower and HandleLidSwitchDocked

        Edit: Oh, I did missed the “*”. So assume that is a yes.

        • stravanasu@lemmy.caOP
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          Yes, all three. Also tried adding these options in a separate file in logind.conf.d/. Some searches on StackExchange show that this worked for some, indeed.