The sunshade can be opened and closed by hand.
The sunshade opens automatically when the moonroof is opened, but must be closed by hand.

CAUTION
Jam-safe Moonroof
Security SystemMazda 6 Owners Manual: System wiring diagram
ABS (ABS/TCS)
DSC
FOREWORD
Before performing the steps in Symptom Troubleshooting, perform the
On-board Diagnostic Inspection. To check the DTC, follow the DTC Inspection
steps.
...
Mazda 6 Owners Manual: Shift-Lock Override
If the selector lever will not move from P using the proper shift procedure,
continue to hold down the brake pedal.
1. Remove the shift-lock override cover using a cloth-wrapped flat head screwdriver.
2. Insert a screwdriver and push it down.
3. Press and hold the lock-release button.
4. Mov ...