This is because the m8 it's self has too much HTC JUNK IN IT , (dot view).( Mirror link) HTC clock) and so on , then there's google clock google weather HTC weather , and so on , could try this see if it works it did for a week with me , them bang of the wall.
1) power of device completely
2) press and hold volume down while pressing and releasing power button ,
3) Then down to recover using volume keys
Straight after pressing recovery option press and hold both volume up and power once you see the animation of red phone release only the power button ,
4) Then go down to clear catch ,
5) Finally reboot.
Once done this if not working , hook up to windows desktop computer sit back and let the computer check install drivers and scan device for faults , either using (windows recovery tool preferred) or iTunes