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: After repair procedure
Caution
After repairing a malfunction, perform this procedure to verify that the
malfunction has been corrected.
When this procedure is carried out, be sure to drive the vehicle at lawful
speed and pay attention to the other vehicles.
1. Connect the WDS or equivalent to the DLC-2.
2. Turn th ...
Mazda 6 Owners Manual: Rear upper arm removal/installation
Caution
Performing the following procedures without first removing the ABS
wheel-speed sensor may possibly cause an open circuit in the harness if it
is pulled by mistake. Before performing the following procedures, remove the
ABS wheel-speed sensor (axle side) and fix it to an appropri ...