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: Disconnection of the negative battery cable
Before beginning any work, turn the ignition switch to LOCK position,
then disconnect the negative battery cable and wait for more than 1 minute
to allow the backup power supply of the SAS unit to deplete its stored
power. Disconnecting the battery cable will delete the memories of the
...
Mazda 6 Owners Manual: Engine coolant temperature (ect) sensor inspection
Note
Perform the following inspection only when directed.
ECT Sensor Resistance Inspection
1. Drain the engine coolant. (See COOLING SYSTEM SERVICE WARNINGS.)
2. Remove the ECT sensor (located above the starter).
3. Place the ECT sensor in water with a thermometer, and heat the water
gra ...