I have a problem with my laptop (lenovo legion slim 5, Ubuntu 22.04.4), when I close the lid it causes my system to shut down. And no settings in gnome tweaks, /etc/UPower/UPower.conf, /etc/systemd/logind.conf can change that. The problem is rooted in the laptop low level software.
So as a last resort I would like to completely disconnect the lid switch, make it not trigger anything in linux. So I can at least put my laptop in suspend mode from the top right menu and close the lid without having the laptop shutting down.
I tried to follow this post: https://unix.stackexchange.com/questions/706471/linux-cli-disable-sleep-when-laptop-lid-closed but i don't have LID0 in /proc/acpi/wakeup. Here is what I obtain if I do cat /proc/acpi/wakeup:Can someone help me disable the lid switch?