Kia Hyundai P0365 Code-Camshaft Position Sensor B Fix
Following the procedures below, you will learn how to diagnose the Kia check engine light using a YOUCANIC OBD-II scanner and how to replace the camshaft position sensor B: faulty code P0365.
At a Glance
- P0365 means camshaft position sensor B, which reads the exhaust camshaft, on bank 1.
- Check the connector for oil before buying a sensor. A leaking O ring lets oil wick into the plug.
- Replacement: unplug the sensor, remove one 10 mm bolt, and press the new one in with a fresh O ring.
- Timing chain stretch can set related codes with a healthy sensor, especially on higher mileage engines.
- Clear the code and start the engine to confirm it does not return.
What sensor B means on this code
P0365 is stored as Camshaft Position Sensor B Circuit, Bank 1. The letter is the part people get wrong. On a twin cam engine with variable timing on both camshafts there are two camshaft position sensors per bank, and the convention is that sensor A reads the intake camshaft while sensor B reads the exhaust camshaft. Bank 1 is the side of the engine containing cylinder number one, which on a four cylinder is the only side there is.
So P0365 points at the exhaust camshaft sensor, which usually sits on the opposite side of the cylinder head from the intake sensor. If you are working from a guide for code P0340, that one covers sensor A and a different sensor on the same engine.
🔧 Find out what is actually wrong before you pay someone to guess
Dealer level diagnostics at home with the YOUCANIC UCAN-II Pro.
- ✔ Covers most makes and models, including many luxury brands. Send us your VIN and we will confirm your car before you order
- ✔ Reads every module, not just the engine, so you find the faults a basic reader says are not there
- ✔ Commands the car: test a fan or pump, bleed ABS, retract an electronic parking brake, register a battery
- ✔ No subscriptions. Free lifetime updates, so the price you pay is the whole price
- ✔ Backed by real mechanics in the USA you can email before and after you buy
Featured in The Wall Street Journal
The word circuit matters too. The code reports an electrical reading, not a verdict on the part. A corroded connector, a chafed wire or a poor ground produces the same reading as a failed sensor, and all of them are cheaper to fix.
How to Troubleshoot Kia/Hyundai P0365 Code: Camshaft Position Sensor B
What you will need
- Kia Camshaft Position Sensor
- Mechanic Metric Toolset
- 10mm Socket
- OBD-II Scanner
Procedure
- Connect the OBD-II scanner to the OBD-II port below the dashboard.

- Insert the key into the ignition switch and turn it to the accessories position.
- Go to the diagnostic menu on the scanner.
- Select read codes and check stored codes on the scanner.
- The scanner will show faulty code P0365: Camshaft Position Sensor B Circuit Bank 1.
- Pull the hood release under the dashboard.

- Unlock the hood latch on the vehicle’s front by sliding the tab on the hood latch.

- Pull the hood up until the hood stays in the open position.

- Remove the engine cover by pulling it up.

- Locate camshaft position sensor B at the exhaust camshaft end of the cylinder head. On the engine shown it sits on the back right side of the engine.

- Disconnect the electrical connector of the camshaft position sensor by pressing the clip and pulling the connector out.
- Remove the 10mm bolt holding the sensor by turning it counterclockwise using a 10mm socket.
- Remove the camshaft position sensor by pulling it out of the vehicle.
- Line up the new camshaft position sensor and press it in to set it into place.
- Reinstall the 10mm bolt on the sensor by turning it clockwise using a 10mm socket.
- Reconnect the electrical connector of the camshaft position sensor.
- Reinstall the engine cover by lining it up back to the engine and pressing it until it snaps into place.
- Reconnect the OBD-II scanner, clear the fault code and start the engine to confirm it does not return.
P0365 fault code may also affect Hyundai vehicles equipped with the same engine.

If you want to use a more professional OBD-II Scanner, which can read and clear fault codes in the engine and other control modules on supported vehicles, use the YOUCANIC UCAN-II Pro.
Check the wiring before buying a sensor
Unplug the sensor and inspect the connector for oil, corrosion and spread pins. Oil intrusion into this connector is common, because a leaking cam sensor O ring lets engine oil wick along the inside of the harness. If the connector is wet with oil, replacing the sensor without addressing the O ring and cleaning the connector will buy you a few months at best.
Measure the sensor against the specification in your service information, and check that it is receiving its reference voltage and a clean ground with the ignition on. No reference voltage means the problem lies between the sensor and the engine control module. Flex the harness by hand while watching the reading, since a broken conductor inside intact insulation reads perfectly until it moves.
Look at the sensor tip as well. These are magnetic and collect fine metal debris from normal engine wear, which distorts the signal they produce. Wiping the tip clean is free and occasionally all that is needed.
When the sensor is not the problem
The engine control module does not judge the camshaft signal on its own. It compares it against the crankshaft signal, and a timing chain that has stretched or jumped a tooth produces exactly the disagreement this code describes with a perfectly healthy sensor fitted. A rattle for a second or two on a cold start is the classic warning sign, and a correlation code stored alongside P0365 makes it more likely still.
This matters on Kia and Hyundai engines in particular, where timing chain and tensioner wear is a known pattern on higher mileage engines. Fitting a new sensor to an engine with a stretched chain achieves nothing except delaying the real repair.
Expect a long crank, stalling, rough running, reduced power or poor fuel economy while the fault is active, although on many engines the only symptom is the warning light because the module falls back on the crankshaft signal and carries on. Read the freeze frame data before clearing anything, since a fault that only appears once the engine is hot is a very different repair from one present at every start. A full system scanner shows freeze frame along with live camshaft and crankshaft position, which separates a sensor fault from a timing problem without dismantling the front of the engine.
Frequently Asked Questions
What does P0365 mean on a Kia or Hyundai?
P0365 means the engine computer found a problem in the camshaft position sensor B circuit on bank 1. On most of these engines, sensor B reads the exhaust camshaft.
Can I drive with code P0365?
For a short time, but the engine may run rough, hesitate, start hard or stall. Fix it soon so you are not stranded.
Can oil cause a cam sensor code?
Yes. Oil leaking into the sensor connector, or low or dirty oil affecting cam timing, can cause cam sensor codes. Check the oil level and the connector first.








i have the 2019 niro plugin hybrid. it has 2 sensors one in the front and one in the back, the layout is almost the same. is the b sensor in the same location?
Can you do the 3.5 v6 version as well? Cam sensor B?