Laptop will not work on AC adapter only. Works fine when a charged battery is attached.

1. Test the AC adapter make sure it’s working properly.

2. Make user the DC jack is not loose or broken by measurring for current pass the DC jack.

If AC adapter and DC jack both are tested good then check the following.

Most laptop have a diode close to the power in circuit for reverse polarity protection. You can simply bypass the diode when it failed or replace it.

This works because the most common functionof a diode is to allow  eclctric current to pass in one direction(forward), while blocking current in the reverse direction.

Note: Most stock AC adapter can’t be polarity reversed.