@nelstomlinson steps in the right direction from the sounds of it.
A little recommendation on the Subaru, depending on year/model, the cam position sensor can degrade and cause problems.
You can also have a bad voltage regulator on the alternator which tends to meddle with the main wiring harness and can cause a misfire or what feels like a misfire. Like a gasser with a melted plug cap arcing on the exhaust manifold type feeling.
I changed my alternator, sensors, and added a grounding kit from battery ground to both heads, alt bracket, and throttle body and haven’t had the roughness since.
A little recommendation on the Subaru, depending on year/model, the cam position sensor can degrade and cause problems.
You can also have a bad voltage regulator on the alternator which tends to meddle with the main wiring harness and can cause a misfire or what feels like a misfire. Like a gasser with a melted plug cap arcing on the exhaust manifold type feeling.
I changed my alternator, sensors, and added a grounding kit from battery ground to both heads, alt bracket, and throttle body and haven’t had the roughness since.