Be sure it's a Dell adapter and then see if Dell issued a new bios for that laptop.
After that we've had to replace the motherboard. Sorry folk but board repair is something over a decade ago. Very rare to day.
Some point to reloading drivers/OS but if it does not charge when Windows is shut down, it's a hardware/bios wrong adapter dead battery motherboard issue.
I bought a new adapter. Can't get it to work. I'm getting message--plugged in, not charging. It worked for a couple of weeks. Now does not. I bought a new battery, thinking the battery was dead. So battery is new, adapter is new.
Anybody have a fix?