It is definitely not true that the spelling "Marx" refers to Jewish
descent and "Marks" to German descent. There is no connection between
the spelling of this particular last name and the ethnic background of
the respective family.
Marx, Marks and various other spellings of this name (Marcks, Märx,
etc.) are medieval German derivations of the ancient Latin name
Marcus. Originally, all variants of this name were used only by
Christian Germans (it is the name of the Evangelist Mark), as a first
name in the beginning and later, when the concept of hereditary family
names evolved over the centuries, it became a surname.
On the other hand, the Jews living in Germany in those times did not
have German names but traditional Hebrew names.
When in later times Jews in German-speaking countries were legally
obligated to adopt hereditary family names, they often selected German
surnames that bore a certain similarity to their traditional Hebrew
names. Many with the name "Mordechai" or "Moshe" chose the name German
surname "Marx/Marks" or one of its variants. The spelling did not
matter since all existing variations were already used by Germans.
Hope this answers your question!
dtv-Atlas Namenskunde - Vor- und Familiennamen im deutschen
Sprachgebiet. Deutscher Taschenbuch Verlag 1998. ISBN 3-423-03266-9
Horst Naumann: Das große Buch der Familiennamen - Alter, Herkunft,
Bedeutung. Verlagsgruppe Weltbild 1994. ISBN 3-8289-1955-3
The Names of the Jews - A Preliminary FAQ, by Joachim Mugdan
Wikipedia: Markus (in German)