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: No.9 tcs off light stays on more than 4 seconds with ignition switch on
When performing an asterisked (*) troubleshooting inspection, shake the
wiring harness and connectors while
doing the inspection to discover whether poor contact points are the cause
of any intermittent malfunction. If
there is a problem, check to make sure connectors, terminals and ...
Mazda 6 Owners Manual: Hold switch inspection
Operating Inspection
1. Turn the ignition switch to ON (engine OFF).
2. Verify that the HOLD indicator light is not illuminated. Depress the HOLD
switch and verify that the HOLD indicator light illuminates.
If not as specified, inspect the terminal voltage of the HOLD switch.
Voltage Insp ...