My XPS 18 shows: "pluged in, not charging" and it will turn off in about 20 minutes.
After turning off, it slowly charges itself to some battery life. I can use it for 5-30 minutes until battery running out again.
Batteries on this 4 yr old model are not available from Dell and are impossible to replace yourself even if you could get them. Consider buying a new computer.
Dell parts says--Sorry, but we no longer offer batteries for this model
battery is good. charger is good as well. The problem is the charging mechanism. it won't charge the battery during the use. it only starts charging when the battery is dead and the computer shut down.