I use Ubuntu 22.04.4 on Lenovo legion slim 5 16APH8. I have a problem: when I close the lid of the laptop, there is always a chance that the laptop will completely shut down. And when I click "suspend" on the Ubuntu top right panel, I'm always sure that if I close the lid the laptop will exit the suspend mode and shut down.
Here is what I tried to solve the problem:
I updated the bios of the laptop to the latest bios (M3CN41WW). But it didn't solve the problem.
I updated Ubuntu and the drivers. But it didn't solve the problem.
I deactivated and also activated in Gnome tweaks the function to go to suspend mode when the lid is closed but it changes nothing. The problem remains.
In
/etc/UPower/UPower.conf
I turnedIgnoreLid
to true but the problem remains.In
/etc/systemd/logind.conf
I made these changes:
HandleLidSwitch=ignoreHandleLidSwitchExternalPower=ignoreHandleLidSwitchDocked=ignoreLidSwitchIgnoreInhibited=no
but the problem remains, it keeps shutting down the laptop when I close the lid.
Finally, I tried to completely disable the lid switch by following this post
But I don't even have a LID0 in /proc/acpi/wakeup
! So there is no way to even disable it.
What could be done to fix this issue? What I would like is to be able to put my computer in suspend mode and closing the lid. Right now it is not possible because if I put the computer in suspend mode from the top right corner of the screen then if I close the lid it shuts down the computer.
Could the problem be solved in the future with an Ubuntu update? or driver updates? Or BIOS updates from Lenovo?