When did this start?
If you got bloated at about the same time, it's possible you've got parasites from food/water poisoning.
If it's long term, it can be lactose intolerance or fructose malabsorption. Barnyard smell is typical for Clostridium difficile overgrowth. Sulphur gas is from bacteria, which decompose sulphur in the food. In this later case, avoiding sulphur-rich foods (check my journals) helps.
Might check out if you have celiac disease. Are you or your son showing any signs of malnutrition? Diarrhea? Are your ancestors from Scandinavia? If yes to any of these, might pay to have it checked.