When I close the lid of my laptop, the computer shuts down immediately and won't power on again. I need to take a screwdriver and disconnect-reconnect the battery in order to make it power on.
I really want Linux to ignore the lid switch.
I already tried a lot of answers on stack overflow but none works. What I tried:
-
Put
HandleLidSwitch=ignore
in/etc/systemd/logind.conf
-
systemd-inhibit --what=handle-lid-switch sleep 1d
-
cat /etc/systemd/logind.conf | grep -i lid
does throw nothing -
Put
IgnoreLid=true
in/etc/UPower/UPower.conf
-
systemctl unmask sleep.target suspend.target
-
/etc/acpi/lid.sh
does not exist -
In
gconf-editor
, inapps > gnome-power-manager > buttons
, setlid_ac
andlid_battery
tonothing
I reboot my computer after changing those config files to be sure all services are restarted.
How is this possible? What could I try next in order to make the lid switch be ignored?
I'm using Ubuntu with Cinnamon.
Best Answer
Ok, so this is actually pretty easy... but was really difficult to find.
/proc/acpi/wakeup
:(the node is 'PNP0C0D:00')
rc.local
file (with the contents below) that will disable the device at boot time. Make this file executable.If you're using systemd, it should automatically detect this and execute it on boot. This completely disables the switch and allows the laptop to boot even with the lid closed.
You can look way down at the bottom of this page for some more information: https://dev1galaxy.org/viewtopic.php?id=2021