sounds like the connector or the cable connection inside has a problem
had this on a few laptops
do you have a voltmeter / multimeter - you could check the output from the DC connection on the mains adapter first
sounds like the connector or the cable connection inside has a problemI did have to wiggle the connector in a bit in the last few months