The only free and comprehensive online etymological dictionary of the Spanish language
-mo, -me Relict of an ancient noun-forming derivational suffix.
From Latin -mus (Old Latin -mos) 'id.' From Proto-Italic *-mo-s 'id.' From Proto-Indo-European *-mo-s, a noun-forming suffix denoting an action or the results of that action.
Indo-European
Celtic
Old Irish -macha
Balto-Slavic
Old Church Slavonic -mъ, Russian -m, Polish -m, Old Prussian -mis, Lithuanian -mas
Hellenic
Ancient Greek -μός (-mós)
Indo-Iranian
Sanskrit -má, Avestan -man-

The alternate ending in Spanish, -me, comes from Vulgar Latin *-mis when following an -i- due to i-mutation (e.g., Vulgar Latin *firmis "hold" from Latin firmus 'id.'). From Latin -mus.