All doors lock automatically when the lock side is pressed. They unlock when the unlock side is pressed.
Driver's door

Front passenger's door

To lock all the doors from an open front door, press the lock side of the door lock switch and then close the door.
NOTE
When locking the doors this way, be careful not to leave the key inside the vehicle.
Locking, Unlocking with Transmitter
Auto Lock/Unlock FunctionMazda 6 Owners Manual: Service procedure
Inspection, adjustment
Inspection and adjustment procedures are divided into steps. Important
points regarding the location and contents of the procedures are explained
in detail and shown in the illustrations.
Repair procedure
1. Most repair operations begin with an overview illustr ...
Mazda 6 Owners Manual: Intermittent concern troubleshooting
Vibration Method
1. If malfunction occurs or becomes worse while driving on a rough road or
when engine is vibrating, perform the steps below.
Note
There are several reasons vehicle or engine vibration could cause
an electrical malfunction. Some of the things to check for are:
...