The filing requirement is based on all income. In Maryland, if your federal gross income is more than the federal minimum filing requirement for your filing status, you are required to file a Maryland return, even if the income attributable to Maryland is less than the federal filing requirement. So if you're required to file a federal return then you are required to file a Maryland non-resident state return.
Please view pages 4-5 of the Maryland link below for more information.
https://forms.marylandtaxes.gov/current_forms/nonresident_booklet.pdf
You should prepare your non-resident return before your resident state return. Please view the TurboTax FAQ below for more information.
https://ttlc.intuit.com/replies/3302052