Requirements: Root, Supersu, and a nandroid or build.prop backup to go back to in case you mess up.
I tried this out on the Stock S5 Rom and the Extreme Debloat 2.1.2 Rom
1. download build.prop editor from the play store.
2. Click on the '+' at the bottom, click predefined properties, then find ro.sf.lcd_density then put in the desired dpi value.
3. 480 is stock for the S5, 422 is what you see when you use a rom-slot When you make the change, approve it with Supersu. Make sure it happens.
4*. If you're being safe and using a rom slot to try this out, you have to shutdown the device, let it vibrate, then take out the battery because the shutdown sequence freezes. After that pop it back in and turn on your phone. If you're on the stock slot, just reboot
5. If you're new dpi number works, your phone will boot properly, if it doesnt you will get a 'device memory damaged' alert and even if you click 'reset device' it will continue to do this whenever you turn on your phone forcing you to restore the build.prop or nandroid with a backup.
Apparently, my method overwrites the hidden ro.sf.lcd_density that doesnt appear when you search build.prop with a new and visible one! Hopefully I've discovered something that will contribute to this board. Enjoy!
To fix the small camera problem, you can use xposed framework module app settings and change the dpi back to 480. Im having difficulty fixing it for the phone dialer. Hopefully somebody can find the solution.
Please post working dpi's below.
Confirmed working dpis: 480, 422, 420