Gee, it might be nice if we shared a bit of each other's problems! I suppose that a lot of my issues are related to picking the wrong ancestors! LOL, there is not much to do to change your basic set point, but it seems that somehow you have.
I wish I could help you, but I have no idea. The one thing that comes to mind is a paleo type diet or perhaps FODMAP (especially since you mentioned the onion connection).
I know how to gain weight for myself; just eat more! Apparently, that does not work for you.