2006 Cobalt: Rough Idle when using the heater or A/C

Hi. I have a 2006 Chevy Cobalt 5 speed manual with 49k miles. For the last year the car idles rough at stop lights when the A/C or heater is turned on. The rough idling is not continuous but intermittent with the rpm falling just below 500 and returning to just under 1000. This is accompanied by a shuddering, as if the car is about to stall out. I should also mention that the car has a tendency to stall when rolling to a stop in 1st or 2nd gear. The check engine light comes on sporadically during fast acceleration, usually on a steep incline, when driving on the highway on ramp. A recent diagnostic indicated the need to replace the fuel filter and clean the fuel system, including the throttle body. Had these things done, but I’m still having the same issues with the car. I mentioned this to my mechanic and he said it may be a loose hose.
Any ideas about what’s causing these problems would be much appreciated!

You need to have the codes pulled from the computer to find out what’s causing the Check Engine light to come on. Some parts stores will do this for free.

The rough idling might be caused from a dirty/defective Idle Air Control valve. But this can’t be determined until the code(s) are pulled from the computer.

Tester

Need the codes,!!! also a manual on the car. IAC suspect as stated above … also EGR valve or control solenoid. Can you do a key on-off on-off - on proceedure on this car to read some codes? manual would be a great help.

@Cubpilot

This is a GM vehicle with the OBDII engine management system. The cycling of the ignition switch on and off never worked on GM vehicles. This procedure only worked on OBDI and early OBDII Chrysler diagnostic systems.

Tester