Htc one m9: battery only charges when off


AC Question

So Last night my m9 died completely while i was at work. after getting home i plug it up and it doesnt charge (or so i thought) after leaving it on the cahrger for 30 ish minutes nothing came up on the screen and the led never came on. but it charged to about 20% as soon as i turned it on it proceeded to have sense home crash loop. so i factory reset. now it only charges when off and constantly goes from the screen where the % is displayed as well as the battery with the moving green bar to the screen with the battery icon with a yellow lightning bolt thing in the center. all while off its also charging ridiculously slow its been on charger for 20 minutes now and only gained 2% and yes i am using and qualcom quick charge 2.0 usb charger and its plugged into the wall. please help ive been scrounging forums but have found nothing.