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: Manual Shift Mode
The manual shift mode gives you the feel of driving a manual transaxle vehicle
by allowing you to operate the selector lever manually. This allows you to control
engine rpm and torque to the drive wheels much like a manual transaxle when more
control is desired.
To change to manual shift mode ...
Mazda 6 Owners Manual: Contact Authorized Mazda Dealer and Have Vehicle Inspected
If any of the following warning lights or the indicator light turns on/flashes,
the system may have a malfunction. Contact an Authorized Mazda Dealer to have your
vehicle inspected.
...