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: Front drain hose installation
Caution
If the front drain hose is pinched or bent anywhere, the water in the hose
may not discharge and enter the inside of the vehicle. During and after
installation of the trims and the headliner, always make sure there is no
interference with the front drain hose. Fix any problem if found ...
Mazda 6 Owners Manual: No. 1 one or more on-board diagnostic functions inoperative
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 malfunctions. If there
is a problem, check to make sure connectors, terminals and wir ...