2007 Pontiac G6 Gt looks like its loosing power

Recently my car has been doing weird things. I get a message that says engine power reduced/ service traction. The car also revs up by itself for a while and then goes back to normal. Saturday on the way back to work my car’s engine disabled along with those other messages and after waiting for a few minutes I was able to start it. I do also have a bad muffler and when I a sit in the dark when it revs up like that the headlights also flicker as if it is loosing power.I think it might be a bad catalytic converter but I don’t know for sure. Any Ideas what it could be.

Off hand, it sounds like you might have an issue with the electronic throttle body

The first thing I’d do is check to see if the throttle body is really gummed up. If it is, I’d clean it

However . . . on many GM vehicles, if you clean the throttle body, you’ll need to relearn it with a factory-level scan tool. You don’t necessarily have to go to the dealer for this, but they have to have at least a Snap on or similarly expensive scan tool, with pretty recent software. In other words, if the guy’s scanner hasn’t been updated in 10 years, he won’t be able to relearn the throttle body.

I just looked on my scanner, and depending on the engine you have, you WILL need to do a relearn, after cleaning the throttle body

Note . . . this is all just speculation, because I don’t have your car in front of me, and I have no idea what fault codes you have. But it’s also based on experience with other GM vehicles of the same model year.

Is the “Check Engine” light on?
Do you have a sunroof? Any water on the floor in the driver’s footwell?

Yes the check engine light is on and yes I have a sunroof. About a year ago I did have an issue where my sunroof leaked and the car got badly wet.

First off thanks for your response db4690. Second since I don’t know much about fixing cars, Do you know how much this would cost to clean and or replace if it needs replaced at a dealership?

Check this out:

This might be a clue to a failing alternator.

This could be another clue. If you have a leak forward of the upstream oxygen sensor, it may not be giving accurate information to the ECU.

And you really should see what fault codes are stored. They too can provide clues.
Is there more than you’ve disclosed that makes you suspect a bad cat converter?

Also, when was the last time you had basic maintenance performed? Do you keep the maintenance up to date?
Are you using excess oil?

Bottom line; I think a good checkup by a competent diagnostician and an exhaust repair is in order. And bring your wallet. You may need other work too.

You may need a new battery.