I have a 2010 Pontiac g6 and every few weeks or so it will die on me I will try to start it and it…

I have a 2010 Pontiac g6 and every few weeks or so it will die on me I will try to start it and it will start to crank over and then die again but if I disconnect my battery and also disconnect my cam actuator solenoid on the exhaust side and reconnect then it will start up perfectly fine I have also already replaced the actuator solenoid on the exhaust side due to the error code it was giving me

I would assume main computer is shot, the driver circuit for the cam

Would that be something I would have to take to a mechanic to get replaced or would you say it would be a possible diy thing

false