Follow these steps to hard reset your unresponsive Galaxy S5:
2. To begin with a hard reset on your phone, use your thumb or finger and lift up the back cover using the small notch at the upper-left of the phone/
3. Remove the battery, wait for 30 seconds and the re-insert the battery.
4. Make sure the battery cover hinge is properly lined up with the designated holes inside the phone and then push the cover down until you will hear it clicks into place.
5. Press and hold the Volume up, Home and Power buttons simultaneously until the Samsung logo displays on the screen.
6. Press the Volume down button to scroll to Wipe data/factory reset option.
7. Press the Power button.
8. Press the Volume down button to scroll to Yes -- delete all users data option.
9. Press the Power button again.
10. The phone will now initiate wiping all contents. Wait until it's finished.
11. Once the phone is done wiping all contents, press the Power button to proceed.
Your Galaxy S5 should now reboot to the initial setup screen.
When your Galaxy S5 becomes unresponsive, or does not respond to certain actions, you can perform a hard reset and set it back to the factory default settings. However, that should be your last resort.
Please remember that when doing a hard reset, all your personal data, downloaded apps and settings will be deleted during the process. In this regard, creating a backup of all your important files is necessary before you start the process. This way you can retrieve them afterwards.