My car is seriously suffering from this problem and it's becoming increasingly unbearable, repair has been carried out but still the problem resurfaced after three days. How did you solve yours please?
If thair is rough iddiling probelm check engine components then check actuator check sensor's plug's if Diesel clean the full egr system first diagonas properly then take any necessary action.
I don't know how you solve it, but your model may have different problem with rough Idle after few hours of driving. It's something that can be caused by many things such as engine problems, mealtimes, and even how much you'reving worn your shoes. Sometimes the problem can be fixed, sometimes it won't.
The rough idle in your 2012 Hyundai Elantra could be caused by several factors, such as a clogged air filter, a faulty fuel system, or a problem with the spark plugs. It's best to take the car to a qualified mechanic to diagnose and repair the issue.