Since it happens in Safe Mode, it's a problem with either the firmware or hardware. First, try wiping the cache partition (which probably won't do anything, but it won't hurt to try):
https://support.t-mobile.com/docs/DOC-28773. If that doesn't help, then the next step would be a factory reset. If that still doesn't help, then you could try reinstalling the firmware using Smart Switch (
http://www.sammobile.com/forum/showthread.php?t=29914) or Odin (
http://forums.androidcentral.com/amb...interface.html).
If none of that works, then it's probably a hardware issue.