Well, it could be within the OS, which can still show in that mode.
You could try saving all personal data from the device and doing a "Hard Reset" to see if that will resolve it. If that doesn't help, then I would say it is hardware. Doesn't mean the phone is done for though. If under warranty you could contact the manufacturer or if not, try a local tech.
NOTE: Doing this will clear 'all' the data on your phone, so it is suggested you not choose this option unless you have to, or aren't worried about losing anything on the phone.
Be sure you back up any data you want to keep, to a computer or cloud account, before doing the reset.
To "Hard Reset" the phone...
1. Make sure that the phone is actually powered off.
2. Remove your...