Use drush to put a site in maintenance mode
system.maintenance_mode is not a boolean, it is an integer:

drush ev "var_dump(\Drupal::state()-&gt;get('system.maintenance_mode'));"


Result:

int(0)


The answer to the question, how to use drush to put a site in maintenance mode:

drush sset system.maintenance_mode 1