My Volvo S40 was hesitating under acceleration, especially up hills. It seemed like the transmission was slipping; it turned out to be a much simpler problem - one of the coils was failing. This was revealed thru an OBD scan, and the Internets confirmed this is a common problem from this era of Volvos.
Standard disclaimer: Working on your car can be dangerous, etc. That said, this is one of the easiest fixes you can do yourself. If you do it wrong, your car won't start or if it does, it will run very poorly, so there is little chance of taking your Volvo out on the road in an unsafe manner.
5/8" Spark Plug socket
ratchet wrench and extension
T30 Torx driver or socket
Optional: feeler gauges
4 spark plugs (I used NGK BKR6E)
2 coils (volvo part number 1275602)
spark plug wire set (volvo part number 1275603)
Step 1: Open the Hood; Remove Plastic Cover
The coils, plugs and wires are hidden under a cover on top of the head.
Open the hood, locate the plastic cover that hides the coils and wires. Carefully remove the 6 bolts that hold it in place. You will need to use the Torx T30 tool to loosen these bolts. The cover is also held in place by two catches on the left edge, front and back. See photo for clarification.
Step 2: Remove the Wires From Cylinders 1 and 2
Take the cover off and set is aside. Cylinder one is on the left as you face the car from the front. Pull the wires up from cylinders 1 and 2, and gently unplug the other end from the coils (over cylinders 3 and 4). You may need a screwdriver to encourage the wire to come up out of the spark plug well.
Step 3: Remove the Old Coils
Release the coil control plug by pressing the release tab. Carefully unplug the control wires from the coils. Using the 10mm socket, remove the bolt that holds each coil in place. Pull the coil up and out of the spark plug well.
Step 4: Check the Gap on the Spark Plugs
The spark plugs should be come with the proper gap; check the gap if you have any doubt. The specification is either .030 inches or .75mm. The astute reader will notice these aren't the exact same number, but are pretty close.
The spark plug socket has a rubber insert to hold the plug in place while you remove the plug. Place the socket on the extension and press it down into the well, and use the ratchet to loosen the spark plug. Once it is completely loosened, pull the socket out of the well. You may need to use the pliers to extract the socket - mine never stays on the extension. Insert a new plug it into the spark plug socket, and screw it into the hole at the bottom of the well. Turn it until it is finger tight, then use the ratchet to tighten the plug one-quarter to three-quarter turn more. Repeat for all four plugs.
Insert the new coils into the far right wells, making sure to align the hole for the securing bolt. use the 10mm socket to secure the coil hold bolt. Attach the control wires making sure they are secured with the clip.
Install the plug wires into the left wells. Make sure the wire labeled "1" is on the far left (as you face the car - this is the passenger side of a Left-Hand Drive model). Route the wires as seen in the photo - wire "1" is attached to the coil on the other end of the engine, which is cylinder #4. Of course this means that the #2 wire is connected to the closer coil, over cylinder #3.
Step 6: Reinstall the Plastic Cover, Start the Engine. Check Other Vital Fluids.
After making sure the wires are all located correctly and neatly, reinstall the plastic cover. Make sure the snaps are secured on the left side, and then tighten all six bolts using the T30 Torx driver.
Once it is all secure, you should start the car and ensure it runs smoothly.
Turn the engine off.
While the hood is up, you should check the other vital fluids: Oil level, windshield washer fluid, power steering fluid, radiator coolant and brake reservoir.
Close the hood and go for a test drive to make sure all is well. In my case, the hesitation was gone, and driving was much improved.
andybeals made it!