How Sunroofs Open and Close (Full Breakdown)
How a Car’s Sunroof Works — Step-by-Step
Quick Summary
When people ask me how a car’s sunroof works, they’re usually asking because theirs is stuck open or closed, or binds during operation. To diagnose and fix it, you need to understand the sunroof mechanism and how it works, and that’s what this article is about.
Sunroof components
A sunroof mechanism consists of a motor, cables, cable tubes, guide rails, and lift arms. Modern sunroofs don’t just slide open—they tilt first, then retract, and then reverse that process to close. If anything in that sequence is out of sync—the alignment, cable position, or motor indexing—the whole system struggles.
• Glass panel – the transparent roof section
• Electric motor – drives the whole system
• Drive cables – transfer motor force to the panel
• Guide rails – channels on each side that the panel slides along
• Lift arms / cam blocks – small ramps that tilt the panel before sliding
• Control switch – sends a signal to the motor
• Sunroof ECU (on modern cars) – manages motor position and safety

Simplified diagram of a sunroof showing one side of the track, cable, cable tube, weatherstripping, and drains
How a Car Sunroof Works
The easiest way to understand a car sunroof mechanism is to think of it as a synchronized track system driven by a small electric motor.
At the center of it all is a DC motor, usually mounted above your headliner, to the rear of the cabin. That motor doesn’t directly move the glass—it drives a gear that pushes two cables, one on each side of the sunroof. Those cables run through cable tubes to the guide rails. Both cables spool and unspool in perfect synchronization. If those cables ever get out of sync—even by a small amount—you’ll immediately start seeing problems.
What Happens When You Open the Sunroof
1) Driver presses the switch — This sends a low-voltage signal to the sunroof’s control module.
2) The control module activates the motor or operates a relay, which in turn sends power to the small DC electric motor, usually mounted above the headliner.
3) Motor drives the cables — The motor turns a gear mechanism that pushes two flexible drive cables — one along each side of the roof — simultaneously and in sync.
4) Cam blocks tilt the rear of the panel up (Tilt phase) — Before the panel slides, the cables push cam blocks (wedge-shaped pieces) forward along the guide rails. These cams lift the rear edge of the glass panel upward slightly. This tilts the glass to clear the roof frame and weather seals.
5) Panel begins sliding rearward — Once the glass is tilted clear, the mechanism transitions from tilting to sliding. The drive cables continue moving, now pulling the front edge of the glass backward. The panel glides along the guide rails toward the rear of the roof.
6) The glass slides under the roof panel — The glass panel travels rearward and tucks underneath the metal roof structure (and sometimes a thin headliner flap), disappearing partially or fully into the space between the roof skin and the headliner.
7) The motor stops when it reaches the end position — The controller detects the end of travel via a limit switch or Hall effect sensor that counts motor rotations. Power to the motor cuts off automatically
What Happens When You Close the Sunroof
1) Driver presses the switch to close — The switch sends a reverse signal to the control module.
2) Motor runs in reverse — The ECU reverses the motor’s polarity, spinning it in the opposite direction.
4) Cables pull the panel forward — The drive cables retract, pulling the glass panel forward along the guide rails back toward its original position.
5) The panel reaches the closed position — As the glass reaches the front of its travel, the cam blocks — now moving rearward — push under the lift arms and lower the rear of the glass back down into the roof opening.
6) Weather seals compress and seal — The glass settles down onto the rubber weather seals around the sunroof opening, creating a watertight, airtight seal.
7) The motor stops and locks — The limit sensor detects the closed position and cuts motor power. On modern systems, the motor applies a small holding force to keep the panel pressed firmly against the seals.
There are Safety Features On Every Modern Sunroof
Anti-pinch protection – If an object obstructs the closing motion, the motor detects increased resistance (via a current spike) and automatically reverses to prevent injury or damage.
One-touch operation – Many sunroofs open/close fully with a single tap, managed by the sunroof controller.
Initialization / reset – If the battery dies, there’s a reset procedure to re-initialize the sunroof so the sunroof controller relearns the end positions.
Every Sunroof Has a Drainage System
Over time, weather stripping can age and fail. To prevent water damage to the cabin, all sunroofs are equipped with drainage tools in the corners. In other words, sunroofs are not designed to be perfectly watertight. Instead, they’re designed to manage water.
Sunroofs also have a drain channel around the frame that catches any water that gets past the seal, routing it through small tubes down the car’s pillars and out underneath — keeping the interior dry even in rain.
Why Understanding This Matters (Where Problems Actually Come From)
Once you understand that sequence—tilt, slide, then reverse—you start to see why sunroofs fail the way they do.
• If the tilt phase doesn’t happen correctly, the glass can’t clear the roof. That’s when you get binding right at the start of movement.
• If the cables aren’t synchronized, one side moves faster than the other. That’s when the panel twists and jams.
• If the lift arms are worn, the sunroof won’t drop low enough when closing. That’s when you get a sunroof that almost closes—but not quite.
• And if the motor loses its position reference, the entire system stops in the wrong place every time.
That’s why I always tell people—don’t think of a sunroof as just a piece of glass that slides. It’s a coordinated mechanical system, and every part has to move in sequence.
Final Thoughts From Experience
The key is recognizing that every movement—tilt, slide, and seal—is part of a sequence. When that sequence is disrupted, the problems show up immediately.
And when you approach it the right way—by watching how it moves instead of guessing—you can diagnose most sunroof issues quickly and accurately.
©, 2026 Rick Muscoplat
Posted on by Rick Muscoplat