Many portable generators are kind of nasty,, The INverter ones should be clean but the traditional generators, epically the contractor models, can be nasty.
I used to have a 1,000 Genrac Portable (Hard to find, you usually find a 900, but 1000 is the smallest I can use) when it was new, it had been sitting in a box for lord knows how long, and an APC UPS would complain about it.
After I had run a tank of gas trough it, mostly running light bulbs (Big ones) it settled down and the API was happy with it . It was just big enough to charge the batteries on this house.