These instructions apply to the Subaru XV Mk1 (GP) 2012-2017.
For other models, please choose your vehicle here.
If your first-generation Subaru XV (GP, 2012–2017) has the electric glass sunroof, its auto open/close and anti-trap function has to be re-initialised after the 12-volt battery is disconnected or the roof fuse is pulled. It takes under a minute with the ignition on.
How to re-initialise the XV electric sunroof

- Switch the ignition on.
- Press and hold the sunroof switch in the open (tilt) direction for about 10 seconds, then release it.
- Wait about four seconds.
- Within the next six seconds, press and hold the sunroof switch in the open direction again until the roof completes its learning cycle.
- Check that the roof opens, closes and tilts correctly, then switch the ignition off.
If the roof still will not run on auto, repeat the sequence — the two stages have to follow one another within the short time windows to register.
Frequently Asked Questions
Why has my sunroof stopped working on auto after a battery change?
The sunroof controller stores its fully-closed and fully-open positions. Losing power clears them, so the roof will only creep while you hold the switch until it is re-initialised.
My XV doesn’t have a sunroof — does this apply?
No. This procedure is only for cars fitted with the optional electric glass sunroof. Lower-trim XVs without a sunroof have nothing to re-initialise here.
If the roof is completely dead, check the sunroof fuse first; decode any stored body code on autodtcs.com.
Independent guide — not affiliated with Subaru. Always follow your official service manual and safety precautions. Read our full disclaimer.