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: General procedures
PRECAUTION (FRONT AND REAR AXLE)
Wheel and Tire Removal/Installation
1. The removal and installation procedures for the wheels and tires are not
mentioned in this section. When a wheel is removed, tighten it to 88-118 N·m
{9.0-12.0 kgf·m, 65.0-87.0 ft·lbf}
Brake Line Disconnection/Connecti ...
Mazda 6 Owners Manual: Rear door speaker removal/installation
1. Disconnect the negative battery cable.
2. Remove the rear door trim.
3. Remove in the order indicated in the table.
4. Install in the reverse order of removal.
Rear Door Speaker Installation Note
Attach the speaker with the wiring harness placed in the groove of the door
unit panel.
...