The basic rule is that the most important noun within a compound—if there's more than one—is the element that takes the plural form. This rule applies even if the noun occurs at the start of the compound (Governors General). These types of nouns typically consist of a noun with an adjective or other qualifier attached. They can be written with or without a hyphen, but the same rule applies either way (editors-in-chief).
If both words in a compound are equally important (trade name) or if it is written as one word (newspaper), then the final element is pluralized (trade names, newspapers).
Compounds that don't contain nouns (two-by-four) are treated the same way as compounds that have two equally important elements. That is to say that the final element is pluralized (two-by-fours).
Another aspect of pluralization is the case of solid compounds. If the noun is attached to a different part of speech (passerby), the noun is pluralized (passersby). The exception to this rule is compounds ending in –ful (spoonful). Simply add an s to the end of these words (spoonfuls).
One final thing to remember about plurals of compounds: if both elements represent humans, they must both take the plural form. So, manservant becomes menservants.