A portable computer having a display part and a main part includes a
magnetic piece installed in the display part, a Hall sensor installed in
the main part, a switch circuit, and a control terminal connected to a
power supply of a back light module of the display part. The Hall sensor
includes a power pin connected to a first DC power supply, an output pin,
and a ground pin connected to ground. The output pin of the Hall sensor
is connected to the control terminal and a second DC power supply via the
switch circuit, when the display part is in a closed position, the Hall
sensor senses the magnetic field of the magnetic piece and outputs a
control signal to the switch circuit, the switch circuit receives the
control signal and turns off the power supply of the back light module
via the control terminal.