electrical
Sunroof Motor
for 2024 Tesla Model S Long Range Dual Motor AWD · AWD
Editorial review:Chris Hackleman — Master Technician · 20+ years
Difficulty
Advanced
Time
2.0 h
Tools
8
Steps
11
✓Expert-verified. Personally reviewed and approved by OLP's master technicians (Chris Hackleman — 20+ years each). Always follow the vehicle's factory service information and torque specs.
Replace the panoramic sunroof drive motor on a 2024 Tesla Model S Long Range. The motor is accessed by removing the headliner-side trim and dropping the front edge of the headliner to reach the motor mounted to the sunroof cassette frame.
Warnings
⚠️The HV battery pack runs the full length of the cabin floor directly below your work area. Do not drop tools through the headliner or pierce any cabin-floor surface. If you see an orange cable, STOP.
⚠Model S aluminum body and roof rails are soft — do not pry against painted surfaces or strike with a metal hammer. Use plastic trim tools only.
⚠The headliner in the Model S is a single large molded panel; bending or creasing it will permanently damage it. Support it fully when releasing.
⚠Sunroof glass alignment is calibrated electronically. After motor replacement, the sunroof must be re-initialized or it may bind, leak, or pinch.
ℹ️Tesla MCU may log sunroof faults during disassembly. Clear alerts after the procedure and verify normal operation before delivery.
Tools required
Torx bit set (T20–T30)Essential
Metric socket set (8–13 mm)Essential
1/4" drive torque wrench (2–25 Nm)Essential
As an Amazon Associate and Autel/ANCEL partner, OLP earns from qualifying purchases — how we link. This never changes the specs we publish.
Parts
- Sunroof drive motor assembly (manufacturer-specified for 2024 Model S panoramic roof) × 1 — OEM Tesla Model S panoramic sunroof motor — verify by VIN
- Replacement trim clips (commonly broken on removal) × 1 — OEM headliner / A-pillar / sun visor clip set
As an Amazon Associate and Autel/ANCEL partner, OLP earns from qualifying purchases — how we link. This never changes the specs we publish.
Preparation
- Park on level ground, place in P, engage parking brake.
- Exit ALL doors with the key fob away from the vehicle. Wait at least 2 minutes for HV systems to fully de-energize, even on this non-HV job.
- Open the frunk and disconnect the 12V low-voltage battery under the nose cowl panel per the architecture notes. Insulate the negative terminal so it cannot spring back.
- DO NOT touch, cut, or pierce ANY orange cable — these are high-voltage and lethal.
- If at any point you encounter an orange cable, an HV component, or are unsure if a system is de-energized: STOP and consult a Tesla-certified technician.
- Before disconnecting 12V: use the touchscreen to fully CLOSE the sunroof so the glass is in its home position. This makes mechanical reset easier later.
- Place a clean blanket on the front seats and dash to protect interior surfaces while the headliner is lowered.
- Have a helper available — the headliner is large and awkward to support alone.
- Verify the replacement motor matches the existing unit (connector style, gear orientation, mounting pattern).
Procedure
- 1Mark sunroof glass home positionWith the sunroof closed, place small pieces of painter's tape across the glass-to-roof seam at the front and rear corners. This gives a visual reference if the cassette shifts during the procedure.
- 2Remove sun visors and assist handlesCarefully pry the sun visor clip covers, remove the visor mounting screws, and unplug the visor lighting connector. Remove the rear assist handles by prying the end caps and removing the fasteners. Set hardware aside in labeled containers.⚠Visor clips are brittle on Tesla interior trim — pry slowly with a plastic tool to avoid cracking the headliner mounting points.
- 3Release A-pillar and headliner edge trimGently pull the A-pillar trim covers off (they are clip-retained — be aware of the curtain airbag tether routing). Release the front headliner edge clips along the windshield header just enough to access the sunroof motor area. You do not need to fully remove the headliner — only lower the front portion.⚠️A-pillar trim is in front of the curtain airbag. Do not yank — release clips deliberately and avoid stressing the airbag tether.
- 4Support the headlinerWith a helper holding the front edge of the headliner, lower it just enough to expose the sunroof motor and cassette frame. Do NOT crease the headliner. Padded blocks on the seat headrests can hold it in position hands-free if no helper is available.
- 5Locate the sunroof drive motorThe motor is mounted to the front-center of the sunroof cassette frame, with a multi-pin electrical connector and a splined output shaft engaging the cassette drive cable gear. Photograph the motor's orientation, harness routing, and any clip locations before removing anything.
- 6Disconnect motor electrical connectorPress the locking tab and disconnect the motor harness connector. Inspect the connector for moisture or corrosion — a wet connector indicates a roof drain or seal issue that must be addressed separately.
- 7Remove sunroof motor mounting fastenersRemove the manufacturer-specified mounting fasteners securing the motor to the cassette bracket. Support the motor as the last fastener is removed so it does not drop and strike the headliner or HV pack area below the cabin floor.⚠Do not drop fasteners into the cassette frame — they can fall into the drain channels and require full headliner removal to retrieve.
- 8Remove the motor from the cassettePull the motor straight off the drive gear engagement so the splines disengage cleanly. Do not rotate the cassette cable gear with the motor removed — this will desynchronize the left/right drive cables and cause binding on reinstall.⚠If the cassette gears rotate with the motor out, the sunroof must be mechanically re-timed before the new motor is fitted. This can add significant time to the job.
- 9Compare old and new motorsPlace the old and new motors side-by-side. Verify identical mounting pattern, output spline count and orientation, and connector keying. Confirm the new motor's gear is in the same rotational index as the removed unit (most replacement motors ship pre-indexed to the closed position).
- 10Install the new motorAlign the new motor's splined output with the cassette drive gear and seat the motor flush against the bracket. Hand-start all mounting fasteners before tightening any. Torque to OEM specification — refer to Tesla Service Manual.
- 11Reconnect motor harnessPlug the harness connector in until the lock tab clicks. Confirm the harness is routed away from any moving cassette parts and is secured in its original retention clips.
Reassembly
- Lift the headliner back into position and reseat all front edge clips.
- Reinstall A-pillar trim, ensuring the curtain airbag tether is routed correctly behind the trim and not pinched.
- Reinstall sun visors (reconnect lighting harness first), visor clips, and rear assist handles.
- Remove protective blankets from the interior.
- Reconnect the 12V battery in the frunk. Torque the battery terminal bolts to 6.0 Nm (4.0 lb-ft).
- Close the frunk and re-enter the vehicle; allow the MCU to fully boot.
Verification
- Initialize the new sunroof motor: with the vehicle awake, follow the Tesla-documented sunroof reset procedure (typically press-and-hold the close command on the touchscreen until the glass cycles and re-learns its end stops). If the procedure is not available in the owner UI for this build, a service-mode reset is required.
- Cycle the sunroof fully open, to vent, and fully closed at least three times. Listen for binding, clicking, or uneven cable travel — any of these indicate the cassette desynchronized during service.
- Verify the glass returns to the painter's tape reference marks made in Step 1 when fully closed.
- Spray a light water test along the sunroof seal and check for leaks into the headliner — Model S panoramic roofs are sensitive to drain alignment.
- Check the MCU service alerts screen for any sunroof, body controller, or pinch-sensor faults. Clear any transient alerts logged during disassembly.
- Confirm no rattles or loose trim by driving over a low-speed bumpy surface.
- Note: panoramic roof track lubrication is a known Model S wear point — while the headliner is accessible, inspect track grease condition and re-lubricate with the manufacturer-specified sunroof grease if dry or contaminated.
Related trouble codes on this vehicle
Codes that commonly send this job to the bay — tap one for symptoms, causes, and diagnostic steps.
B0240Sunroof Motor CircuitB0241Sunroof Position Sensor CircuitU0160Lost Communication with Sunroof Control ModuleU0260Lost Communication With Sunroof Control Module
Chasing one of these codes and not sure which part is guilty? Ask a master mechanic about YOUR car →