Hi @jacobwhall
The lid switch in the laptop is a TCS40DLR in a SOT23F3 package. (supplier example only to show component).
It is a magnetic sensor.
I'm not sure of its exact location so with the laptop turned on and the power option settings set to turn off the display when the lid is closed or to place the laptop in sleep mode etc, try running a magnet slowly around the upper panel, between the keyboard and the edge of the laptop to see if it operates the switch by turning off the display etc.
If it does then perhaps the magnet in the lid has shifted position i.e. loose and will need to be placed back again. The Service Manual doesn't give any information about how to access the components in the lid/display assembly i.e. LCD panel, antennas etc which would help to get to the magnet, as it appears that the lid/display assembly is a complete module, but I may be wrong about this. See p.25 of the manual for how to remove the display assembly.
The magnet would be in the lid above the position of the sensor which you found by using the magnet.
If it doesn't, then its either a faulty sensor or there's a problem with the sensor circuit. (see image below).
The sensor is marked as U26 in the schematic so hopefully it is also marked on the motherboard making it easy to locate. If it isn't check if capacitor C1077 or resistor R274 are marked as the sensor should be close by. If it is determined that the sensor is faulty, search online for TCS40DLR SOT23F3 to find suppliers that suit you best.
(click on image)
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
2