In power options it is set to sleep when lid is closed whether on power or battery. Yet the laptop remains on with the keyboard and screen illuminated when the lid is closed.
Sounds like a hardware issue with the lid switch. Have you checked if the camera works? If it does not, it most likely means the connection between the camera board (which also contains the lid switch) and the motherboard is broken somewhere.
If the camera does work, either just the sensor itself is broken, or it is not detected by the OS.
Just checked, the webcam does work.
Hello, the sensor is on the audio card, so you might wanna check if the jack port is working properly. I did not reconnect the card properly so I had this issue when updating to the AMD motherboard.
You can also try to listen to lid switch event in a terminal to check if the event is properly triggered :
sudo libinput debug-events /dev/input/event1
I had the same issue, except my lid events were on
KDE was doing something weird, and changing the lid close action from sleep to shutdown and back again was enough to fix the issue for me.