The short answer
In virtually every jurisdiction with a specific law on this, the landlord is responsible for installing working smoke alarms — and, where required, carbon monoxide alarms — and making sure they're operating at the start of your tenancy. What gets murkier is who handles day-to-day maintenance, especially batteries, once you've moved in, and that split varies by state and sometimes by city.
Two real examples of how differently states handle this
North Carolina's law is unusually detailed. Landlords must provide operable, listed smoke alarms and install them to fire-code standards, and must repair or replace them within 15 days of a tenant's written notice. At move-in, the landlord must also put in fresh batteries — unless the smoke alarm is a newer tamper-resistant, 10-year lithium battery model, which most new installations are required to be. After that, the tenant is responsible for replacing batteries during the tenancy, and the law is explicit that a tenant's failure to do so isn't treated as negligence by either side (N.C. Gen. Stat. § 42-42(a)(5)). North Carolina also requires at least one carbon monoxide alarm per level in any unit with a fossil-fuel appliance or an attached garage, on the same installation and battery-timing rules (N.C. Gen. Stat. § 42-42(a)(7)).
Idaho splits the duty differently: the landlord must install an approved smoke detector and verify it's working when the tenancy starts, but the tenant is responsible for keeping it in good working order for the rest of the tenancy. If the landlord never installs one in the first place, the tenant can send written notice by certified mail, and if it's still not installed within 72 hours, the tenant may install one and deduct the cost from next month's rent (Idaho Code § 6-320(a)(6)).
The pattern underneath both examples
Even though the details differ, the underlying pattern is consistent: your landlord is responsible for making sure a working alarm is there in the first place, and for real repairs — a broken unit, a wiring problem, an alarm that won't reset. Battery swaps during an otherwise-working tenancy are more likely to land on you, though when that duty starts — immediately, or only after you're notified of an issue — depends on your specific state and local fire code.
Carbon monoxide alarms specifically
Carbon monoxide alarm requirements are newer than smoke alarm rules in a lot of places, and they're often triggered by specific conditions — a gas or oil furnace, a fireplace, an attached garage — rather than applying to every unit automatically. If your building has any fuel-burning appliance and you don't see a carbon monoxide alarm, that's worth asking your landlord about directly, in writing.
Carbon monoxide is worth taking seriously precisely because you can't smell, see, or taste it — headaches, dizziness, and nausea are often the first warning signs, and by the time they show up, exposure may already be significant. If your alarm ever actually sounds, treat it as a real emergency: get everyone outside into fresh air immediately and call emergency services from outside the building, then sort out the equipment question afterward.
Who bears the risk if there's a fire
Beyond who pays for a battery, a missing or disabled alarm can matter enormously after the fact. If a fire happens and there was no working smoke alarm where code required one, that gap can affect a landlord's liability for injuries or property loss, and it can also affect whether a tenant's own insurance claim goes smoothly. This is one more reason never to remove or disable an alarm yourself, even a chronically annoying one — report it and get it fixed instead of solving the noise problem by taking it down.
What to do if an alarm is missing, dead, or chirping
Report it to your landlord in writing right away rather than just replacing the battery yourself and moving on, especially if the unit itself seems to be malfunctioning rather than just low on battery. Note the exact alarm — which room, which type — and the date. If your landlord doesn't respond within a reasonable time, check your state and local fire code for a specific deadline; some, like North Carolina's, are as short as 15 days from written notice. Never disable a smoke or carbon monoxide alarm because it's chirping or falsely triggering; report it and ask for a replacement instead.
Honestkey™ can flag whether your lease's language about detectors and battery responsibility matches what your state and local fire code actually require, so you're not stuck guessing whether a dead alarm is your problem or your landlord's.