Disable Laptop Lid Button in Debian Based Linux

Daniel Jordan Osborn
1 min readMar 31, 2022

For all of my time using linux, I could use ACPID to change what happens when I close the lid on my laptop.

Or I could use a number of Power Mangers like xfce4-power-manager.

But as of 2022 I could not for the life of me figure this one out. I searched all over the internet for a hole like 4 hours, reading any forum that came close, reading man pages and uninstalling anything that had to do with power and buttons.

Long Story Short

sudo modprobe --remove button

Long Story Long

The closet post I could find of someone with the same issue is here, and it doesn’t look like they ever figured it out. I wrote custom acpid rules, I uninstalled acpid and acpi and a bunch of stuff. I found /proc/acpi/buttons/lid/LID0/state and then I found /sys/module/button/lid_init*. That is when something clicked, the word __module__ seemed familiar. Oh yeah kernel modules. So yeah that is pretty much how I figured that out.

Also from this post, i just found you can stop this from /etc/systemd/logind.conf along with some other settings.

--

--

Daniel Jordan Osborn

I can't find anything, all I do is look and look. By the time I found that one thing, that other thing I was holding, it's lost... :wq