# P0365: Camshaft Position Sensor "B" Circuit (Bank 1)

**Verdict:** Drive to a shop this week

Engine sensors - Generic OBD-II code, applies to all gasoline cars and light trucks sold in the US since 1996.

- **Typical cost:** $120-$400
- **Urgency:** This week
- **Most likely:** Failed exhaust cam sensor or wiring
- **DIY?:** Sometimes, if easy to reach

## Quick answer

P0365 means the engine computer is not getting a proper signal from camshaft position sensor "B" on bank 1. On most engines that is the sensor on the exhaust camshaft. A failed sensor, damaged wiring, or an oil-soaked connector are the usual causes, and the engine may start slowly or run rough.

## What does P0365 mean?

Engines with dual overhead camshafts and variable valve timing on both cams often have two cam sensors per bank. Each reads a notched wheel or shaped lobe on its camshaft. The engine computer uses those pulses with the crankshaft signal to track which stroke each cylinder is on and to check that each camshaft is where the variable valve timing system commanded it to be.

P0365 is a circuit code for camshaft sensor "B" on bank 1. On most engines "B" is the exhaust camshaft, and bank 1 is the side that holds cylinder 1, or the only bank on an inline engine. The computer sets it when the sensor B signal is missing, stuck high or low, or unusable while the crank sensor shows the engine turning. Many vehicles set it on the first trip. Because sensor A usually still works, the engine often keeps running, though exhaust cam timing control may be disabled.

## What are the symptoms of P0365?

- Check engine light on
- Longer cranking before the engine starts
- Rough idle or slight hesitation
- Reduced power or fuel economy if exhaust cam timing control is disabled
- Occasional stalling on some engines

## What causes P0365?

Ranked from most to least likely. Check them in this order: the cheap, common causes first.

1. **Failed exhaust camshaft position sensor** (most common). The sensor sits on the cylinder head or timing cover, often on the exhaust side, where heat is higher, and its electronics wear out with years of heat cycles. A failing sensor may give no signal or cut out when hot. Swapping sensors A and B, where they are identical, can show whether the fault follows the sensor.
2. **Oil-soaked or corroded connector** (common). A worn sensor O-ring or leaking valve cover gasket can let oil wick into the connector, and corrosion builds on cars in wet or salty climates. Either one disrupts the signal. Look inside the plug for oil and green corrosion, and check that the locking tab still holds it firmly in place.
3. **Damaged wiring** (common). On the exhaust side, the sensor harness often runs close to the exhaust manifold, so insulation can harden, crack and short. Wires near ignition coils or belts can also chafe through, and rodents chew harnesses on parked cars. A shop checks for opens and shorts between the sensor and the engine computer.
4. **Stretched timing chain or damaged target wheel** (rare). If the timing chain has stretched or a cam target wheel is loose or damaged, the sensor B signal may not match what the computer expects. This usually brings exhaust cam timing codes such as P0017 and a rattle on cold starts. It is more likely on high-mileage engines with long oil change intervals.
5. **Shared power supply or computer fault** (rare). Cam sensors often share a power feed and ground with other sensors. If another sensor shorts that feed, several codes can appear at once, including P0340 and P0365 together. An engine computer input fault is rarer still. A shop confirms good power, ground and signal at the computer before considering replacement or reprogramming.

## How do you diagnose P0365?

1. Read all codes and note any related ones such as P0340, P0014 or P0017.
2. Confirm which sensor is "B" on bank 1 for your engine using service information.
3. Inspect the sensor connector and wiring for oil, corrosion, heat damage or chafing.
4. Check power, ground and signal at the connector, and scope the sensor while cranking or running.
5. On engines where sensors A and B are identical parts, swap them and see whether the code follows the sensor.

## How do you fix P0365, and what does it cost?

| Fix | Typical cost | What it involves |
| --- | --- | --- |
| Replace camshaft position sensor B | $120-$350 | Usually a bolt-in sensor; replace the O-ring at the same time. |
| Repair sensor wiring or connector | $100-$350 | Fixes heat-damaged wires, corroded pins or a loose plug. |
| Fix oil leak at the sensor or valve cover | $150-$400 | Prevents oil from reaching the new sensor and connector. |

Full price breakdowns: [camshaft position sensor replacement cost](/cost/camshaft-position-sensor-replacement).

## Is it safe to drive with P0365?

> **Drive to a shop this week.** Usually drivable for a short time if the engine runs well, since the intake cam sensor and crank sensor keep it running. If it stalls or will not restart, stop driving and have it checked.

## Will P0365 fail an emissions test?

With P0365 stored and the check engine light on, the car fails an OBD-based emissions test in most states. Without the sensor B signal, the computer may not be able to monitor exhaust cam timing, which can keep related checks from completing. After the repair, clear the code and drive until all readiness monitors complete.

## After the repair: clearing P0365

Clear the code and start the engine several times, cold and fully warm, then drive with some acceleration so the variable valve timing system moves the exhaust cam. A scan tool should show sensor B activity and cam timing that follows the commanded value. If no codes return over a week, the repair worked.

## How to prevent P0365

- Replace a hardened sensor O-ring and fix valve cover leaks early to keep oil out of the connector.
- Change oil on schedule with the specified oil, since cam timing parts depend on clean oil.
- Keep the exhaust-side harness clipped away from the exhaust manifold and heat shields.
- Use quality replacement sensors made for your engine to avoid repeat codes.

## Codes often seen with P0365

- [P0340](/codes/p0340): Camshaft Position Sensor "A" Circuit (Bank 1 or Single Sensor)
- [P0345](/codes/p0345): Camshaft Position Sensor "A" Circuit (Bank 2)
- [P0344](/codes/p0344): Camshaft Position Sensor "A" Circuit Intermittent (Bank 1 or Single Sensor)
- [P0014](/codes/p0014): "B" Camshaft Position - Timing Over-Advanced or System Performance (Bank 1)
- [P0017](/codes/p0017): Crankshaft Position - Camshaft Position Correlation (Bank 1 Sensor B)

## Frequently asked questions

### Can I drive with a P0365 code?

Usually yes for a short time, because the crank sensor and intake cam sensor can keep the engine running. Starting may take longer and the computer may stop adjusting exhaust cam timing, costing some power. If the engine stalls or will not restart, stop driving and get it checked.

### Is camshaft sensor B the intake or exhaust?

On most engines, camshaft sensor B is the exhaust camshaft sensor and sensor A is the intake. Some makers label sensors differently, so confirm with service information for your engine before ordering a part. Getting the right sensor avoids replacing a good one by mistake.

### How much does it cost to fix P0365?

Most P0365 repairs cost $120 to $400 at an independent shop. A new sensor B runs about $120 to $350, and a wiring or connector repair $100 to $350. If an oil leak soaked the connector, fixing the gasket adds roughly $150 to $400.

### What is the difference between P0340 and P0365?

P0340 is a circuit fault for camshaft sensor A on bank 1, usually the intake cam, while P0365 is for sensor B on bank 1, usually the exhaust cam. They are separate sensors with separate wiring. Both together point to a shared power, ground or connector problem.

### Can I swap the A and B cam sensors to test?

On engines where both sensors are the same part, swapping them is a useful test. If the code moves from P0365 to P0340, the sensor is bad; if it stays, check the wiring. Confirm the part numbers match first, and clear codes before retesting.

### Can P0365 cause variable valve timing codes?

Yes, the computer relies on sensor B to check exhaust cam position. Without a good signal, it may set codes such as P0014 or P0017, or simply disable exhaust cam timing control. Fix the P0365 cause first, then clear and recheck any timing codes.

### Can I replace camshaft sensor B myself?

Often yes, since many cam sensors are held by one bolt on the head or timing cover. Disconnect the battery, unplug the sensor, install the new one with a fresh O-ring and clear the code. Inspect the connector for oil first, because that is a frequent cause.

### Can a P0365 code cause stalling?

It can on some engines, but many keep running normally because the crank and intake cam signals are enough. Stalling is more likely if other sensor codes are present too, which suggests a shared power supply fault. Repeated stalling is a reason to get it diagnosed quickly.

### Will oil change fix P0365?

An oil change alone will not fix a failed sensor or broken wire. However, low or dirty oil can cause variable valve timing codes that sometimes appear with P0365. If your oil is overdue, change it, then clear the codes and see which ones return before replacing parts.

### Will P0365 pass inspection?

No, P0365 with the check engine light on fails an OBD-based emissions test in most states. Clearing it resets readiness monitors, so the car may read not ready if tested too soon. Repair the circuit, then drive several days of normal trips before the test.

## Sources

- [SAE J2012: Diagnostic Trouble Code Definitions](https://www.sae.org/standards/content/j2012_201812/)
- [EPA: On-Board Diagnostics (OBD)](https://www.epa.gov/state-and-local-transportation/vehicle-emissions-board-diagnostics-obd)

## Other engine sensors codes

- [P0332 Knock Sensor 2 Circuit Low (Bank 2)](https://diagxcar.com/codes/p0332)
- [P0335 Crankshaft Position Sensor "A" Circuit](https://diagxcar.com/codes/p0335)
- [P0336 Crankshaft Position Sensor "A" Circuit Range/Performance](https://diagxcar.com/codes/p0336)
- [P0339 Crankshaft Position Sensor "A" Circuit Intermittent](https://diagxcar.com/codes/p0339)
- [P0340 Camshaft Position Sensor "A" Circuit (Bank 1 or Single Sensor)](https://diagxcar.com/codes/p0340)
- [P0341 Camshaft Position Sensor "A" Circuit Range/Performance (Bank 1 or Single Sensor)](https://diagxcar.com/codes/p0341)
- [P0344 Camshaft Position Sensor "A" Circuit Intermittent (Bank 1 or Single Sensor)](https://diagxcar.com/codes/p0344)
- [P0345 Camshaft Position Sensor "A" Circuit (Bank 2)](https://diagxcar.com/codes/p0345)
- [P0351 Ignition Coil "A" Primary/Secondary Circuit](https://diagxcar.com/codes/p0351)
- [P0352 Ignition Coil "B" Primary/Secondary Circuit](https://diagxcar.com/codes/p0352)
- [P0017 Crankshaft Position - Camshaft Position Correlation (Bank 1 Sensor B)](https://diagxcar.com/codes/p0017)

## Symptoms

- [Why is my car idling rough?](https://diagxcar.com/symptoms/rough-idle)
- [Why does my car crank but not start?](https://diagxcar.com/symptoms/car-cranks-but-wont-start)
- [Why does my car hesitate when I accelerate?](https://diagxcar.com/symptoms/car-hesitates-when-accelerating)

## Repair costs

- [Camshaft position sensor replacement cost](https://diagxcar.com/cost/camshaft-position-sensor-replacement): $120-$350

---

Source page: https://diagxcar.com/codes/p0365
Updated: 2026-11-03
General information, not a substitute for a qualified mechanic.
