Set the printer to turn off automatically after 30 minutes when all ports including the USB port are disconnected.
This feature may not be available depending on your region.
Access Web Config and select the Device Management tab > Power Saving.
Set Power Off If Disconnected to On.
Click OK.
You can also set up from the printer’s control panel.
Settings > General Settings > Basic Settings > Power Off If Disconnected