Chosen Solution

Hey all just want to know would this be an issue with accelerometer or gyro or compass? thanks

What do you mean by the background moving quickly? Do you mean where the wallpaper moves around when you tilt the phone? I would say it could be both that are faulty. Replace both of them and you should have no more issues. The accelerometer and gyroscope both contribute into collecting data for the horizontal and vertical movements of the phone.