use a magnet and move it on the back of the phone, near to the silver line on the bottom (where the model is written, to be more specific)
Event: time 1682501052.376060, type 5 (EV_SW), code 0 (SW_LID), value 1
Event: time 1682501052.376060, -------------- SYN_REPORT ------------
Event: time 1682501052.465216, type 5 (EV_SW), code 0 (SW_LID), value 0
Event: time 1682501052.465216, -------------- SYN_REPORT ------------
To test the hall sensor: