How to connect a power supply on the battery socket of a laptop?
The problem was the fact that I didn't connect the ground of the battery with the ground of the power supply, once I did that it works.

This is the correct schematic diagram with the grounds connected: